Outerra forum

Anteworld - Outerra Game => Modding: Importer, Tools & Utilities => Topic started by: Uriah on December 10, 2014, 06:27:30 am

Title: How do you play a looped animation from .anim file?
Post by: Uriah 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
Title: Re: How do you play a looped animation from .anim file?
Post by: PytonPago 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).
Title: Re: How do you play a looped animation from .anim file?
Post by: angrypig 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.
Title: Re: How do you play a looped animation from .anim file?
Post by: Uriah 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
Title: Re: How do you play a looped animation from .anim file?
Post by: angrypig 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?
Title: Re: How do you play a looped animation from .anim file?
Post by: necro on December 13, 2014, 10:53:39 am
Probably he meant scattering shaders applied to domain boxes. Like the smoke of rockets on launch
Title: Re: How do you play a looped animation from .anim file?
Post by: angrypig 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...
Title: Re: How do you play a looped animation from .anim file?
Post by: PytonPago on December 13, 2014, 12:51:08 pm
... illumination textures ...

 So the billboard comes back !
www.youtube.com/watch?v=j8_X6RGBt6U (http://www.youtube.com/watch?v=j8_X6RGBt6U)

http://forum.outerra.com/index.php?topic=1561.0 (http://forum.outerra.com/index.php?topic=1561.0)
Title: Re: How do you play a looped animation from .anim file?
Post by: Levi 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...
(http://i.minus.com/isOoBgt1qI2ji.jpg)(http://i.minus.com/irqcFsuLYldOe.jpg)

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" : ""
}
Title: Re: How do you play a looped animation from .anim file?
Post by: Uriah 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
Title: Re: How do you play a looped animation from .anim file?
Post by: Juggernautz 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.