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

Pages: [1] 2

Author Topic: Missing a really good manual for importing  (Read 11698 times)

Oldtown

  • Member
  • **
  • Posts: 77
  • newbie
Missing a really good manual for importing
« on: March 31, 2013, 11:22:45 am »

Hello mates ...

I was just watching the development since release of Anteworld until I decided now to take part in modeling and creating content for Outerra.
Unfortenately I miss a really good manual which starts from the blank. For example what is a must have in a exported collada file from 3ds max. I got it sometimes so far that I see a quite simple model (box and four cylinders) in game but then I really cant go on because of missing knowledge.
Stepping around in the forum a whole day and on youtube really couldn't answer all questions. I got some basic knowledge in scripting and some better in 3D Design but no real idea where to start so a guide would be helpful.
I dont looking vor individual help at all. I just need some basics. But I am a bit scared that I have to collect my knowledge from many different sources ... unfortunately I dont really got that much time.
Logged

Oldtown

  • Member
  • **
  • Posts: 77
  • newbie
Re: Missing a really good manual for importing
« Reply #1 on: April 01, 2013, 01:09:25 am »

Ok after a long night with 4 energy drinks, a lot of stupid movies in TV and a big trial and error testing marathon i am through!
I hope i can write down my expierience later so other newbies understand why things have to be like this and what has to be changed ... now i gotta take my ass out to the real world :)
wish you all a nice easter monday.

greetz oldie
Logged

Thunderstorm99

  • Newbie
  • Posts: 3
  • newbie
Re: Missing a really good manual for importing
« Reply #2 on: April 01, 2013, 08:38:39 am »

Would really appreciate a tutorial from you! Go ahead writing down your experience if you've got time!
Thanks in advance!
Logged

Oldtown

  • Member
  • **
  • Posts: 77
  • newbie
Re: Missing a really good manual for importing
« Reply #3 on: April 01, 2013, 03:16:01 pm »

Ok here we go really simple!!!

I build a small car with a small chassis (length: 370 cm; width: 160 cm; height: 140 cm) and four wheels (radius: 30cm; height: 20cm).
The wheelbase is 240cm. I think this small construction should be no problem for everyone who got some expirience with 3d max.

Every Object in 3d max got a name so we can find them easy in outerra later.

Chassis <- the main red chassis
wheel_FR <- front right wheel
wheel_FL <- front left wheel
wheel_RR <- rear right wheel
wheel_RL <- rear left wheel





Now some very important facts which caused much trouble in the beginning of my journey to a small car in outerra.

In 3d max 2013 the front of your car should show North! The pivot axis should be aranged with Z (blue) up, Y (green) to the front and X (red) to the side. The pivot have to be aranged this way for the chassis and each wheel! Otherwise we got later some really funny effects ;)




Now we use the "select and link" button

Mark with the left mouse button and ctrl all four wheels and after that hover with the mouse over one of the wheels (does'nt matter which one) and leftclick + drag. Aim for the chassis and release the left mouse button. Now all four wheels are connected to the chassis and will stay with it no matter where it goes ;).

Pls check again if all pivots are aligned correct! Export with the free downloadable OpenCollada Plugin

Now open Anteworld :)

Hit F7 and click the "Import ..." button. Navigate to the  Folder where you saved the DAE file. If you see the file in the browser of Anteworld mark it so it is highlighted in blue and press "OK". Now Anteworld is processing. Wait until you see the button "Configure >>" and press it.

The first package object is the "EnviromentAmbientLight". It should stay on "ignore".
Press the dropdown button and select the chassis. Select for this "vehicle".



Now we see our objects related to the chassis and the names. Mark the bones like I did and press "Import >>" At this point Antworld is missing some UVs but this isn't important now.

The vehicle should hang around in the air in front of you. Until now we cant do anything with this small "beauty". Press close and feel free to take a small walk around the model. If you're done press again F7 and scroll down in the buildings list. Search for your ingame nick and will find soon our new created object. Mark it and press "Place". Our vehicle spawns right below us on the ground. Hit Escape so we leave the menu.
Go close to the car and hit Return so we enter the vehicle. You now see the vehicle from the cockpit view. Press C so we can watch from outside what will happen now.

Press Alt + E

This opens the Editor.
Instead of taking the full example code from here Vehicle Example Script we just take some important parts of it. Its a minimum so we can move the vehicle around and play with some physics.

Let us start ... first we put into the brakets of function init_chassis() ... 

