PDA

View Full Version : Locking ratio between values


Visualtricks
02-12-2010, 08:05 PM
Hi everyone !
I'm a little stuck..maybe i'm drowning in a inch of water but.. you know..i'm looping :)
I've a little xpresso setup attached to a null with some userdata sliders and stuff, let's say i have value1, value2 and a button. What i'm trying to do is to lock the ratio between the two values but only while the button is checked, pretty much like the lock ratio in render setting output panel. The only difference here is that the values are passed to a coffee node that should do some math to keep the ratio constant.
So far i've managed to store the ratio value at the moment the button is checked (with a freeze node) and this kind work but in a strange way. I'm still confused on how to code the coffee node, or if maybe there's a better way, and how to make the sliders move together when ratio is locked..

Any help or advice is very much aprecciated, i will attach a simplified version of the setup.

Thanks!
Visualtricks

tcastudios
02-12-2010, 08:56 PM
Please have a look at attached scene for an example.

Cheers
Lennart

Visualtricks
02-12-2010, 09:34 PM
Hey thanks for the fast reply, and the file of course! this will surely help.

So at first glance: the global variable you declare on top in my case would be the calculated ratio, right ? And you scale only one of the values, not both. I will dig into..

thanks

Visualtricks
02-17-2010, 11:15 AM
Hi Lennart, again thanks for the help, it was precious ! This is by the way the file i've been working on (still has some problems but it mainly works): an automated studio shot setup for vray 1.2:

http://www.c4dzone.com/it/download/modelli-6/vray-1-2-studio-setup-644.htm

cheers
Massimiliano

tcastudios
02-17-2010, 11:25 AM
Ah, looks great!
Haven't had the time to install Vray1.2 just yet.
I'll check it out when.

Cheers
Lennart

CGTalk Moderation
02-17-2010, 11:25 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.