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: How do you play a looped animation from .anim file?  (Read 13142 times)

Uriah

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 569
  • We do these things not because they are easy. -JFK
How do you play a looped animation from .anim file?
« on: December 10, 2014, 06:27:30 am »

I imported a model with its animation, does anyone know the Jscript to play the animation looped on repeat?

I know you use:

function update_frame(dt){
this.geom.load_animation("particle_array.anim")
}


But I cannot find a single animation in Outerra that is implemented from a .anim file, everything just uses rotations:

function update_frame(dt){
   this.geom.rotate_joint(head, dt*head_speed, {x:0,y:0,z:1});
   this.geom.rotate_joint(hub, dt*hub_speed, {x:0,y:1,z:0});
}


And once the animation is loaded, is there a variable you can set to change speed at which the animation plays?

-Uriah
Logged

PytonPago

  • Hero Member
  • *****
  • Posts: 2284
  • It´s way too complex, dont let me try to explain !
Re: How do you play a looped animation from .anim file?
« Reply #1 on: December 10, 2014, 09:57:58 am »

The only really pre-done animations based thing is the Mercenary soldier (hes not in classic menu, you have to go to the object menu and search it there- just search for .../mercenary).
Logged
We are still undeveloped as long as we don´t realize, that all our science is still descriptive, and than beyond that description lies a whole new world we just haven´t even started to fully understand.

angrypig

  • Sr. Member
  • ****
  • Posts: 454
Re: How do you play a looped animation from .anim file?
« Reply #2 on: December 11, 2014, 11:01:42 am »

It's not possible with current API but there will be an update to animation API in next release.
Logged

Uriah

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 569
  • We do these things not because they are easy. -JFK
Re: How do you play a looped animation from .anim file?
« Reply #3 on: December 12, 2014, 07:12:50 pm »

Awesome thank you angrypig! That will seriously expand the potential possibilities for mods. What about support for illumination textures, light sources and volumetric shaders?

Regards,
Uriah
Logged

angrypig

  • Sr. Member
  • ****
  • Posts: 454
Re: How do you play a looped animation from .anim file?
« Reply #4 on: December 13, 2014, 10:50:30 am »

I'm working on illumination textures, lights are almost ready just need a few improvents to api. What are volumetric shaders?
Logged

necro

  • Sr. Member
  • ****
  • Posts: 451
    • google+ Blog
Re: How do you play a looped animation from .anim file?
« Reply #5 on: December 13, 2014, 10:53:39 am »

Probably he meant scattering shaders applied to domain boxes. Like the smoke of rockets on launch
Logged

angrypig

  • Sr. Member
  • ****
  • Posts: 454
Re: How do you play a looped animation from .anim file?
« Reply #6 on: December 13, 2014, 12:25:09 pm »

A lot of new stuff is planed for next release we hope we will be able to release it before christmass...
Logged

PytonPago

  • Hero Member
  • *****
  • Posts: 2284
  • It´s way too complex, dont let me try to explain !
Re: How do you play a looped animation from .anim file?
« Reply #7 on: December 13, 2014, 12:51:08 pm »

Logged
We are still undeveloped as long as we don´t realize, that all our science is still descriptive, and than beyond that description lies a whole new world we just haven´t even started to fully understand.

Levi

  • Hero Member
  • *****
  • Posts: 585
    • Outerra Mods Site!
Re: How do you play a looped animation from .anim file?
« Reply #8 on: December 13, 2014, 01:16:15 pm »

A lot of new stuff is planed for next release we hope we will be able to release it before christmass...
Awesome! Can't wait for the next release! :)

So the billboard comes back !
Actually, you can still have the illuminated billboards at night... but with a little problem during the daytime, transparent poster. I think it could be solvable by putting a black or white panel just behind the poster...

You just need to modify the material like this:
Code: [Select]
{
"name" : "Poster",
"color" : "1.0,1.0,1.0,0.999",
"f0" : ".04",
"roughness" : "1.0",
"no_light" : true,
"alpha_masked" : false,
"tex_albedo" : "bilboard_d.dds",
"tex_normal" : "",
"tex_roughness" : "",
"tex_opacity" : "Bilboard_op.dds",
"tex_reflectance" : "",
"tex_environment" : ""
}
Logged

Uriah

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 569
  • We do these things not because they are easy. -JFK
Re: How do you play a looped animation from .anim file?
« Reply #9 on: December 14, 2014, 02:18:25 am »

I'm working on illumination textures, lights are almost ready just need a few improvents to api. What are volumetric shaders?

Spectacular, excellent work!

Will there be omni as well as directional lights? I.e. focused/unfocused, candle/spotlight.

Lighting possibilities are endless; aircraft external lights, internal cockpit lights, lit cockpit switches, navigation display and computer screens, runway lights, aerodrome beacon, headlights, landing lights, lit buildings.

A lot of new stuff is planed for next release we hope we will be able to release it before christmass...

Is there an abbreviated list of the planned features for this release?

Best regards,
Uriah
Logged

Juggernautz

  • Jr. Member
  • *
  • Posts: 48
  • newbie
Re: How do you play a looped animation from .anim file?
« Reply #10 on: December 17, 2014, 10:11:41 pm »

I'd love to know how you are handling LODs for lighting, or whether there will just be a fadeout distance. I think at some point it would make sense to swap to an alpha'd billboard at long distances (so for example you could see bright lights from vast distances - lighthouses and such). Perhaps a detailed blogpost explaining the lighting system please? :D P.S. Excited for the next release.
Logged