A new version of Cineversity has been launched. This legacy site and its tutorials will remain accessible for a limited transition period

Visit the New Cineversity
   
 
Clamping Xpresso Random Node
Posted: 21 April 2013 11:29 PM   [ Ignore ]  
Total Posts:  69
Joined  2006-06-20

I want to generate random numbers in expresso from 1-20.  I have attempted to pass the random node through a range mapper but because the random node generates mostly numbers above 20, the output is always 20 (at least 99% of the time)  Is there a way to generate a specific range of real numbers (or integers) randomly in Expresso?

Thanks

TAK

 Signature 

“Nothing is Easy”
     ————Jethro Tull

Profile
 
 
Posted: 21 April 2013 11:43 PM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi TAK,

So far the manual tells, it is set by default to go between -1 and +1, except it is set to “positive only” then it is 0-1, which is for decimal numbers and this means in my book the real numbers. When I write my “book”, then based on my test/experience, not on the range given later on in the “Help Content>Parameter” (-∞...+∞). “Integer” are different and really large.

To get a random range as you mentioned it, use positive only and set the input of the Range-Mapper to 0-1 and the output to 1-20.

All the best

Sassi

File Attachments
CV2_r14_drs_13_XPrn_01.c4d.zip  (File Size: 19KB - Downloads: 309)
 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 22 April 2013 12:04 AM   [ Ignore ]   [ # 2 ]  
Total Posts:  69
Joined  2006-06-20

Thanks

I was going with integers… that really messed me up.  I should have paid more attention in Math class!

TAK

 Signature 

“Nothing is Easy”
     ————Jethro Tull

Profile
 
 
Posted: 22 April 2013 12:13 AM   [ Ignore ]   [ # 3 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

You’re welcome TAK. :o)

Yes, math is certainly a key to many doors.

Good luck with the project!

Sassi

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile