View Full Version : "MaxScript for Speed" Carbon ;)
Fabiomussarela 06-04-2007, 02:49 AM Hi :)
Well, I donīt think this kind of approach is 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 Link:
http://usuarios.cmg.com.br/~hp-mussarlz/FabioMussaRLZ_RealtimeCar.zip (http://usuarios.cmg.com.br/%7Ehp-mussarlz/FabioMussaRLZ_RealtimeCar.zip)
.
|
|
s-rajesh78
06-04-2007, 05:32 AM
looks lot of fun to play with..Good work :) and lot of maths involved i guess.. :) im interested in learning how you did this inside max and waiting for that tutorial..
Seems similar to one CAR plugin for max, dont remember the name though..
Looks like fun to code and to use.
I am looking forward to a battle of the carrigs:
500 miles of cgtalk
Georg
davestewart
06-04-2007, 11:10 AM
Great stuff! I see the next MaxScript Challenge coming on...
marciowski
06-04-2007, 12:40 PM
very good, man!
You should sell it or give it away to the community.
Great work
timothyc
06-05-2007, 05:10 AM
Heh heh. You should equip it with machine guns, some simple AI for pursuing cars in front and eluding cars behind, then put TWO cars in the same arena and let them go at it!
TC
Fabiomussarela
06-06-2007, 02:08 PM
Hi, thanks everyone, Glad you guys enjoyed. :)
A guy in the rigging forum suggested me to use a joystick controller instead of spinners, so
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 (http://www.youtube.com/watch?v=S3JWu9sofSQ)
.mpg link
http://usuarios.cmg.com.br/~hp-mussarlz/CarRigNewInterface.zip (http://usuarios.cmg.com.br/%7Ehp-mussarlz/CarRigNewInterface.zip)
.
I don't want to rain on your parade but this exists in the book Mastering the Art of Production with 3ds max 4 (2001). It supplies code for controlling and baking in realtime steering of a car.
Looks like yours may have a better interface so carry on and good luck!
Khye
Fabiomussarela
06-07-2007, 04:26 AM
Hi Khye, no problem :)
I did not know that book, would you describe more about it? Itīs always good to see other aproachs :)
My rig is 100% driven by math formulas, theres no path, constraints or other stuff.
Iīm using ray casting for the terrain orientation.
Hereīs another test, now with the "joystick" interface.
http://usuarios.cmg.com.br/%7Ehp-mussarlz/RealTimeCar2.jpg
YouTube Link:
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)
shahabsy
06-07-2007, 07:25 AM
good work man, i like ur work.
and looking for its script download link.:)..
davestewart
06-07-2007, 08:13 AM
Hey Fabio,
That joystick control looks like it works well. Good choice!
I did something similar with a Flash control a while back. Is it a dot net control, or native to max?
(Now let's get some machine guns in there like timothyc suggested!)
Dave
Fabiomussarela
06-08-2007, 02:44 PM
Hi shahabsy, thanks :) My script itīs very messy at the moment (my fault) and itīs not an one click solution, Iīm still have a lot of work to do :)
Hi Dave :) The "joystick" iīm using itīs a kind of hack, itīs not .NET and not native to max, actualy itīs some native max stuff working togheter :)
The graph is just an image as a background of a rollout , the center quad is a checkbutton.
Iīm using the mouse pos relative to the rollout to update the checkbutton and then the checkbutton position and some math behind to drive the values on the "Pos" rollout, the one that have the spinners.
The result is usable but not very acurate, itīs a little bit snappy due to the size of the checkbutton.
If I make the checkbuttun really small, it reduces the snappy problem.
Iīll keep trying some new stuff :)
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
davestewart
06-08-2007, 06:19 PM
I've updated the Flash AxisControl I put online (nearly 5 years ago now)! It's now much nicer ActionScript 1.0, and the source code is all available to edit on the root timeline in the .fla.
Download the attached files, and you should have a nice functional joystick, complete with mouseover effects and a gentle slowdown when you release.#
Just make sure to edit the path to the .swf file before you run the script.
Cheers,
Dave
EDIT - Just replaced the .zip: the Flash control now passes normalized values to 3dsmax (-1.0 to +1.0), as well as the coordinate system being in max's native (positive y)
Joel Hooks
06-20-2007, 02:43 AM
I've updated the Flash AxisControl I put online (nearly 5 years ago now)! It's now much nicer ActionScript 1.0, and the source code is all available to edit on the root timeline in the .fla.
That is outrageously cool.
Are there any docs on ShockwaveFlash.ShockwaveFlash.9 (google. my friend (http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_12059&sliceId=1)) - I'd like to see what I can dig into. I'd be curious if I could use AS3 for this sort of operation.
Coolest thing I've seen all week!
I think you could make a lot of nice interface elements with this.
davestewart
06-20-2007, 09:42 AM
Hey Joel,
You may also want to look into ExternalInterface to send commands. I didn't get round to updating the Flash for this, but may do at some point.
http://livedocs.macromedia.com/flash/8/main/00002200.html
http://discussion.autodesk.com/thread.jspa?messageID=5335343
http://discussion.autodesk.com/thread.jspa?messageID=5413642
To be honest, I don't think AS3 would bring anything to the party. At the end of the day you're just simply sending very simple datatypes from one app to the other. I don't think Flash or Max would care, and things are at least simpler with AS2 as you can keep everything on the timeline.
Joel Hooks
06-20-2007, 04:09 PM
I entered actionscript at AS3, so it is more comfortable for me. I think you are correct in that it doesn't provide any functional advantage in this case.
*hates the flash timeline*
;)
Thanks for the inspiration and the resource links!
davestewart
06-20-2007, 11:43 PM
*hates the flash timeline*
Ha, ha! Well it certainly has it's uses, and you have more flexibility if you can love both! Glad you like it anyway.
Be sure to post any coolness you come up with too :D
Bluedude
08-17-2007, 06:46 PM
Is it possible to put that up for download, never mind how unfinished it is? Also, does it do realistic jumps? I would really appreciate a download, because I do 3ds max as a hobby, after school and stuff, and Toy car is getting boring because of the lack of control.
PLEASE!!!
BlueDude
:bounce: :bounce: :bounce: :bounce:
Bluedude
08-17-2007, 07:16 PM
I think it'd be a good idea if you posted a downloadable version of this, even if it's not ready. I'd like to learn from it, and use it. Does it work realistically on jumps?
BlueDude
:bounce: :bounce: :bounce: :bounce:
martinB
08-19-2007, 11:10 AM
Hi :)
Well, I donīt think this kind of approach is 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.
.
Looks great, I am definitely interested in how you set up the rig.
Please let us know when you have your webpage online.
-- MartinB
CGTalk Moderation
08-19-2007, 11:10 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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.