Quote
function init_chassis()
{
  var wheelparam = {
    radius: 0.7,
<-- edit this to 0.3 (remember our wheel radius of 30cm!)
    width: 0.45,
<-- edit this to 0.2 (this represents the height parameter in 3d max of 20cm!)
    suspension_max: 0.2,
    suspension_min: -0.35,
    suspension_stiffness: 5.0,
    damping_compression: 0.2,
    damping_relaxation: 0.12,
    slip: 0.8,
    roll_influence: 0.1};

}

You can play around with the other parameters later. Now we add our wheels so Anteworld knows which objects are used for that and some wheight for our car

Quote
function init_chassis()
{
    var wheelparam = {
    radius: 0.3,
    width: 0.2,
    suspension_max: 0.2,
    suspension_min: -0.35,
    suspension_stiffness: 5.0,
    damping_compression: 0.2,
    damping_relaxation: 0.12,
    slip: 0.8,
    roll_influence: 0.1
  };
   
    this.add_wheel('wheel_FR',wheelparam);
<-- the name "wheel_FR" is the name you used for your wheel in 3d max
    this.add_wheel('wheel_FL',wheelparam);
    this.add_wheel('wheel_RR',wheelparam);
    this.add_wheel('wheel_RL',wheelparam);

    return {mass:800};
should be in kg so I took 800 which represents a realistic wheight for a small car in real life

}

We are almost done!! I dont added anything under the next two sections ... (I think some call them "Events")

Quote
function init_vehicle(){
}

function engine(start){
}

Now watch out! The next part we add before the next Event.

Quote
const EF = 27000.0; <-- this parameter where too much for our small car. I reduced it to 7000.0
const BF = 28000.0;
<-- this one down too to 8000.0 (again you can play around with this later)
const maxkmh = 100;
<-- this explains itself I think ;) ... feel free
const forceloss = EF / (0.2*maxkmh + 1);
<-- I am not sure but I think this is the road friction

function update_frame(dt, engine, brake, steering)
{
}

Now we copy a lot of code which I dont really understand but we need it so ... why take care? Just copy and paste. Maybe someone can explain this part step by step. Important thing is ... we put this now into the update_frame function.


Quote
function update_frame(dt, engine, brake, steering)
{
  var kmh = this.speed()*3.6;
  var redux = engine>=0 ? 0.2 : 0.6;
  var esign = engine<0 ? -1 : 1;
  engine = EF*Math.abs(engine);
  var force = (esign>0) == (kmh>=0)
        ? engine/(redux*Math.abs(kmh) + 1)
        : engine;
  force -= forceloss;
  force = Math.max(0.0, Math.min(force, engine));
  engine = esign*force;

}

So now we add some really important code! Put it right below ...

Quote
function update_frame(dt, engine, brake, steering)
{
  var kmh = this.speed()*3.6;
  var redux = engine>=0 ? 0.2 : 0.6;
  var esign = engine<0 ? -1 : 1;
  engine = EF*Math.abs(engine);
  var force = (esign>0) == (kmh>=0)
        ? engine/(redux*Math.abs(kmh) + 1)
        : engine;
  force -= forceloss;
  force = Math.max(0.0, Math.min(force, engine));
  engine = esign*force;
  steering *=0.6;
  brake *= BF;
 
  this.steer(-2, steering);
the "-2" says that we use the first to wheels which we declared above in this case "wheel_FR" and "wheel_FL"
  this.wheel_force(-1, engine);
"-1" is a 4x4 :) we could do it only for front or rear wheels too but this is the most easy way now
  this.wheel_brake(-1, brake);
same like the force
  this.animate_wheels();

}

And now ... click "reload". The Car should drop on his wheels and show some bumping. Press Alt + E again to exit the script. Have fun now :)


I hope I dont bring any mistakes in here. If something doesn't work feel free to reply. I know my english isn't the best because it is not my main language but it should be enough for this. It is my first attempt to write something like this down. Remember I was until last night totally new to this all ... would be cool to see your results. I go now to the caterpillar website and get some inspiration.

Btw ... I WANT A TANK CLASS!!! My Jagdtiger (or should I call it Antetiger) is waiting for Outerra.
Logged

cameni

  • Brano Kemen
  • Outerra Administrator
  • Hero Member
  • *****
  • Posts: 6600
  • Pegs is clever, but tae hain’t a touch sentimental
    • outerra.com
Re: Missing a really good manual for importing
« Reply #4 on: April 01, 2013, 03:44:58 pm »

Great tutorial, thanks for contributing :)

