ch3 Posted August 16, 2017 Share Posted August 16, 2017 I have a small compositing network which I want to reference as texture in the shader using the op: expression .ie op:/img/trail Even though I've managed to make it work several times, I always find it a bit flaky and many times mantra doesn't manage to load the image, even though it may be visible on the viewport when referencing the same image operator in a uvquickshade node, or just by loading the shader. It works with a principle shader out of the box, but if I put the same shader within a material builder it breaks. Is there a render attribute or something else I need to add to the shader? I understand it's better to use pre-rendered images the normal way, but I want to use dynamic heighfields SOPs for textures and ideally avoid having to write out thousands of frames in advanced. Quote Link to comment Share on other sites More sharing options...
ch3 Posted August 16, 2017 Author Share Posted August 16, 2017 Is there a general limitation to expressions and connections within a material builder in comparison to promoted parameters? Seems like the op: expression or even a reference to a path chs() doesn't work within the material builder and they have to be promoted outside it. Is that normal? Quote Link to comment Share on other sites More sharing options...
symek Posted August 17, 2017 Share Posted August 17, 2017 Well, despite of the warning about VEX not supporting animated parameters, for years placing $F inside a shader body simply worked. There is a subtle nuance here though, and it't hard to see, since GUI wise all Houdini parms look the same. There are two different things involved here: shader's variables (inputs inside Shops/Vops) and parameters on a nodes. Basically think about Vops (material builder or anything involving nodes and vex) as a pure string based code generator. Code listening will be generated inside Houdini, but interpreted in a different context (inside Mantra), so expressions (usually evaluated inside Houdini) don't fit. Promoting them outside a shader body, allows them to be correctly evaluated prior execution (passing the result to shader body as plain old data variable). Seems like different types of Vops involved subnets has different opinion about what is possible though. 2 Quote Link to comment Share on other sites More sharing options...
ch3 Posted August 18, 2017 Author Share Posted August 18, 2017 Ah great, that makes total sense now. I guess it's somewhat similar to the way glsl/openCl shader kernels expect all parameters to be imported a certain way. thanks a lot for the in-depth explanation. Quote Link to comment Share on other sites More sharing options...
ch3 Posted August 19, 2017 Author Share Posted August 19, 2017 So even if the shader pulls the image from the /img content, it doesn't seem to update it over time. Whether it's an animated noise pattern, or a changing heightfield which is what I am trying to use it for. The frame the scene is when I kick off the sequence render, is used across all frames. Any ideas for that? thanks again 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.