View unanswered posts | View active topics


Post a new topicPost a reply
Previous topic | Next topic 

User avatar   Trained Modder Trained ModderMember since: 20.04.2009, 10:12Posts: 206Location: Earth Likes: 2
 

 Post Topic: Looking for good wheeled vehicle tutuorial
PostPosted 27.05.2010, 11:34 
Greetings All Great Forumers,

Like i said I'm looking for good wheeled vehicle tutorial.

I have custom wheeled vehicles i need working yesterday. Any help is greatly appreciated.

THX
KAKU


In this world that you have entered, Things are rarely as they seem.

http://www.kirknowak.com

User avatar   Trained Modder Trained ModderMember since: 01.02.2009, 12:25Posts: 295Location: Australia Likes: 4
 

 Post Topic:
PostPosted 27.05.2010, 15:09 
I know you did that helicopter tutorial, and the same principles apply, but you do have to do a bit of digging to get wheeled vehicles set up properly.
But once you know how to do it, it's extremely simple.

I probably should do a tutorial myself, but been flat out on other things (check my moddb profile pictures for a "small" glimpse kaku ;) )

I'm not going to write a full blown tutorial right now since you know most of what you need to do already since you followed that helicopter tutorial before.

So for this case, I'm going to assume that you've made a very VERY basic vehicle.
This vehicle has a chassis that is pretty much a box. It also has 4 wheels.

The chassis can be named whatever you like, it really doesn't matter, you could call it "bob" if you really wanted to.
But since it's usually good to stick with proper naming conventions, you should called the body of the vehicle "Hull".

Clone the hull as a copy, and name this copy "Hull_proxy".

Now before I go on, you could actually name the wheels whatever you like if you edited the script file to use those names, however for the purpose of this little tutorial, you will use the naming convention used on a vehicle script file already used in Crysis.

So go into the Cryengine, drag and drop the Civ_Car into the level and open the vehicle up in the vehicle editor).
Go to "Save As.." and name the save file to whatever your vehicle will be called.
Restart the cryengine, drag and drop your new vehicle down into the editor, then open it up in the vehicle editor again.

Click on the little check box that says "Wheels".

