PDA

View Full Version : Random node with FPrime



ASCIISkull
11-26-2009, 10:29 PM
I was experimenting with Dpont's random node for surfacing a crowd simulation, using the node to choose one of several textures for each character in the mass.

It works just as expected in lightwaves render, but not with FPrime- instead of choosing a single texture per instance it applies several, looking just as if there were differently textured, coplanar objects there.

I was wondering if there was either a way to get it to work, or if not if there is another good way to set up a random texture per object instance which works with FPrime.

dpont
12-02-2009, 08:44 AM
If you are using "Object" mode in Random node
applied to cloned object, it should work with FPrime.
At least with a recent version of DPKit.

Denis.

ASCIISkull
12-03-2009, 01:21 AM
I'll try updating, then. Thanks!

ASCIISkull
12-05-2009, 01:18 PM
...ack, spoke too soon. When testing it I left in my kludgy workaround instead of reconnecting the random node. I'll post the result in a moment.

ASCIISkull
12-05-2009, 03:06 PM
I installed the updated DPkit, and plugged the random(by object) output into a simple stepped gradient, coloring every clone differently.

This is with LW standard renderer:
http://img.photobucket.com/albums/v606/MoireMortemaine/test1a.jpg

And this is with FPrime:
http://img.photobucket.com/albums/v606/MoireMortemaine/test1b.jpg

It appears almost as it it is re-evaluating the random value as it refines, since it starts out looking the same as the lightwave render with the artifacts appearing with each refinement pass.

dpont
12-05-2009, 03:54 PM
Random node with "Object" mode is safe with Multithreading
and LW Render, but never tested with FPrime and MT,
if you are Multicore, try one thread only,
this is not guaranted, I think that I could not solve this.

Denis.

ASCIISkull
12-08-2009, 04:50 PM
Ah well! Any thoughts on a workaround? Right now the best I've thought of is to multiply the clone index by a different number for each texture(head,body, hair) which seems to work reasonably well with a repeating gradient.

dpont
12-09-2009, 01:35 AM
This issue can be reproduced on a single core,
but seeing your result, it is surely related to
specific use of Multithreading by FPrime
but on a multicore machine,
the only workaround for Random node
then is in my previous post, I would
know if that fixes the problem for you (?)

You could try other settings with
an ObjectID output in a procedural,
just a thought...


Denis.

ASCIISkull
12-09-2009, 01:18 PM
You could try other settings with
an ObjectID output in a procedural,
just a thought...

This does seem to work.