Outerra forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Download Outerra Tech Demo. Unofficial Outerra Discord server, MicroProse Discord server for OWS.

Pages: [1] 2

Author Topic: Animated wind turbine  (Read 29572 times)

Levi

  • Hero Member
  • *****
  • Posts: 585
    • Outerra Mods Site!
Animated wind turbine
« on: September 01, 2014, 04:39:25 am »

Download
(September 01, 2014)
As you may have noticed, the user pedropp222 already posted a static wind turbine. Then, I was immediately motivated to import one as a vehicle, and animate it. :)

I know this is made as a vehicle, but it's meant to be a static model. You can spawn it just like you spawn static models, but it will be removed after you quit the game...

The 3D model is a free model I just found here: link

If you open the script file(or ALT+E), you have two variables you can change:
Code: [Select]
var hub_speed = 1.0;
var head_speed = 0.01;

Feel free to play with those :)

Video:

Screenshots:
« Last Edit: November 18, 2016, 04:48:02 am by Levi »
Logged

pedropp222

  • Member
  • **
  • Posts: 82
  • 255.82 hours played since August 17, 2014
Re: Animated wind turbine
« Reply #1 on: September 01, 2014, 05:45:48 am »

Thanks for making this! :D
I knew it had to be a "vehicle" in order to make animations. Maybe in the future we could import animations onto our static models!
And yeah, that model sure looks better, i should have spent more than 5 minutes modelling, oh well :P
Logged

Levi

  • Hero Member
  • *****
  • Posts: 585
    • Outerra Mods Site!
Re: Animated wind turbine
« Reply #2 on: September 01, 2014, 06:09:00 am »

Thanks for making this! :D
I knew it had to be a "vehicle" in order to make animations. Maybe in the future we could import animations onto our static models!
And yeah, that model sure looks better, i should have spent more than 5 minutes modelling, oh well :P
You're welcome! I've always wanted to test this, but no real motivation :D :P
I think it can be done as an aircraft too, but I guess it's more complicated because of the FDM's...
Logged

HiFlyer

  • Hero Member
  • *****
  • Posts: 1788
  • newbie
Re: Animated wind turbine
« Reply #3 on: September 01, 2014, 06:17:48 am »

Very nice job, Levi! You're getting to be the Outerra grand master at this stuff.

Looks like you have the stutters during video recording as well. Makes me feel a bit better, as I've have been turning my poor computer inside out running tests to find out what was wrong. At least its not just me!

Also, sounds like there may be need for a new class of objects!
« Last Edit: September 01, 2014, 06:22:30 am by HiFlyer »
Logged
Spex: Intel Core i7 6700K @ 4.6GHz / 32.0GB G.SKILL TridentZ Series Dual-Channel Ram / ASUS STRIX GeForce GTX 1080 / Sound Blaster Z / Oculus Rift VR Headset / Klipsch® Promedia 2.1 Computer Speakers / ASUS ROG SWIFT PG279Q ‑ 27" IPS LED Monitor ‑ QHD / 2x Samsung SSD 850 EVO 500GB / Windows 10 Pro

Levi

  • Hero Member
  • *****
  • Posts: 585
    • Outerra Mods Site!
Re: Animated wind turbine
« Reply #4 on: September 01, 2014, 06:23:35 am »

Sounds like there may be need for a new class of objects.
Yep, we definitely need scriptable objects for this kind of things...
But I don't think it's too complicated to implement this. Is it?

EDIT: ahh I have to edit this now  ;D ;D

Very nice job, Levi! You're getting to be the Outerra grand master at this stuff.

Looks like you have the stutters during video recording as well. Makes me feel a bit better, as I've have been turning my poor computer inside out running tests to find out what was wrong. At least its not just me!
Thanks, but with this one wasn't hard at all. I've done it in 10 minutes :P

Yes, the stutters are very annoying to me. It may be also because of the Anti-aliasing and my not so updated PC...
« Last Edit: September 01, 2014, 06:36:18 am by Levi »
Logged

Acetone

  • Hero Member
  • *****
  • Posts: 963
    • Youtube channel
Re: Animated wind turbine
« Reply #5 on: September 01, 2014, 06:26:02 am »

Sad part is that we can spawn vehicules as permanent static objects, but it's impossible to use them :(
Logged

Levi

  • Hero Member
  • *****
  • Posts: 585
    • Outerra Mods Site!
Re: Animated wind turbine
« Reply #6 on: September 01, 2014, 06:34:13 am »

Sad part is that we can spawn vehicules as permanent static objects, but it's impossible to use them :(
You can enter the vehicles after placing them as permanent static objects, but sometimes it's somehow bugged, and impossible to enter...

I've tested with this one, and I was able to use it, even after restarting Outerra...
Logged

