marque_pierre Posted September 12, 2017 Share Posted September 12, 2017 I am trying my hand at random values. My expression here fit(rand($PT), 0, 1, 0.7, 1) is meant to input a random number into saturation between 0.7 and 1.0. But as the render shows, it seems to just input 0 into saturation. What am I doing wrong here? Quote Link to comment Share on other sites More sharing options...
symek Posted September 13, 2017 Share Posted September 13, 2017 Did you put $PT inside material parameter? If so, it won't work as $PT is a local variable meaningful only in SOPs' context. If you wan't to drive saturation per point, you have to create an attribute in SOPs, and bind it to shader parameter. Or use something what is available in shaders, like uv, prim number etc. Quote Link to comment Share on other sites More sharing options...
marque_pierre Posted September 13, 2017 Author Share Posted September 13, 2017 (edited) Thanks symek. I just really want a random number inside a range. That is all. It doesn't need to be tied to a point or anything. All I want is a random number inside a set range to drive my shader. The geo is part of a HDA, so I just want random variation on certain shader parameters every time another instance of the HDA is created. How do I do that then? Edited September 13, 2017 by marque_pierre 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.