CinnamonMetal Posted November 21, 2018 Share Posted November 21, 2018 How do you create normals from displacements ? Quote Link to comment Share on other sites More sharing options...
davpe Posted November 21, 2018 Share Posted November 21, 2018 Quote Link to comment Share on other sites More sharing options...
CinnamonMetal Posted November 21, 2018 Author Share Posted November 21, 2018 @davpe What is the difference between Displace Along Normal and Displace, if anything ? Upon rendering, this branch of the material does not render the normal map as it's plugged into the N of the surfaceOutput vop ? Also, how do you add two displacements ? Quote Link to comment Share on other sites More sharing options...
davpe Posted November 21, 2018 Share Posted November 21, 2018 the first displacement is computing object space normal out of a height map. the resulting normal is then converted to a tangent space normal (with a bind export called Ntangent - use that to render the normal map as an aov). Tangent space normal map goes to the second displacement set to mode Normal which again converts the tangent space normal to the object space to be used in shader. Of course typically you don't do this kind of conversion in your actual shader, you just use a height map or a normal map with a single displace node. this is just an example how you'd go about converting height to normal. two displacements can be used simply by combining two textures before connecting it to a displacement node. displace has more functionality compared to simple Displace along mormal. Drop down both nodes, look at its parameters and you'll see the difference. Quote Link to comment Share on other sites More sharing options...
CinnamonMetal Posted November 22, 2018 Author Share Posted November 22, 2018 I take my displace along normal, plug that into the computeTangents VOP, plug that into the TangentNormal followed by into the displace vop. Then into both a bind export, for a custom tangent normal pass and into the normals of the surfaceOutput. Although when rendering my custom TangentNormal pass, it renders black ? Quote Link to comment Share on other sites More sharing options...
davpe Posted November 22, 2018 Share Posted November 22, 2018 that means you're doing something wrong don't know, try posting your scene. it certainly works for me... Quote Link to comment Share on other sites More sharing options...
CinnamonMetal Posted November 22, 2018 Author Share Posted November 22, 2018 I've attached the scene file; I hope you can find the problem A_Shader.hipnc Quote Link to comment Share on other sites More sharing options...
davpe Posted November 22, 2018 Share Posted November 22, 2018 (edited) hi, there was more issues in your file. first of all, the bind VOP. the attached picture is pretty explanatory at this point, i hope then, your tangentnormal VOP did not have any input normal connected and also, tangent style must be set to "Use connected utan, vtan" (which are supplied by the computetan VOP wired to it, by the way). third, in this case your displace2 VOP must be set to "Normal" mode of operation because there is a tangent normal as an input value. and the last thing, I just don't understand what are you trying to do first, you use the displace along normal node to compute displaced normal in object space. then you're doing some math to convert that normal into a tangent space, only to have it connected into another displace node that will finally convert it back to the object space before it's connected to the output N. this doesn't make any sense man. that conversion is completely redundant why didn't you simply use the first displace VOP's normal for the surface output? cheers. A_Shader_fix.hipnc Edited November 22, 2018 by davpe Quote Link to comment Share on other sites More sharing options...
CinnamonMetal Posted November 22, 2018 Author Share Posted November 22, 2018 4 hours ago, davpe said: your tangentnormal VOP did not have any input normal connected and also, tangent style must be set to "Use connected utan, vtan" What is the difference between the default within the tangentNormal VOP ? 4 hours ago, davpe said: and the last thing, I just don't understand what are you trying to do first, you use the displace along normal node to compute displaced normal in object space. then you're doing some math to convert that normal into a tangent space, only to have it connected into another displace node that will finally convert it back to the object space before it's connected to the output N. this doesn't make any sense man. that conversion is completely redundant why didn't you simply use the first displace VOP's normal for the surface output? Do you mean take the displaceAlongNormal VOP and it's Normal and plug that directly into the N for surface output, if so; good point. Although my ExtraImage Plane Pass still renders black ? If the export in Context from within the bind export node was set to displacements rather then surface; it could export a displacement pass; if I understand this correctly ? Quote Link to comment Share on other sites More sharing options...
davpe Posted November 22, 2018 Share Posted November 22, 2018 the difference is the input data from which tangent normals are calculated. by default i think it looks at uv coords. read the docs for details. yes, that's exactly what i mean. just plug the displaced N into the output. it renders as expected for me, look at the picture i posted. honestly, i don't know much about how different contexts work. but generally if you want to export any image plane data (including displacement pass) you always use Surface. at least i never had to change it. maybe again, read the docs, for more info? 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.