hello,
As my first post I would it rather be of this finished but, it would seem that I need a hand in the animation side of this. :susp:
you see I want to get the barrel of my gun here spinning up/constant/down with the slider.
im currently using a script on the controller for the barrel group for the rotation.
(SLD_Spin being my slider)
dependsOn $SLD_Spin.value.controller
SpinRate = $SLD_Spin.value
degtorad((CurrentTime)*31*SpinRate)
this works for constant speeds but wont allow me to add key-frames of it, if I auto key-frame I get strange results with the spin. plus I would rather be able to control it with a single key rather than having it bunched up with others.
Using Max2010.
Thanks in advance,
~Atheistsoul
Replies
Have you tried Custom Attributes instead of a slider...you should be able to keyframe them no problem...
Also you don't need the Depends On part in the new script controllers...
Workflow:
Create a helper Object (or use the base of your gun), add an attribute Holder Modifier and use the first script I posted to create the custom attribute (it creates a spinner and slider that both are connected to the same track...not possible with the standard procedure )
Add a Float Script to the one of the Rotation Tracks of the object you want to rotate (example a Helper that is parent to your barrels...don't use Groups...they are evil...)
Create a new Variable called 'SR' in that Float Script, click on assign Track and select the SpinRate Attribute in the Attribute Holder.
use the second Script I posted.
#1
#2:
im still getting weird issues with it though. made a quick render of the spin up and down.
as you can see spinning up is ok, once it reaches its top speed in this case 1 as any more made it go crazy. after the peak is reached it seems to slow a little. With some blur this wont matter I think. but at the end the barrel seems to reverse on its self. no idea what's going on here.
Video Link.
[ame="http://www.youtube.com/watch?v=cOBgYC4Ns28"]http://www.youtube.com/watch?v=cOBgYC4Ns28[/ame]
~Atheistsoul
http://www.ehow.com/about_5108375_stroboscopic-effect.html
http://en.wikipedia.org/wiki/Stroboscope
There is a certain speed that when certain frames line up things can come to a dead stop or more commonly reverse. Which is why most film and TV shows will cut away as a car passes through that speed, or they'll shoot at a slower speed and speed up the final footage.
It's just par for the course when you're working with frames... Depending on the frame rate and the speed you can change things up to almost get rid of it. Try rendering at 15fps instead of 24, bla bla bla...
Unless anyone knows of a better way to make a spin up/down that can be controlled for animation.
~Atheistsoul