[Bf-cycles] Random values in SVM nodes
Lukas Stockner
lukas.stockner at freenet.de
Fri Mar 21 21:01:48 CET 2014
Hi all,
I recently noticed that a Random Value Node would be useful, for example
for spectral dispersion shader setups.
So now I'm thinking about implementing one, but my question is how to do
the actual random number generation in the SVM. Using the randb value
will probably give correlation issues, so the best approach would be to
actually get a separate number from the RNG. However, since the number
of random nodes used isn't known in advance, so setting aside RNG
dimensions for these is problematic (also, allocating several dimensions
per bounce only for the nodes is quite a waste since it reduces quality
for the other values).
So far, my best idea was to hash the randb value and use the resulting
value as a seed for a LCG, however, for this every Random Node would
have to carry an unique ID. However, the resulting samples wouldn't be
as well-distributed as regular RNG samples...
So, do you think the hashing idea would work, would you use another
approach or not add a Random Node at all?
Lukas Stockner
More information about the Bf-cycles
mailing list