Quote
Btw ... I WANT A TANK CLASS!!! My Jagdtiger (or should I call it Antetiger) is waiting for Outerra.
Actually you can simulate the suspension & physics on tank wheels in the script already, track animation support will be coming. But it will still be under the 'vehicle' category; the category determines the underlying physics engine used, which is the same for all tracked & wheeled vehicles.
Logged

Thunderstorm99

  • Newbie
  • Posts: 3
  • newbie
Re: Missing a really good manual for importing
« Reply #5 on: April 01, 2013, 07:09:25 pm »

Thanks a lot. i will post some problems i had today working with it but  i got my first working block to drive ;)
Logged

mLichy

  • Full Member
  • ***
  • Posts: 104
  • newbie
Re: Missing a really good manual for importing
« Reply #6 on: April 14, 2013, 06:28:34 pm »

Quote
And now ... click "reload". The Car should drop on his wheels and show some bumping. Press Alt + E again to exit the script. Have fun now

So, I got my car working :)  But I don't see this reload button?  Best I can do is reload outerra completely?
Logged

Oldtown

  • Member
  • **
  • Posts: 77
  • newbie
Re: Missing a really good manual for importing
« Reply #7 on: April 15, 2013, 01:33:49 am »

Logged

mLichy

  • Full Member
  • ***
  • Posts: 104
  • newbie
Re: Missing a really good manual for importing
« Reply #8 on: April 15, 2013, 09:20:05 am »

Unless Save is now Reload?  But I click Save and it does not re-drop the vehicle.

Logged

Oldtown

  • Member
  • **
  • Posts: 77
  • newbie
Re: Missing a really good manual for importing
« Reply #9 on: April 15, 2013, 09:43:57 am »

You should update outerra manualy.

Quote
Attention! Versions 0.7.13.3456 and 0.7.13.3475 have a broken updater and won't automatically update to any newer version. To update from these versions (and from any older version) please download the latest installer from:

  http://www.outerra.com/forum/index.php?topic=637.0

you are on Version 0.7.13.3478 and mine is 0.7.13.3624

Is this an Impala you're working on?  :o 8)
« Last Edit: April 15, 2013, 09:46:11 am by StG2-Oldtown »
Logged

mLichy

  • Full Member
  • ***
  • Posts: 104
  • newbie
Re: Missing a really good manual for importing
« Reply #10 on: April 15, 2013, 09:51:55 am »

Ah ok. Ya that would do it. Thanks!
Logged

M7

  • Hero Member
  • *****
  • Posts: 736
  • newbie
Re: Missing a really good manual for importing
« Reply #11 on: April 15, 2013, 02:08:49 pm »

Me i was finally able to successfully import a car from sketchup and able to drive. It was quite a trial and error process. First to get the car (a web import) rightly configure in sketchup and then getting the .js file to work.

Again for me the only way to get a working .js config was to copy past the one from Giucam's BMW and edit the wheel's name and the FPS position. But then the car was still tumbling in the air at every reload until i started to play with the "com" command and its "y" coordonate which is for center the gravity i think.

The problem i have now is that Giucam script is quite complex and when i try to play around with the numbers in the script to see what effect each command has on the car, it screw things every time and take me back as if there was no script at all. The only thing i can do then is restart the game, load the car, copy Giucam script, edit the wheels, fps and com. Only then will it work again.
« Last Edit: April 15, 2013, 02:10:44 pm by M7 »
Logged

mLichy

  • Full Member
  • ***
  • Posts: 104
  • newbie
Re: Missing a really good manual for importing
« Reply #12 on: April 15, 2013, 02:52:20 pm »

Hm. I used 3ds Max 2012. Was very easy to do.
I was able to get a test car working in about 3 min. Following this tutorial.

The hardest stuff yet, is the script or materials. I'm not sure yet how to setup a good glass shader yet or cubemap for the car paint.

I have glass working but it lights/draws bad at some angles and lighting.
Logged

jeffmorris

  • Jr. Member
  • *
  • Posts: 19
  • newbie
Re: Missing a really good manual for importing
« Reply #13 on: April 15, 2013, 09:01:03 pm »

The red car is 1957 Chevy Belair. The first Chevy Impala was made in 1958.
Logged

mLichy

  • Full Member
  • ***
  • Posts: 104
  • newbie
Re: Missing a really good manual for importing
« Reply #14 on: April 15, 2013, 11:23:49 pm »

He got it right on , 57 belair.

Made it for GTA IV, decided to put in here too.
Logged
Pages: [1] 2