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: Kane's Vehicle Topic  (Read 892 times)

Kane98

  • Newbie
  • Posts: 7
  • There's always a reason to smile, regardless.
Kane's Vehicle Topic
« on: March 27, 2018, 03:22:02 am »

Hello everyone. I have been toying around. Therefore I decided that when I upload a vehicle it will be on a megathread, thus preventing useless clutter on the forum page. So here's what I got so far! I have a 1998 Dodge Durango XLT and a 1995 Toyota Corolla http://www.mediafire.com/file/xg3bdb7r97t5bvh/Corolla.Kane98.otx
http://www.mediafire.com/file/u1o43829ejuoul2/Durango.Kane98.otx

These are far from finished, notify me of any bugs ore errors withing "my" script. I used Patmarrnc's tutorial car script and adapted it so its messy.

Images are on the Outerra Discord I cant get them to work for some reason.
« Last Edit: March 27, 2018, 03:28:36 am by Kane98 »
Logged
Check out my vehicle development page here! https://forum.outerra.com/index.php?topic=3813.0

Acetone

  • Hero Member
  • *****
  • Posts: 951
    • Youtube channel
Re: Kane's Vehicle Topic
« Reply #1 on: March 27, 2018, 12:33:58 pm »

Hey, welcome :)

Here is your picture:
Logged

Kane98

  • Newbie
  • Posts: 7
  • There's always a reason to smile, regardless.
Re: Kane's Vehicle Topic
« Reply #2 on: March 27, 2018, 06:56:17 pm »

Thanks, Acetone!

In other news! I messed things up. Now to have to find out what happened. =D

« Last Edit: March 27, 2018, 07:36:01 pm by Kane98 »
Logged
Check out my vehicle development page here! https://forum.outerra.com/index.php?topic=3813.0

Kane98

  • Newbie
  • Posts: 7
  • There's always a reason to smile, regardless.
Re: Kane's Vehicle Topic
« Reply #3 on: March 28, 2018, 12:40:53 am »



1983 Nissan Bluebird U11. Some work needs to be done before I feel comfortable to release it such as a weird  steering wheel issue. and other bits.
Logged
Check out my vehicle development page here! https://forum.outerra.com/index.php?topic=3813.0

patmarrnc

  • Member
  • **
  • Posts: 95
Re: Kane's Vehicle Topic
« Reply #4 on: March 28, 2018, 11:35:39 am »

I used Patmarrnc's tutorial car script and adapted it so its messy.

Hi Kane98,
The script provided with my tutorial is very bare-bones, and therefore probably more difficult to improve it than to start with a better script.

If you start with the script for one of the included vehicles (such as the BMW or Porsche) , once you reconcile the Wheel & Steering wheel bone name references, you will automatically inherit a lot of features, such as brake lights, head lights etc.

The main thing in adapting a script to a model is  knowing what bones the script will try to move, and make sure your model has an equivalent bone with the same name used in the script. 

If your model doesn't have all the bones (moving parts) referenced by the script, you can either REM those lines in the script or modify your model

-------
Regarding wonky steering wheel rotation:

steering wheels tend to rotate incorrectly because the angle of the steering wheel is different from one model to the next,  so it is unlikely that a vehicle's steering wheel vector can be cut and pasted from another vehicle.  If the vector is wrong, the steering wheel will rotate "out of round"

  The rotating vector must match the angle of the steering wheel.   Here is the line in the script that defines the steering wheels rotation vector:
this.geom.rotate_joint_orig(swheel_id, steerAngle, {x:0,y:.766,z:.642});


To get the vector right, first you must determine the angle of the steering column (relative to the road)
Once you know the angle, use a calculator or reference table to get the sine and cosine of that angle.
The Y value should be the sine, and the Z value should be the cosine

A little more about vectors:
---------------------------
this.geom.rotate_joint_orig(swheel_id, steerAngle, {x:1,y:0,z:0});    <- in this case all rotation happens about the X axis

this.geom.rotate_joint_orig(swheel_id, steerAngle, {x:0,y:1,z:0});    <- in this case all rotation happens about the Y axis

