PDA

View Full Version : Car Rig "MaxScript for Speed" Carbon ;)


Fabiomussarela
06-04-2007, 01:19 PM
Hi :)

Iīve posted a realtime car rig thread on maxScript forum, but as the name said, itīs a rig topic, so Iīm posting here too.

This solution isnīt good for production but Itīs something I was thinking about how to do it and itīs a little fun to play :)

Itīs a realtime car control, You animate it like on a video game.

Theres no path animation just maths going on.

I will implement a way of max saving the animation along timeline.

http://usuarios.cmg.com.br/%7Ehp-mussarlz/RealtimeCar.jpg

Iīm making my personal home page, it will be online soon and Iīll make a kind of tutorial/explanation of this car rig approach.

Any comments and ideas for this will be appreciated.
Thanks :)


YouTube Link:
http://www.youtube.com/watch?v=BOXYGtEEVKU


.mov Demo Link:
http://usuarios.cmg.com.br/~hp-mussarlz/FabioMussaRLZ_RealtimeCar.zip (http://usuarios.cmg.com.br/%7Ehp-mussarlz/FabioMussaRLZ_RealtimeCar.zip)


.

fferro2
06-04-2007, 05:02 PM
Hi Fabio,
Good Work!

Don't you think better to use a joystick instead of spinners?
It would be impossible to control direction and velocity at the same time with 2 spinners.
I would like to see you at www.reconstruccionvirtual.com (http://www.reconstruccionvirtual.com) a forensic animators site in spanish/brasilian with a couple of MXS users.

Thank you
Fernando Ferro
Buenos Aires

PEN
06-04-2007, 08:34 PM
Nice work, looks like a lot of fun to play with.

wamo
06-05-2007, 08:29 AM
hey man,i like your realtime car rig,it's looks awesome to play with
can you discribe us a bit more to know how to doing that?

Aearon
06-05-2007, 08:10 PM
like i said before fabio, really cool stuff :)

i'd like to see more details as well

Fabiomussarela
06-06-2007, 03:03 PM
Hi, thanks everyone, Glad you guys enjoyed. I Liked the joystick idea (Thanks Fernando) :)


I will implement this control to drive the car, just donīt have the time now. :(


Iīm also figuring a way of saving the car animation thru time.



http://usuarios.cmg.com.br/%7Ehp-mussarlz/NewInterface.jpg

You Tube link:
http://www.youtube.com/watch?v=S3JWu9sofSQ


.mpg link

(http://usuarios.cmg.com.br/%7Ehp-mussarlz/FabioMussaRLZ_RealtimeCar.zip)http://usuarios.cmg.com.br/~hp-mussarlz/CarRigNewInterface.zip (http://usuarios.cmg.com.br/%7Ehp-mussarlz/CarRigNewInterface.zip)
(http://usuarios.cmg.com.br/%7Ehp-mussarlz/FabioMussaRLZ_RealtimeCar.zip)

Fabio da Costa
06-06-2007, 05:50 PM
Amazing script.
If you could add the capability of converting the realtime animation into keyframes, it would be grate. A joystick/keyboard integration would de fantastic too. But the script is really cool already.

That's my friend showing what he does best.

Just keep it up, man.:thumbsup:

fferro2
06-06-2007, 06:27 PM
Iīm also figuring a way of saving the car animation thru time.


It's easy to transform the trayectory in a spline. Some keyframes through animationRange and that's all.

EricDLegare
06-07-2007, 01:39 AM
OMG :D

how do you do this kind of UI control ? this kind of round graph thing ...

Would be awesome for morph blending :D

Fabiomussarela
06-07-2007, 05:23 AM
Hi Eric, this graph is just a bitmap image as a background of a rollout, the center quad is a checkbutton!

Iīm driving the spinner values on the "Pos" rollout with the position of the quad button.

Thereīs some math going on to return the center position of the quad button as [0,0]


Itīs a little bit snappy, but this way is much better to control the car

Here is another test.


http://usuarios.cmg.com.br/%7Ehp-mussarlz/RealTimeCar2.jpg

YouTube Link:

http://www.youtube.com/watch?v=T9f-3hKA2kk (http://www.youtube.com/watch?v=T9f-3hKA2kk)

.mov Link:
http://usuarios.cmg.com.br/~hp-mussarlz/CarDemo3_Joystick.zip (http://usuarios.cmg.com.br/%7Ehp-mussarlz/CarDemo3_Joystick.zip)

EricDLegare
06-07-2007, 12:01 PM
Oh :sad:


I tought it was a custum UI item that could be placed anywhere in a rollout and have a local position :D


Anyway thanks !

fferro2
06-07-2007, 04:31 PM
Hi Fabiomussarela,

I remember a good implementation of scripted manipulators, Bobo (as always ;-) did this:

The Joystick Manipulator is a Scripted Manipulator Plug-in.
It provides

Joystick-like Manipulator with X and Y values.
Separate Min. and Max. values for X and Y axes.
Auto-Center Option for interactive controlling.
Optional User Defined Colors
Option to copy Colors from other Joysticks, Spinners, Dials and SuperSliders
http://img406.imageshack.us/img406/9136/joystickmanipulatorhq8.gif

As you see the screenshot, its very similar what you are implementing but easy to customize and with standard wire controls.

the link to this manipulator (as others similar):
http://www.scriptspot.com/bobo/
clicking on MAXScript 4 at the menu

Also there is a script to see the trajectory of a non selected object in real time.
I guess it could be the solution to get the trayectory as you want.


http://img124.imageshack.us/img124/1175/santatrajectorylimiterrd0.jpg

link to Susanta Dutta (authors page) to download it:
http://santascript.blogspot.com/

Fabiomussarela
06-08-2007, 04:19 PM
Hi Ferro, thanks for pointing me to those scripts :)

The Boboīs scripted manipulator is awesome :) Iīll try it with the car.

Santaīs scripts are pretty cool too! :) but I think it wonīt work with my aproach!

The script needs to know more than just the path that the car is going. Needs some vectors, orientations and other stuff.

As soon as I got time , Iīll be posting some more new stuff :)

Thank you for posting those infos , images and links :)


Hereīs the UI Control code , If someone want to use it or improve it :)



xControls = 0

rollout xValues "Pos"
(
spinner xDir "X" range:[-50,50,0]
spinner yDir "Y" range:[-50,50,0]

on xValues close do
(
destroyDialog xControls
)

)
createDialog xValues 100 70

rollout xControls "rollout"
(

checkButton btn "" checked: false width:10 height:10 pos:[45,45]

on xControls mousemove xPos do
(
mouseNewPos = xPos

if btn.checked == on do
(
lastPos = mouseNewPos - [5,5]
btn.pos = lastPos

xValues.xDir.value = (((mouseNewPos.y)-50)*-1)
xValues.yDir.value = (mouseNewPos.x)-50
)
)

on btn rightClick do
(
btn.pos = [45,45]
btn.checked = off
xValues.xDir.value = 0
xValues.yDir.value = 0
)

)
createDialog xControls 100 100

CGTalk Moderation
06-08-2007, 04:19 PM
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.