Outerra forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Outerra Tech Demo download. Help with graphics driver issues

Author Topic: vehicle creation question  (Read 5029 times)

patmarrnc

  • Full Member
  • ***
  • Posts: 136
vehicle creation question
« on: November 23, 2017, 12:06:50 pm »

Apologies for having so many questions. I am retired and able to spend all day reading the wiki and watching videos, so it isn't as though I'm looking to be spoon fed. After investing most of the past week digging for information and trying to wrap my brain around the task of creating a vehicle, I'm still missing something.

Most of the videos start with an existing DAE model, then show how to import it and add a script.  The process is a little different for FBX, so I'm not sure whether I'm failing because I'm not importing it correctly, or if its because the model isn't created correctly.

Does the model need to be rigged? Or is it enough to have the wheels and steering wheel as separate entities that can be referenced by name in the script?

I created a primitive test car consisting of nothing but a blocky chassis, 4 wheels (named wheel_FL, wheel_FR, wheel_RR and wheel_RL  (because that's how they were named in the test script provided in the WIKI). No bones (might that be the problem? if so, any pointers on how bones should be applied to the wheels? )

I can get the car imported and showing up in the LAND options, but when I spawn it, game over. No response to the assigned script. Engine won't start. ALT E doesn't open up a script window

Any help, suggestions or links to more information are greatly appreciated.

(I'm looking for the most simple example. You guys are blowing my mind with examples of models with multiple moving parts and arrays of living creatures!)
Logged

andfly

  • Sr. Member
  • ****
  • Posts: 346
Re: vehicle creation question
« Reply #1 on: November 23, 2017, 02:19:50 pm »

I have never built terrestrial models with wheels ...

I can help you a little with what I know.

- It is not influential from an DAE or FBX model, just use the appropriate importer (they are both available by accessing the "object" menu)

- It is essential, however, to define "bone" the mesh that you want to animate: in your case the wheels.
For this reason (in the FBX importer) you must highlight the wheels mesh and click on the "convert to bone" box; the color will change from blue to orange.

- You do not need to equip the model with an Armature, it is only useful when you want to create an animation in which the mesh are "drawn" and "deformed" with the movement. In the case of wheels, axles, doors, etc., which keep their shape in motion, the Armature would be superfluous.

- Wheel parameters must be defined in the "init_chassis" function (wheelparam ... this.add_weel ...) as explained in the WIKI or as you can see in other Outerra vehicles scripts.

- I think it is also important to define the mass to give the vehicle physics a non-null parameter to act on the engine's strength. (in "init_chassis" -> return {mass: "Kg"}).

- The "update_frame" function must have the parameters (engine, brake, steering), which are the return values ​​necessary for the movement, braking and steering of the vehicle.

- Pressing "ALT - E" to edit the script is only effective with the model in action (it does not work if you are accessing the Anteworld menu).

The commands essential to movement are few and simple:

engine * = xxx; -> it is necessary to increase the "engine" value to transmit an effective thrust force (test between 50 and 5000)

this.wheel_force (-1, engine); -> transmits engine power to the wheels.

this.wheel_brake (-1, brake); -> transmits the brake effect to the wheels.

steering * = 0.6;
this.steer (0, steering);
this.steer (1, steering);
these lines serve to transmit the steering effect to the front wheels (the first two of the "this.add_wheel" commands)

this.animate_wheels (); -> if you want the wheels to rotate with the movement.

Maybe it's not all here,  but ... I do not remember anything else.

I hope to be proved helpful.
Logged
I do not know the English language. I use Google Translate. I hope it's all understandable.

patmarrnc

  • Full Member
  • ***
  • Posts: 136
Re: vehicle creation question
« Reply #2 on: November 24, 2017, 10:14:29 am »

Thanks once again for your quick and gracious response, Andfly! I spent most of last evening watching the videos on your youtube channel. You are doing the kind of things I want to do with Outerra, so your tests are particularly interesting to me.

Regarding the suggestions in your most recent response: I thought I did all of that, yet my car didn't work. 

I think it's time for me to stop asking questions and start studying the available information until it penetrates my thick skull.  Thanks again for all of your help. You probably haven't heard the last from me yet. ;-)
Logged

andfly

  • Sr. Member
  • ****
  • Posts: 346
Re: vehicle creation question
« Reply #3 on: November 24, 2017, 12:29:02 pm »

I recommend you continue to try and experiment (this is the best way to learn) and you will surely find the way to run your model!

If you think you need more direct help (now or in the future), you can export your model to "otx" (this option, together with importers, in the "objects" section of the Anteworld menu) and publish the link to download it .

I, or some of the other great and good modders, will be able to examine and advise you.

Still good fun!
Logged
I do not know the English language. I use Google Translate. I hope it's all understandable.

patmarrnc

  • Full Member
  • ***
  • Posts: 136
Re: vehicle creation question
« Reply #4 on: January 15, 2018, 01:04:37 pm »

for the sake of newbies like me who are trying to sift through years worth of posts on this site in order to learn how to create a basic functional vehicle, here is a simple bare-bones tutorial.

I've tried to include only what is absolutely necessary to make a vehicle import correctly and drive. I leave it to you to make a more interesting model and script. This is just to get you started:



in the comments under the video on youtube you will find links to more information, including the files used in the tutorial, in case you want to follow along with the video.
« Last Edit: January 15, 2018, 01:08:30 pm by patmarrnc »
Logged

Kane98

  • Jr. Member
  • *
  • Posts: 11
  • There's always a reason to smile, regardless.
Re: vehicle creation question
« Reply #5 on: March 23, 2018, 07:56:48 pm »

Thank you for this. I cannot stress how useful this is. Millions of thanks
Logged
Check out my vehicle development page here! https://forum.outerra.com/index.php?topic=3813.0

patmarrnc

  • Full Member
  • ***
  • Posts: 136
Re: vehicle creation question
« Reply #6 on: March 24, 2018, 11:48:43 am »

Thank you for this. I cannot stress how useful this is. Millions of thanks

I am very happy to hear you found it useful!  There are more tutorials and more newbie information here: http://anizu.uk/forum/viewforum.php?f=23

All of my tutorials are geared toward using Outerra as a companion product to animation software, but you might find something useful in the mix even if you aren't interested in animation.
Logged