hcs Posted October 3, 2012 Share Posted October 3, 2012 (edited) Hey guys, I'm just learning about shading in vops and rendering in mantra and I'm working on a bark shader for a tree. The shader shows up fine when the camera is near the tree but, when it is farther from the tree, the detail is lost. Like I said, I am new to this and am not really sure what is going on. I guess it is some sort of level of detail issue, but I have had no luck figuring it out. If anyone knows how I can fix this or can even just tell me what this issue is called so I can google it, that would be great. You can render with cam1 and cam2 in the attached file to see what I mean. Thanks hcs bark_shader.hipnc Edited October 3, 2012 by hcs Quote Link to comment Share on other sites More sharing options...
papicrunch Posted October 4, 2012 Share Posted October 4, 2012 hello, increase the the z-importance in mantra render node This measures geometry in 3D. The Z-Importance can be used to bias the z-component of the surface. A Z-Importance of 0 means that the x and y components of the object will be the only metric in determining the size of the object. This is roughly equivalent to raster space measurement. By increasing the Z-Importance to 1, the z measurement becomes more meaningful. It is possible to increase the Z-Importance beyond 1. If you think of a grid in the XY plane, the z-importance has no effect. However, if the grid is nearly in the XZ plane, z-importance has more influence on the dicing. With a Z-Importance of 0, only the projected measurements will be used, which will result in long, thin strips being created. With a Z-Importance of 1, the grid will be more uniformly sub-divided. With a value greater than 1, more divisions will be performed in Z. This is important when displacement mapping is being performed. Increasing the Z-Importance will improve quality on displacement shaded ground planes (for example). 1 Quote Link to comment Share on other sites More sharing options...
Erik_JE Posted October 4, 2012 Share Posted October 4, 2012 You do not have a position plugged into Displace Along Normal and therefore it is using the point position in Camera Space to do the displacement. This is why it changes when you move the camera. To fix you need to grab the position from a Global Variables and set it to Displacement, then transform it to object space and then plug it into Displace Along Normal. 1 Quote Link to comment Share on other sites More sharing options...
hcs Posted October 5, 2012 Author Share Posted October 5, 2012 Thanks for the responses guys. Increasing z-importance definitely makes the shader look better. At first it didn't appear to but when I increased the shading quality as well I could see a clear difference. Erik_JE, I tried doing what you suggested (transforming the position from global displacement variables to object space and plugging it into the displace along normal node) but for some reason the tree no longer renders at all. I also tried having the displacement part of the shader get its position from that same global variables, but the tree didn't render that way either so I left it plugged into only the displace along normal node. I'm probably missing something very obvious but I can't think what it is... bark_shader_2.hipnc Quote Link to comment Share on other sites More sharing options...
Erik_JE Posted October 5, 2012 Share Posted October 5, 2012 (edited) Thanks for the responses guys. Increasing z-importance definitely makes the shader look better. At first it didn't appear to but when I increased the shading quality as well I could see a clear difference. Erik_JE, I tried doing what you suggested (transforming the position from global displacement variables to object space and plugging it into the displace along normal node) but for some reason the tree no longer renders at all. I also tried having the displacement part of the shader get its position from that same global variables, but the tree didn't render that way either so I left it plugged into only the displace along normal node. I'm probably missing something very obvious but I can't think what it is... Actually I am wrong. I am so used to using surface position for displacement noises. In this case tho when you use UVcoords it is not needed cause the displacement amount do not depend on the surface position directly. If you wan't more detail you can also try increasing the Pixel Samples in the mantra node. Edited October 5, 2012 by Erik_JE Quote Link to comment Share on other sites More sharing options...
hcs Posted October 5, 2012 Author Share Posted October 5, 2012 Still good info to have, so thanks, Erik_JE. I'm actually working on another shader that does use surface position for displacement and things make more sense now. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.