zasid Posted June 29, 2008 Share Posted June 29, 2008 Hello Everyone, I have seen Normals maps getting used in Max or Maya (specially in games) used over low poly geometry to fake the displacement effects. How can this be doing in Houdini?let's say if I generate my Normal map from ZBRUSH. Many Thanks. Zasid Quote Link to comment Share on other sites More sharing options...
stevenong Posted June 30, 2008 Share Posted June 30, 2008 Hey zasid, There are a few threads so please search for them. There is also a Wiki for it. Cheers! steven Quote Link to comment Share on other sites More sharing options...
zasid Posted June 30, 2008 Author Share Posted June 30, 2008 Hello Steven, I know how to render a normal map in HOudini,but I dont know how to do the same just as I mentioned "I have seen Normals maps getting used in Max or Maya (specially in games) used over low poly geometry to fake the displacement effects. How can this be doing in Houdini?let's say if I generate my Normal map from ZBRUSH." so I search the forum but didn't get anything on it . I have also read the ODWIKIN ZB to HOUDINI documents. but can't figure out a way how to fake displacment in HOudini thro Normal maping method so please address this issue if u know many thanks. Quote Link to comment Share on other sites More sharing options...
edward Posted June 30, 2008 Share Posted June 30, 2008 H9.5 Beta in SHOPs: Tab > OGL2 > "OGL2 Object Normal Map" or "OGL2 Tangent Normal Map". The latter requires tangent space attributes as generated by the PolyFrame SOP. Both require correct normal maps. There's many variations of normals mapps though so YMMV. Quote Link to comment Share on other sites More sharing options...
stevenong Posted June 30, 2008 Share Posted June 30, 2008 Hello Steven,I know how to render a normal map in HOudini,but I dont know how to do the same just as I mentioned "I have seen Normals maps getting used in Max or Maya (specially in games) used over low poly geometry to fake the displacement effects. How can this be doing in Houdini?let's say if I generate my Normal map from ZBRUSH." so I search the forum but didn't get anything on it . I have also read the ODWIKIN ZB to HOUDINI documents. but can't figure out a way how to fake displacment in HOudini thro Normal maping method so please address this issue if u know many thanks. Sorry, I misunderstood what you wanted. I thought you wanted to render displacement but you would like to use them for display. Do what Edward says and let us know how it goes. Cheers! steven Quote Link to comment Share on other sites More sharing options...
rdg Posted June 30, 2008 Share Posted June 30, 2008 @edward: "OGL2 Object Normal Map" or "OGL2 Tangent Normal Map" Is there also a VEX Tangent Normal Map for Mantra? Cheers, Georg Quote Link to comment Share on other sites More sharing options...
zasid Posted June 30, 2008 Author Share Posted June 30, 2008 Thanks guys I will give it a try and let u know. Quote Link to comment Share on other sites More sharing options...
edward Posted July 1, 2008 Share Posted July 1, 2008 Is there also a VEX Tangent Normal Map for Mantra? No, but it shouldn't be too hard to translate it from GLSL. Right-click on the SHOP > Type Properties > Code. The fragment shader should be understandable (I hope). Quote Link to comment Share on other sites More sharing options...
Jason Posted July 1, 2008 Share Posted July 1, 2008 No, but it shouldn't be too hard to translate it from GLSL. Right-click on the SHOP > Type Properties > Code. The fragment shader should be understandable (I hope). This sounds like a good candidate for SESI to add to the distribution, no? Quote Link to comment Share on other sites More sharing options...
rdg Posted July 1, 2008 Share Posted July 1, 2008 shouldn't be too hard to translate it from GLSL. I currently don't have access to 9.5 - I was assuming that this might be possible. It's probably just copy&paste. This sounds like a good candidate for SESI to add to the distribution, no? I second that. Quote Link to comment Share on other sites More sharing options...
symek Posted July 1, 2008 Share Posted July 1, 2008 (edited) I currently don't have access to 9.5 - I was assuming that this might be possible.It's probably just copy&paste. I second that. I could be terrible wrong here, but it seems that using Tangent Space Normal Maps in Mantra is just a matter of bellow code. (according to this paper) GLSL is a different beast because I think it deals with light directions instead of modifying normals... #pragma hint uv hidden surface tangentNormals(string tangents = ""; vector uv = 0; ) { vector tN = 2 * texture(tangents, uv.x, uv.y) - 1; N = normalize(normalize(dPds) * tN.x + normalize(dPdt) * tN.y + N * tN.z); // and farther lighting models as desired: Cf = diffuse(N) * 0.8; } Seems to work in my simple test. Edited July 1, 2008 by SYmek Quote Link to comment Share on other sites More sharing options...
ofer Posted July 14, 2008 Share Posted July 14, 2008 Im still trying to get object-space normals from zbrush to work in mantra. It doesn't work... I sample the texture, fit to range -1-1, and negate the Y component. Connecting this into the nN parameter of the Lighting Model VOP gives correct results from only certain viewing angles, which is strange since there is nothing view dependent in the code. When looking at the normals as colors, everything looks good except the Z-axis, which looks like it should be reversed also, but doing so only gets things worse. I tried transforming the normals from object space to camera space or current space, and several other combinations, but none works. I don't know what else to try. Maybe someone has an example hip for this? Quote Link to comment Share on other sites More sharing options...
symek Posted July 15, 2008 Share Posted July 15, 2008 (edited) Im still trying to get object-space normals from zbrush to work in mantra. It doesn't work...I sample the texture, fit to range -1-1, and negate the Y component. Connecting this into the nN parameter of the Lighting Model VOP gives correct results from only certain viewing angles, which is strange since there is nothing view dependent in the code. When looking at the normals as colors, everything looks good except the Z-axis, which looks like it should be reversed also, but doing so only gets things worse. I tried transforming the normals from object space to camera space or current space, and several other combinations, but none works. I don't know what else to try. Maybe someone has an example hip for this? Could you attach some dummy object with normal map from ZBrush so we could try on it? Edited July 15, 2008 by SYmek Quote Link to comment Share on other sites More sharing options...
ofer Posted July 15, 2008 Share Posted July 15, 2008 Yes. Here is the model and textures im working with. object-space and tangent-space. thanks. thug_base_normal_obj.bmp.zip thug_base_normal.bmp.zip face.bgeo.zip Quote Link to comment Share on other sites More sharing options...
ofer Posted July 18, 2008 Share Posted July 18, 2008 In what space should the normals be supplied to mantra/to the Lighting model VOP? Quote Link to comment Share on other sites More sharing options...
symek Posted July 18, 2008 Share Posted July 18, 2008 In what space should the normals be supplied to mantra/to the Lighting model VOP? Hi ofer, sorry I don't have too much time now. Maybe later today I'll try your maps - this bothers me also. As to your question: lighting models assumes current space which is camera space. Quote Link to comment Share on other sites More sharing options...
ofer Posted July 18, 2008 Share Posted July 18, 2008 OK, no problems. Thanks. Quote Link to comment Share on other sites More sharing options...
ofer Posted July 18, 2008 Share Posted July 18, 2008 Woohoo, I've got object-space normal maps working. The problem was I had to negate both Y and Z directions, and transform from object to camera space. It took me sometime to understand it, because I didn't try it all at once. Now I need to get tangent space normal maps to work. I tried the code snippet from this thread, but normalized dpds/dpdt looks very chunky. Maybe Im doing something wrong, and I need to try again after I learned a few things. Thanks for the help. Quote Link to comment Share on other sites More sharing options...
symek Posted July 18, 2008 Share Posted July 18, 2008 Woohoo, I've got object-space normal maps working. The problem was I had to negate both Y and Z directions, and transform from object to camera space. It took me sometime to understand it, because I didn't try it all at once. Now I need to get tangent space normal maps to work. I tried the code snippet from this thread, but normalized dpds/dpdt looks very chunky. Maybe Im doing something wrong, and I need to try again after I learned a few things. Thanks for the help. Great news. As to the snippet, it never was tested properly. I simply opened mentioned paper and check it on grid with brushed dots from nvidia normal maps generator. It looked ok, but as I said nothing more I can say about it. Indeed the dpds/dpdt part is most subspecies. You could use tangent space vactors from SOPs and test it, but I'm not sure about anything here. Actually I hoped that after posting that snippet someone smarter will fix it Quote Link to comment Share on other sites More sharing options...
edward Posted July 18, 2008 Share Posted July 18, 2008 Try using the frames from the PolyFrame SOP in H9.5: Style = Texture Coordinates, and enabled Bitangents. 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.