bomber

  • Hero Member
  • *****
  • Posts: 523
  • newbie
Re: Animated wind turbine
« Reply #7 on: September 01, 2014, 07:05:10 am »

What’s needed is a 'look at’ bit of js code for such things as AAA positions.

Over a TW we had a flex gun object, that could be added into a building or vehicle, very handy.
Logged
"If anyone ever tells you anything about an aeroplane which is so bloody complicated you can't understand it, take it from me - it's all balls" - R J Mitchell

Acetone

  • Hero Member
  • *****
  • Posts: 963
    • Youtube channel
Re: Animated wind turbine
« Reply #8 on: September 01, 2014, 07:12:08 am »


I've tested with this one, and I was able to use it, even after restarting Outerra...

Oh? It didn't work for some reason for me :) So we just need a way to make vehicule animations start directly when they are loaded and we will have basic animated structures!
Logged

HiFlyer

  • Hero Member
  • *****
  • Posts: 1788
  • newbie
Re: Animated wind turbine
« Reply #9 on: September 01, 2014, 07:30:36 am »


I've tested with this one, and I was able to use it, even after restarting Outerra...

Oh? It didn't work for some reason for me :) So we just need a way to make vehicule animations start directly when they are loaded and we will have basic animated structures!

So...... Windmills, rotating radar dish's, Wind socks and waving flags? Maybe hanger doors.....  :D

Trying to think of a list of objects this would be useful for, but its too early in the morning, here.
Logged
Spex: Intel Core i7 6700K @ 4.6GHz / 32.0GB G.SKILL TridentZ Series Dual-Channel Ram / ASUS STRIX GeForce GTX 1080 / Sound Blaster Z / Oculus Rift VR Headset / Klipsch® Promedia 2.1 Computer Speakers / ASUS ROG SWIFT PG279Q ‑ 27" IPS LED Monitor ‑ QHD / 2x Samsung SSD 850 EVO 500GB / Windows 10 Pro

jonslynn

  • Member
  • **
  • Posts: 78
Re: Animated wind turbine
« Reply #10 on: September 17, 2014, 02:11:18 am »

Can you or anyone explain the .js script?  What part is the head and hub?  They both have a speed.
Logged

Levi

  • Hero Member
  • *****
  • Posts: 585
    • Outerra Mods Site!
Re: Animated wind turbine
« Reply #11 on: September 17, 2014, 07:09:33 am »

Can you or anyone explain the .js script?  What part is the head and hub?  They both have a speed.
Code: [Select]
var hub_speed = 1.0;     <<------- This is the speed multiplier for the hub/propeller. Rotates on the horizontal axis.
var head_speed = 0.01;   <<------- This is the speed multiplier for the head turning. Rotates on the vertical axis.

You can always play with those, and see what each one does in case you're not sure...

Btw, you can open the script within the game with ALT+E and see the result immediately without having to restart Outerra, in case you didn't know it :)
Logged

jonslynn

  • Member
  • **
  • Posts: 78
Re: Animated wind turbine
« Reply #12 on: September 17, 2014, 02:15:48 pm »

If I wanted to try to make my own windmill or something similar.  What the parts be named or how would that be set up?  This is a neat idea you came up with and the script is so short and simple.
Logged

Levi

  • Hero Member
  • *****
  • Posts: 585
    • Outerra Mods Site!
Re: Animated wind turbine
« Reply #13 on: September 18, 2014, 07:05:56 am »

If I wanted to try to make my own windmill or something similar.  What the parts be named or how would that be set up?  This is a neat idea you came up with and the script is so short and simple.
It's very simple, for this turbine I just named the moving parts('head' and 'hub') and wrote in front of them 'BONE_'. This way you tell the importer that the objects with 'BONE_' in front of their names can be accessed via script. In the modelling software, those objects's names will look like: 'BONE_head' and 'BONE_hub'.

Also, don't forget to place the pivots in the right location, as the objects will be moved/rotated based on the object's local pivot point.

Within the JavaScript you get the objects form the imported package like this:
Code: [Select]
head = geom.get_joint('head');
hub = geom.get_joint('hub');

For more detailed info, check the importer Wiki here: Importer.
or the Modding: Importer, Tools & Utilities board.
or this tutorial by bugsblake: full vehicle setup 3ds max to outerra.
Logged

jonslynn

  • Member
  • **
  • Posts: 78
Re: Animated wind turbine
« Reply #14 on: September 19, 2014, 01:13:47 am »

Thanks,  I was able to make one of my own.  I don't know much about JavaScript.  Since this one was short and simple I figured I could get it to work.

How about a script that makes something rotate the part back and forth like a radar or oscillating fan?

Thanks again.  Very useful.
Logged
Pages: [1] 2