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?
Random values for material inputs
3842 3 1- marque_pierre
- Member
- 25 posts
- Joined: May 2015
- Offline
- jsmack
- Member
- 7805 posts
- Joined: Sept. 2011
- Offline
$PT doesn't mean anything in shading context, and furthermore, points don't have any sort of enumeration that is available to materials. However, you can store that saturation, or any sort of arbitrary value as an attribute on your geometry, and use a parameter node to access the attribute by name in your material.
- marque_pierre
- Member
- 25 posts
- Joined: May 2015
- Offline
- trzanko
- Member
- 24 posts
- Joined: Oct. 2015
- Offline
make an id integer attrib on the pts. though because they're trees you'll likely want to group them by tree, so id by tree, connectivity will only work if each tree is unique. if you're copying the tree to points you can id the points then have the copies inherit the attrib
i@id = @ptnum;
make a material builder
bind in id -> rand -> fit -> saturation -> shader
i@id = @ptnum;
make a material builder
bind in id -> rand -> fit -> saturation -> shader
Tighe Rzankowski
trzankofx@gmail.com
trzankofx@gmail.com
-
- Quick Links