controlling the percentage of "randomize by range" ?

Discussions about SOFTIMAGEs© Interactive Creative Environment©
Post Reply
seb4d
Posts: 21
Joined: 22 Oct 2012, 12:37

controlling the percentage of "randomize by range" ?

Post by seb4d » 10 Dec 2012, 19:09

Hi,

I have a basic pointcloud with instanced shapes (10 meshes). I used "randomize value by range" but I would need more control on it.
For example my client asked me to see more instances of 2 ou 3 specific shapes.
So I was thinking of a way to control the percentage of each shape to be instanced in the randomize node. Unfortunately I am not a code master at all and don't know how to do that.
Any idea would be much appreciated !

Butachan
Posts: 23
Joined: 31 Jul 2012, 10:48

Re: controlling the percentage of "randomize by range" ?

Post by Butachan » 10 Dec 2012, 20:43

go inside the randomize value by range compound and find the random value node. There you can change the Distribution Type to profile curve....which will give perfect control on what you want..... I hope this solve your problem.

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia
Contact:

Re: controlling the percentage of "randomize by range" ?

Post by Mathaeus » 10 Dec 2012, 20:45

well, old fashion way is to just make a desired ratio in group that you're using for instancing, by making duplicates.
Another, not so precise way, is to set 'randomize by range' in 0-1 range, plug result into fCurve node, multiply output to number of group members. By fCurve, you're editing the ratio.

seb4d
Posts: 21
Joined: 22 Oct 2012, 12:37

Re: controlling the percentage of "randomize by range" ?

Post by seb4d » 10 Dec 2012, 21:06

ok, the "old fashion way" does the trick, not so clean but at least it works :)

FCurves seem impossible to control correctly.
I'd be very interested to know if precise percentage can be achieved.

thanks for your help guys

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia
Contact:

Re: controlling the percentage of "randomize by range" ?

Post by Mathaeus » 10 Dec 2012, 21:39

seb4d wrote: I'd be very interested to know if precise percentage can be achieved.
you can do something like, if modulo by 10 of self ID returns 0, index of shape instance is something specific - that is ten percent, or 'every nth particle" factory node. set to 10. However if you want some more complex structure, you'll have a huge ICE tree, full of modulo and logic nodes. Not easy to figure out a few weeks later. So I think the best way is some variance of "old fashion way". Fancy way could be some kind of 'pattern table', where user is able to draw a pattern.

seb4d
Posts: 21
Joined: 22 Oct 2012, 12:37

Re: controlling the percentage of "randomize by range" ?

Post by seb4d » 11 Dec 2012, 19:46

Way too complex for me, I'm not a maths guru at all... :(

This solution seems to be exactly what I need :
http://xsisupport.com/2012/12/11/random ... abilities/

An easy and intuitive UI would be like this :
_Plug all your mesh nodes in an "InstancesWeights" node, then set their weight value inside
_Plug this "InstancesWeights" node in the "Set Instance Geometry" node

Post Reply

Who is online

Users browsing this forum: Yandex [Bot] and 44 guests