Im making a terrain (grid and sculpt) and im building a shader for it. Just when i finished doing the grass i realized that i needed to add terrain also. So i thought of making a shader with two (or maybe more) colors and blend them using the height of the geometry as a mask or intensity. I'm trying to figure out how get the height of the geometry in VEX and i can't find it. Is this a handful method or there's something better for shading terrains with multi-textures? Maybe using various shaders, but i tried making groups of primitives by painting but the intersections looks very sharp, i prefer something blended.
Thanks for the help
Need help shading terrain
5439 6 0- nzabala
- Member
- 66 posts
- Joined: Sept. 2008
- Offline
- edward
- Member
- 7737 posts
- Joined: July 2005
- Online
- nzabala
- Member
- 66 posts
- Joined: Sept. 2008
- Offline
- Soothsayer
- Member
- 862 posts
- Joined: Oct. 2008
- Offline
- edward
- Member
- 7737 posts
- Joined: July 2005
- Online
nzabala
Thanks for the help edward, i tried what you said and work good, but the Y is relative to the camera and when I move it the shader also moves.
Ah right, try inserting a Transform VOP in between the P and Vector to Float. Replace “spacebject” with “space:world”.
Im really new with shaders
Me too.
- edward
- Member
- 7737 posts
- Joined: July 2005
- Online
PS. BTW, I think that you should strive to only have 1 Lighting Model VOP in your network. Use Constant VOPs (type color) for piping into the Mix. Then pipe the output of the Mix into the Lighting Model before piping that to the Output VOP. This way, you can also pipe the F output on your Lighting Model to the corresponding one on the Output VOP.
- nzabala
- Member
- 66 posts
- Joined: Sept. 2008
- Offline
Thanks for all the advices! They are really useful and I learned a lot. I advanced with my grass/soil shader. I applied the Y value of the P to define if its grass or soil. For now the soil is just a lambert but i will add some noise and variance. I also add a antialiased noise to the union between. It still needs a lot of work buy I want to share with you for helping me a lot to get results. I'll keep you updated
NicoZ
-
- Quick Links