kensonuken Posted January 14, 2009 Share Posted January 14, 2009 I am working on relighting stuff and when I render out bent normal Im getting the values which are in range 0-1 rather than -1 to 1 whats the process to get this ? Quote Link to comment Share on other sites More sharing options...
jacob clark Posted January 14, 2009 Share Posted January 14, 2009 I am working on relighting stuff and when I render out bent normal Im getting the values which are in range 0-1 rather than -1 to 1 whats the process to get this ? Hi Kensonuken, At first guess, I wonder if you're rendering to 8bit. Check your quantinization settings. cheers, -j Quote Link to comment Share on other sites More sharing options...
kensonuken Posted January 14, 2009 Author Share Posted January 14, 2009 Im rendering in 32 bit float.. Quote Link to comment Share on other sites More sharing options...
Mario Marengo Posted January 14, 2009 Share Posted January 14, 2009 Im rendering in 32 bit float.. I can confirm that bent normals (which result from an occlusion call) are indeed *signed* -- with a natural range of [-inf,+inf], or [-1,1] after normalization. Quote Link to comment Share on other sites More sharing options...
kensonuken Posted January 15, 2009 Author Share Posted January 15, 2009 (edited) Mario Im talking about worldspace normals instead of camera space... Im uploading the scene file just check the normal out in it... Please check the pixel values I couldnt find any negative value in it.. bent_send.hipnc Edited January 15, 2009 by kensonuken Quote Link to comment Share on other sites More sharing options...
Mario Marengo Posted January 15, 2009 Share Posted January 15, 2009 Mario Im talking about worldspace normals instead of camera space... It doesn't matter which space you're talking about, what I said applies to *all* vectors (positional, directional or normal) in *any* space -- they will all have real-valued components (that means big-R Real numbers, which means [-inf,+inf]). Please check the pixel values I couldnt find any negative value in it.. Well, yes, you're getting positive-valued components in your rendered normals, but the reason is entirely attributable to "operator error" rather than some flaw in the occlusion function. Here are some of the flaws I caught after a very quick look ("very quick" only because I find it very time consuming to wade through a forest of spaghetti VOP connections and temporary variables): 1. Angles are supposed to be in *radians*, and in the case of a sampling cone, it refers to the half-angle. 2. You set the Transform VOP's "Interpretation" parameter to "Position", when it should have been "Normal" (you're transforming normals, not positions -- they are different animals when it comes to transformations). This was your biggest problem. Here's the bent normal output with your original shader (and yes, it's clearly "wrong"): And here it is with those changes. (it *does* have negative-valued components as you would expect, but I've remapped them to be positive for display purposes only). And here's your hip file with the modifications: bent_send_mgm.hipnc I didn't even look at the rest of the shader, so there might well be other little bombs lurking in there. I only looked at the VOPs involved in the bent-normal calculation. Cheers. Quote Link to comment Share on other sites More sharing options...
kensonuken Posted January 16, 2009 Author Share Posted January 16, 2009 hey thanks Mario. But I would like to know how do I map a diffuse reflection map on this in a compositing package like Nuke..? Quote Link to comment Share on other sites More sharing options...
Mario Marengo Posted January 16, 2009 Share Posted January 16, 2009 hey thanks Mario. But I would like to know how do I map a diffuse reflection map on this in a compositing package like Nuke..? I haven't a clue, sorry. But my first suggestion would probably be to read the user manual... or some forum dedicated to Nuke. 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.