this.geom.rotate_joint_orig(swheel_id, steerAngle, {x:0,y:0,z:1});    <- in this case all rotation happens about the Z axis

this.geom.rotate_joint_orig(swheel_id, steerAngle, {x:0,y:.766,z:.642});    <-- when rotation occurs at an angle to an axis, its vector is shown like this (sine + cosine)


-------------------
these are nice models! Did you model them? Or are they adapted from sketchup or other site?

-----------------
Logged

Kane98

  • Newbie
  • Posts: 7
  • There's always a reason to smile, regardless.
Re: Kane's Vehicle Topic
« Reply #5 on: March 28, 2018, 03:32:00 pm »

Thanks for the help, I'll have to do some more tinkering with this information.
Logged
Check out my vehicle development page here! https://forum.outerra.com/index.php?topic=3813.0

Kane98

  • Newbie
  • Posts: 7
  • There's always a reason to smile, regardless.
Re: Kane's Vehicle Topic
« Reply #6 on: March 28, 2018, 04:06:27 pm »

I used Patmarrnc's tutorial car script and adapted it so its messy.

Hi Kane98,
The script provided with my tutorial is very bare-bones, and therefore probably more difficult to improve it than to start with a better script.

If you start with the script for one of the included vehicles (such as the BMW or Porsche) , once you reconcile the Wheel & Steering wheel bone name references, you will automatically inherit a lot of features, such as brake lights, head lights etc.

The main thing in adapting a script to a model is  knowing what bones the script will try to move, and make sure your model has an equivalent bone with the same name used in the script. 

If your model doesn't have all the bones (moving parts) referenced by the script, you can either REM those lines in the script or modify your model

-------
Regarding wonky steering wheel rotation:

steering wheels tend to rotate incorrectly because the angle of the steering wheel is different from one model to the next,  so it is unlikely that a vehicle's steering wheel vector can be cut and pasted from another vehicle.  If the vector is wrong, the steering wheel will rotate "out of round"

  The rotating vector must match the angle of the steering wheel.   Here is the line in the script that defines the steering wheels rotation vector:
this.geom.rotate_joint_orig(swheel_id, steerAngle, {x:0,y:.766,z:.642});


To get the vector right, first you must determine the angle of the steering column (relative to the road)
Once you know the angle, use a calculator or reference table to get the sine and cosine of that angle.
The Y value should be the sine, and the Z value should be the cosine

A little more about vectors:
---------------------------
this.geom.rotate_joint_orig(swheel_id, steerAngle, {x:1,y:0,z:0});    <- in this case all rotation happens about the X axis

this.geom.rotate_joint_orig(swheel_id, steerAngle, {x:0,y:1,z:0});    <- in this case all rotation happens about the Y axis

this.geom.rotate_joint_orig(swheel_id, steerAngle, {x:0,y:0,z:1});    <- in this case all rotation happens about the Z axis

this.geom.rotate_joint_orig(swheel_id, steerAngle, {x:0,y:.766,z:.642});    <-- when rotation occurs at an angle to an axis, its vector is shown like this (sine + cosine)


-------------------
these are nice models! Did you model them? Or are they adapted from sketchup or other site?

-----------------

Well, i tried adapting to the Porsche script to the Bluebird It spawns but i'm not able to go into my forward gears nor the reverse gears. heres the adapted script. I'' send you the OTX file so you can sort of "Coach" me along with this. I barely know what I need to do.
« Last Edit: March 28, 2018, 04:11:09 pm by Kane98 »
Logged
Check out my vehicle development page here! https://forum.outerra.com/index.php?topic=3813.0

Kane98

  • Newbie
  • Posts: 7
  • There's always a reason to smile, regardless.
Re: Kane's Vehicle Topic
« Reply #7 on: April 06, 2018, 03:35:22 pm »

K-Body Cadillac? Anyone? and to answer your question Pat, I didn't model these. These are just ports.
Logged
Check out my vehicle development page here! https://forum.outerra.com/index.php?topic=3813.0