Outerra forum

User mods, screenshots & videos => Vehicles => Topic started by: Kane98 on March 27, 2018, 03:22:02 am

Title: Kane's Vehicle Topic
Post by: Kane98 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/xg3bdb7r97t5bvh/Corolla.Kane98.otx)
http://www.mediafire.com/file/u1o43829ejuoul2/Durango.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.
Title: Re: Kane's Vehicle Topic
Post by: Acetone on March 27, 2018, 12:33:58 pm
Hey, welcome :)

Here is your picture:
(https://i.imgur.com/LxJeyFH.jpg)
Title: Re: Kane's Vehicle Topic
Post by: Kane98 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

(https://i.imgur.com/wQXgFKy.jpg)
Title: Re: Kane's Vehicle Topic
Post by: Kane98 on March 28, 2018, 12:40:53 am
(https://i.imgur.com/S1wVzSD.jpg)

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.
Title: Re: Kane's Vehicle Topic
Post by: patmarrnc 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?

-----------------
Title: Re: Kane's Vehicle Topic
Post by: Kane98 on March 28, 2018, 03:32:00 pm
Thanks for the help, I'll have to do some more tinkering with this information.
Title: Re: Kane's Vehicle Topic
Post by: Kane98 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.
Title: Re: Kane's Vehicle Topic
Post by: Kane98 on April 06, 2018, 03:35:22 pm
(https://i.imgur.com/G9rmou4.png) K-Body Cadillac? Anyone? and to answer your question Pat, I didn't model these. These are just ports.