Preface -- I'm not a skilled C-language coder at all, just a hobbyist-artist. This is an absolute newbie question involving Cycles code, and I was referred here by staff at CGCookie.

Question: In the Cycles material node setup, the only displacement socket is the input socket in the final output node. I can see a use for intermediate nodes (separate from the material output node) to incorporate their own displacement "output" and "input" sockets, for things such as generating derived normals, the way various deform/generate modifiers appear to. [In other words, chaining several render-time displacements together as if they were modifiers in the mesh modifier stack, which is more accurate than linear adding of texture maps.]

If even a more skilled coder attempted such a thing -- would it be certain to introduce significant performance impacts; would the existing code structure even allow for it? Could it be done at the Python scripting level instead of hitting the C-level code?

This is my first time on any Stack Exchange site. If my question is poorly formed or if this is the incorrect venue for it, I can take advice on improving my approach for any future questions. Thank you to any and all who have read this far. [EDIT] (The intended output is the micropolygon dicer, not an image file.)

  • $\begingroup$ Which would output to what? An image for example? $\endgroup$ – qwazix Jan 4 '17 at 20:34
  • 1
    $\begingroup$ Examples might confuse the issue, but here goes. Two textures to apply, one displaces a flat plane, creating hills; other extrudes blocks perpendicular to hill curves. Combining textures with add nodes won't work; the second texture projects straight from the Z axis of the original plane, causing sharp skewed blocks instead of right-angles. Applying the hills-texture with a displace_modifier can work, but increases the mesh vertex count. Giving material nodes intermediate output-input sockets for chaining displacement textures is the idea I had, but the viability of coding it is unknown to me. $\endgroup$ – RenderNoob Jan 5 '17 at 0:26
  • $\begingroup$ "Which would output to what?" @qwazix, The output would be the micropolygon dicing engine, the input would be a plane and two textures that must be in serial, not simply added together and saved as a new image. That's why the derived normals are necessary. Ran out of room and edit time to add this in my previous comment. $\endgroup$ – RenderNoob Jan 5 '17 at 0:34
  • $\begingroup$ Ok this explains it. Unfortunately I don't really know how to answer your question in that case. A dig in the code might help. $\endgroup$ – qwazix Jan 5 '17 at 7:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.