Neon Junkyard Posted July 25, 2016 Share Posted July 25, 2016 So it seems like mantra always has to generate displaced geometry at render time even when I check bump only on the displace along normals node (same applies to the displace and displace texture node). So if I want to use just a simple bump map rather than using displacement to save render time it still has to generate the displaced geometry, which totally defeats the purpose of using bump to save on render time in the first place. Is this a bug or am I missing something, like a render setting or something? I attached a simple HIP file demonstrating this Second, what is the difference between the surface globals and displacement globals? Are the interchangeable or is there something unique about the displacement globals, like they automatically convert your position coordinates to object space or something? Then finally, and this is kind of a question on shading in general- when you output your global P to noise you need to convert your coordinate space to object space otherwise your noise will swim, I usually do this with a rest node. Looking inside the node it generates a rest parameter after that conversion. However what if you have a rest attribute on your geometry already, will that be overridden at render time? Furthermore, if you do want to use the rest position you generated in SOPs instead of P for noise do you still need to convert it to object space, or is it in the correct space already? There really isn't a lot of info on this type of stuff, any help would be appreciated Thanks bump_issue.hip Quote Link to comment Share on other sites More sharing options...
Jero3d Posted July 25, 2016 Share Posted July 25, 2016 (edited) Hey Drew, the problem is that you are plugging your bump map into the displacement output, which will cause Mantra to evaluate the input P and N of the Displacement Output and then create the displaced geometry (even though in this case the position isn't displaced). To fix this you can plug the output N from the Display Along Normals into the Base N of your principled shader. I tried it out and the result is the same but now Mantra doesn't print the "generating displaced geometry...". You only need the N since you are dealing with bump, so you can ignore the output position from the displace along normals. I'm not sure what the exact different is between the displacement and surface variables, I was always told to use the surface variables for the inputs of any node that were going into the surface context and the displacement variables when dealing with the displacement context. I tried plugging both in and the result is the same, so I can't really answer this one. Finally for the rest, Houdini does generate a rest parameter but if you dive into the OTL and see the parameters of the rest, it's set to export "never", which means that it won't be sent to Mantra and it won't overwrite your original rest position if you export it. bump_issue_fix.hipnc Edited July 26, 2016 by Jero3d Quote Link to comment Share on other sites More sharing options...
Neon Junkyard Posted July 26, 2016 Author Share Posted July 26, 2016 Thank you! that worked great, I cant even tell you how long that was bugging me. thanks for the info Quote Link to comment Share on other sites More sharing options...
old school Posted July 28, 2016 Share Posted July 28, 2016 No need to hack the shader and remove displacement links. Leave the displacement and normal wires in place. Just add the Mantra Property: True Displacements < vm_truedisplace > to your Properties VOP inside your shader using the Edit Parameter Interface Edit Rendering Parameters. This adds the toggle True Displacements. Just turn it off and the geometry will not be diced and displaced. Only surface normals calculated. There is another interesting property as well that you may want to look in to: Add Bump To Ray Traced Displacements which will do both displacements and bump when the threshold is met. This is a critical one when reworking large scenes as archives using Material Style Sheets. You can control this render property right at the end of the pipeline without adding to your shader when using material style sheets and targets with property overrides. Could even put a wrangle in the stylesheet that sets this property based on distance from camera. 2 Quote Link to comment Share on other sites More sharing options...
Neon Junkyard Posted August 2, 2016 Author Share Posted August 2, 2016 Thank you old school! I will check that out, I have almost zero knowledge of what you can do with rendering properties beyond basic displacement bounds and a few others, this is very helpful. With regards to add bump to ray traced displacements- if I wanted to mix a bump map (or normal map) and a displacement map together which I find myself doing a lot, would that be required? I currently break everything out bump and displacement with set layer component nodes and then combine them with layer mix and then layer unpack to extract the displacement output. Not sure if this is 100% the right way to go about it 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.