PDA

View Full Version : Wiring reactor objects' properties - possible?


Kalia24
03-03-2012, 09:51 PM
Hi everyone :)
I'm now working on my degree project and I'm working on script for 3DS Max9.
Now my question - is there a way to wire Reactor object's parameter? To be more precise I want to wire 'gain' from CarWheel to Slider's 'value'. Ofc simple
paramWire.connect gainSlider[#value] newWheel[#gain] "value"
doesn't work... Only gives me error:
Runtime error: connect requires subAnims
Can anyone explain this to me?
Is there a way to make it this way or any other (I must use 3DSM9 and MaxScript)?

Kalia24
03-07-2012, 09:17 AM
Ok, maybe I'll ask it other way - I've seen people making interactive car models.
How is the speed-up/brake and turning the wheels done?

PiXeL_MoNKeY
03-08-2012, 05:23 AM
Simple answer is you can't wire to it as it isn't an animateable parameter. You would need to write code to explicitly set the value. Look up the "How do I change the text in a Text Shape dynamically? (http://docs.autodesk.com/3DSMAX/14/ENU/MAXScript%20Help%202012/files/GUID-2A321518-2745-417A-8599-19EDE58CD6A-245.htm)" FAQ item to find out about animating non-animateable parameters. Basically create a float script on a parameter you aren't using on the gainslider and then use that to set "newWheel.gain = gainslider.value".

On your other question, you could look at the example from Paul Neale here (http://www.paulneale.com/tutorials/custAttributes/customAttributes.htm), which is based around the math of making a wheel spin based on the distance traveled.

-Eric

Kalia24
03-08-2012, 09:28 AM
Thanks a lot :)
I've searched the documentation for Reactor-regarding stuff and found nothing - didn't think the solution to this may be about text animating xD I hope it'll help. I'll check it as soon as I get to my desktop again.

The second thing is not for me - I have to use the Reactor for the model. But maybe it'll be helpful some other time.

Thanks once more :)

PEN
03-08-2012, 12:09 PM
I wound use reactor car to make this work. I would just set it all up with script controllers and ca defs.

Kalia24
03-08-2012, 04:56 PM
Sure, that would be the easiest way, but my degree project forces me to do it other way (using springs etc.) :P

Kalia24
03-19-2012, 08:45 PM
Look up the "How do I change the text in a Text Shape dynamically? (http://docs.autodesk.com/3DSMAX/14/ENU/MAXScript%20Help%202012/files/GUID-2A321518-2745-417A-8599-19EDE58CD6A-245.htm)" FAQ item to find out about animating non-animateable parameters. Basically create a float script on a parameter you aren't using on the gainslider and then use that to set "newWheel.gain = gainslider.value".
Unfortunately, there's an issue that carwheel has no 'animatable' properties, to which the floating script can be assigned...
Check up "text : shape" and "carwheel : helper":[/url]
[url]http://www.kxcad.net/autodesk/Autodesk_MAXScript_Reference_9/ (http://www.kxcad.net/autodesk/Autodesk_MAXScript_Reference_9/text_shape.htm)
On your other question, you could look at the example from Paul Neale here (http://www.paulneale.com/tutorials/custAttributes/customAttributes.htm), which is based around the math of making a wheel spin based on the distance traveled.
I' ve forgotten to add: and have to use Reactor...

So still the same: anyone have any idea if I can manipulate the carwheel properties like gain/velocity and its turns?

PiXeL_MoNKeY
03-19-2012, 10:02 PM
Then, create a dummy object or Custom Attribute to drive it.

-Eric

Kalia24
03-20-2012, 09:59 PM
Then, create a dummy object
Sorry, I don't get it - how can some object help me animate other objects parameter, which I can't link to it?... Sorry for (probably) stupid questions, but it's my first project using Maxscript.
or Custom Attribute to drive it.
Not working - the targeted property (gain) seems to ignore changes in slider bound to it through the artificial attribute...

denisT
03-20-2012, 10:12 PM
I' ve forgotten to add: and have to use Reactor...

using only Reactor controllers you can't cover any situation... for example there will be a problem to set it up when the wheel changes its radius in time.

Kalia24
03-20-2012, 10:23 PM
So then... crap...
Thanks to all of you for helping - maybe u didn't help me solve this unsolvable issue, but u helped me learn a lot, really :)

Kalia24
03-21-2012, 09:12 AM
Yet it IS working O.O
I don't know how did I check it yesterday, but it actually works!!!
Oh my... Guys, I love u all! Thanks soooooo much :D

dafferson
03-21-2012, 01:49 PM
You can't do it realtime AFAIK, but you can set values for speed, gain etc, animate to where you want to start braking/speeding up, then change parameters and animate again from there.
If you attach the front wheels to geometry helpers which in turn are attached to the carbody with angular dashpots, you can turn by setting the dashpot.childtransform.
I'm writing a reactor multi-rig create/config/control script. I'll post it here when it's done, in a month or so. Hope this helps,

David

Kalia24
03-21-2012, 08:06 PM
You can't do it realtime AFAIK, but you can set values for speed, gain etc, animate to where you want to start braking/speeding up, then change parameters and animate again from there.
Seems u're right... Nevertheless - it's much easier now to set the (both!) wheels properties (at the same time) than when I had to select them and set independently.
As for the animation - I've read somewhere that the best way is to animate f.ex. 1-60 range, then change properties and animate 50-100 (re-animate <lol> about 10 keyframes) to get smooth animation. Is that correct? Never tried that.
If you attach the front wheels to geometry helpers which in turn are attached to the carbody with angular dashpots, you can turn by setting the dashpot.childtransform.
My wheels are connected by carwheel helper and it's enough to turn its parentspace - checked that already - with no need of additional dashpots. Though there's the same issue: there is no way to animate them real-time...
I'm writing a reactor multi-rig create/config/control script. I'll post it here when it's done, in a month or so.
U'll be more than welcome :) I'm sure it will help many newbies like me.

dafferson
03-22-2012, 01:17 AM
Hi,

I've put my work in progress on http://zwartd.home.xs4all.nl/3d/3d.html (Vehikulator)
I might learn something from feedback :) Please ignore the globals and includes.

CGTalk Moderation
03-22-2012, 01:17 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.