A bunch of little wheel icons will appear in the structure list, each named "wheel01" through to "wheel04". (Don't shut down the editor or vehicle window just yet though).
So now you know what to name your wheels. (NOTE: For the LTV, I believe it's just "wheel1" through to "wheel4")

Now go back to 3ds max and name your wheels just like below:
wheel01 is your front left wheel
wheel02 is your front right wheel
wheel03 is your rear left wheel
wheel04 is your rear right wheel
(NOTE: Also make sure that your wheels pivot points are centered, so that you don't get wierd wobbly wheels....unless that's what you want)

Now go and set up your multi-material the way you want it to be set up.
Your wheels material doesn't need a special set up, it's just the same as any other material, using the cryshader with default physicalize settings.

Now create a dummy and call it "hull" or...body, or whatever you want...once again this doesn't matter.

Now you will want to make a drivers seat, so hopping back over to your vehicle in the cryengine, click on "driver" in the structure list.
You will notice where it says "enterHelper" the value is "passenger01_enter_pos", and where it says "sitHelper" the value is "passenger01_seat_pos".

As far as I can tell, the enterHelper is only for the AI, so that they have to move to the location of the enterHelper in order to get in the vehicle, otherwise if you don't have that helper, they will just walk directly to the vehicle and hop in wherever, which may look a bit odd.

So back in 3ds max, create a dummy called "passenger01_seat_pos" and place this where you want the drive to be seated. (NOTE: This will take some testing in order to find the right spot).
If you want to create the passenger01_enter_pos, you can do that too, but it is not necessary for this example.

Now, I haven't needed to set up things like the steering wheel, or lights, or particles, but I can guess that by ticking the Vehicle Helpers tickbox you should be able to find things like the exhaust point, engine smoke, light positions etc.
For the steering wheel, I can only assume that on your 3ds max model you need to make a steeringwheel called...."steeringWheel" with a pivot point that has been centered just like your wheels.
The only thing that might be different though is that unlike the wheels, the steeringwheel is of the class "AnimatedJoint" which makes me think that you might actually have to set up a joint for it...I don't know how to rig in 3ds max so i'll just skip over that bit.

I guess that now you've got a hull, a hull_proxy, 4 wheels, a dummy named hull, and a dummy for your drivers seat, you can select all of your mesh (not the dummies) and reset the XForms on them, then convert them to editable polys.

After that, link the hull mesh and hull_proxy mesh up to the hull dummy, and also link the sit position dummy up to the hull dummy.
Link the wheels to the hull mesh.

After linking it all up, save your max file to the location where your materials etc will be going.
Export the materials.
Then export the actual object as you did it with the helicopter.

Now you need to jump back over to the cryengine, go to the vehicle editor that should still have your vehicle file open, click on the part that says "body" right at the top.
In the properties, open up the "animated" section, go to the filename parameter and open up your cga file that you just exported out of 3ds max.
If you have a destroyed verson of the vehicle, change the filenameDestroyed file aswell.
If you don't have a destroyed verson, just use the same one as in filename.

Then save your vehicle file to update it.
Your new vehicle should appear instead of the old civ car model.

Now you should be able be able to jump in your new vehicle and drive it around.
If you find that it tips over and has problems like that. Open up the vehicle editor with your vehicle again, click on "massBox" in the Structure, then resize and move the massbox to where you want the mass of your vehicle to be.
(NOTE: If you have a vehicle which is skinny at the front, and chunk at the back, and your mass is at the back, your vehicle will probably just flip over backwards. So try to move the mass forward and cover the whole vehicle's base unless you want the vehicle to do a backflip :P)

And that should be all there is to it.
Once again, I really should write a proper tutorial with pictures, instead of just blabbing about it like a broken record, but hopefully this blabber will get you through the basics at least.


User avatar   Beginner BeginnerMember since: 05.12.2009, 17:36Posts: 59Location: Foggy Bottom Likes: 0
 

 Post Topic:
PostPosted 28.05.2010, 20:14 
Nice write-up, otreum. BTW.. if anyone is working on a vehicle with only one wheel in the front (like a trike) you'll find you can only turn the wheel one way. One fix is to make a second front wheel really small and hide it in the other front wheel with no textures applied. Now you can turn the wheel both ways.
User avatar   Trained Modder Trained ModderMember since: 20.04.2009, 10:12Posts: 206Location: Earth Likes: 2
 

 Post Topic: Big Thx
PostPosted 28.05.2010, 22:09 
Otreum,
Thanks once again for the info and also to Samosa. That's right on what i'm doing the Uni-Wheel vehicle. I'll be slamming through that this weekend. I did some initial test and had the same isues you had with your test of a single wheel vic, but i will figure this out. thanks again for all your help.

KAKU


In this world that you have entered, Things are rarely as they seem.

http://www.kirknowak.com
User avatar   Trained Modder Trained ModderMember since: 01.02.2009, 12:25Posts: 295Location: Australia Likes: 4
 

 Post Topic:
PostPosted 29.05.2010, 01:14 
I can only assume that to do the one wheel turning two ways that you can edit the vehicle config to get the wheel to turn both ways. I haven't done that yet though.


User avatar   Trained Modder Trained ModderMember since: 20.04.2009, 10:12Posts: 206Location: Earth Likes: 2
 

 Post Topic: Colosseum
PostPosted 29.05.2010, 02:57 
Hey Otreum,
BTW I forgot to tell you I really dig the Colosseum!!! How many polys in there LOL. Are you going to texture it as well? At this stage looks really nice. You could probably get away with just basic materials that is unless you started unwrapping already.

THX for the tute! it's helping alot but of course the UN-Wheel is being a bitch, I tried combining the wheels like Samosa suggested and also setting the positions more like a motorcycle but there are still issues. I will get it working. THX Again.

KAKU


In this world that you have entered, Things are rarely as they seem.

http://www.kirknowak.com
User avatar   Trained Modder Trained ModderMember since: 01.02.2009, 12:25Posts: 295Location: Australia Likes: 4
 

 Post Topic:
PostPosted 29.05.2010, 13:52 
I'll have to go check out how many polys it has, but i'll just say that the engine can handle several duplications of that model ;).
It is about my 20th attempt at creating it aswell (that's not an overstatement)....unfortunately, there will be another attempt, as I need to redo the whole thing again....but I don't mind...next time it will be better.

If you want to discuss the project with me, I don't mind talking about it via pm as I want to keep the project a bit of a mystery to the public for the time being.

Back on topic, I'll have to look more into getting that uniwheel working, it's really bugging me, it should be so simple to do, yet it's so difficult :P

One way i'm thinking is to make maybe 2 wheels, side by side to one another so that they look like one wheel, but I know that due to the physical reactions on surfaces, there will be issues.
You would have to make the wheels indestructable, you would have to make them with probably no damping or suspension etc

Seriously though, I think the best way would be to try and find the code for wheels, and program a wheel which can turn two ways.
The actual code part would be simple, but actually finding what to edit is the difficult part for us newbies.


User avatar   Beginner BeginnerMember since: 05.12.2009, 17:36Posts: 59Location: Foggy Bottom Likes: 0
 

 Post Topic:
PostPosted 29.05.2010, 15:35 
I can only assume that to do the one wheel turning two ways that you can edit the vehicle config to get the wheel to turn both ways. I haven't done that yet though.

Interesting if that can be done. I'll have to check into that. The problem I ran into was getting the front fender/fork/handlebars to turn L/R with the wheel.


Last edited by Samosa on 29.05.2010, 15:37, edited 1 time in total.
User avatar   Beginner BeginnerMember since: 17.09.2008, 11:14Posts: 54Location: Vancouver Likes: 1
 

 Post Topic: Thanks for the tut.
PostPosted 28.01.2011, 01:32 
Hey otreum,

Thanks for the tutorial. I got snagged in a few places but made it through. I would really love a more detailed version that explains more about custom vehicle creation. Is there one around here anywhere?

Thanks!


ASUS Notebook G73Jh Series
Intel Core i7 CPU
8 GB RAM
64 Bit Windows 7 Home Premium
User avatar   Uber Modder Uber ModderMember since: 06.02.2009, 18:11Posts: 2350Location: United States Likes: 5
 

 Post Topic:
PostPosted 28.01.2011, 01:36 
Otreum - I must say that was very impressive. I'd suggest if you want to make a full detailed tutorial (including images even) head over to the wiki. Also drop a PM to Liam to get it featured on the news, very newsworthy :D (or me, I could make sure it happens)
User avatar   Beginner BeginnerMember since: 17.09.2008, 11:14Posts: 54Location: Vancouver Likes: 1
 

 Post Topic:
PostPosted 28.01.2011, 02:22 
Thanks Boombear for the link. It had a few more details in there. I'm an artist so I'm not all that technical, its nice when people explain things in great detail so my puny brain can comprehend ... stuff.


So I followed all the insstructions above, and I'm able to jump in my sweet custom vehicle, which currently consists of a box and 4 cylinders, but I'm unable to actually drive it. It just sits there. Any suggestions?

Thanks!

EDIT: Also... where can I find the example car in the SDK?
(I told you I was a daft artist... don't act surprised) :p


ASUS Notebook G73Jh Series
Intel Core i7 CPU
8 GB RAM
64 Bit Windows 7 Home Premium


Last edited by KrookedSaint on 28.01.2011, 02:24, edited 1 time in total.
  Trained Modder Trained ModderMember since: 05.03.2010, 17:23Posts: 369 Likes: 5
 

 Post Topic: vehicle working ingame
PostPosted 29.01.2011, 21:18 
hey otreum, thanks for tutorial, don't waste your time making tutorial, unless you want to. i will make a video tutorial soon, ill add you to credits as well for simplifying the process in detail. just got my apc in game and working :P.

krooked make sure you read all of the manual under vehicle section, download examples there and take a look. study, etc. then follow the tutorial otreum wrote. should give you a good idea.

http://doc.crymod.com/AssetCreation/VehicleSetup.html

make sure you unlink all parts seperate from "frame" and xform, then link them up or youll get weird results pics below. "parts" distorted and rearranged. weird. haven't fix it yet, but looks like a xform problem as a regular cgf model works fine when exported. make sure to export .cga and 'hull' named dummy is the top node in the exported vehicle. restart the editor not the level. just a few tips i came across, hope it helps.

EDIT: APC is fixed, like predicted don't forget to Xform Reset parts before linking and exporting vehicle.


Last edited by Architect on 02.02.2011, 09:37, edited 1 time in total.
User avatar   Hardcore Modder Hardcore ModderMember since: 23.09.2009, 19:59Posts: 999 Likes: 29
 

 Post Topic:
PostPosted 29.01.2011, 21:28 
so if i want to add a turret to a tank, does it just have to be separate and then it works? or do i have to animate it?

im asking it here, since it seems that all the people with vehicle knowledge posted in this thread ^^


  Trained Modder Trained ModderMember since: 05.03.2010, 17:23Posts: 369 Likes: 5
 

 Post Topic:
PostPosted 29.01.2011, 21:34 
no idea, but i assume you make a gun model with its fire animations and export it as a weapon with scripts, for this model adjust the vertical limits in the scripts probably, then replace the entire weapon script in the vehicle script, the vehicle system should take over the rotation stuff. just speculation, will try out the ltv model, see what happens with the gunner position. post your results here, make this the vehicle thread solution.

Edit/ there's a tank example, have a look at that, i think there was a gunner on the tank in game. should have everything you need to know. will study that later today. gotto fix my apc :(


Last edited by Architect on 29.01.2011, 21:37, edited 1 time in total.
User avatar   Beginner BeginnerMember since: 17.09.2008, 11:14Posts: 54Location: Vancouver Likes: 1
 

 Post Topic: Thanks Architect!
PostPosted 02.02.2011, 07:06 
I went through the car.max file and examined it closely. I had setup the heirarchy incorrectly. Now my crappy vehicle moves! And it flips over quite easily. I'm assuming there's a bunch of options to tune how everything handles.

YAY!


ASUS Notebook G73Jh Series
Intel Core i7 CPU
8 GB RAM
64 Bit Windows 7 Home Premium