Topic: Best way to export this blender uv texture animation

I have this video showing up my texture. Each side of a cube has a different animation from the same texture (left, right, front and rear), which plays using the blender game engine. Now, what's the best way to do this in Mariatis? What do you think?
http://img190.imageshack.us/img190/2271/tmpj.jpg


Demo mpg file:
http://www.mediafire.com/?6kj5ogl8ln1y2le

Re: Best way to export this blender uv texture animation

What is this "Game Properties" tab ? is it a script generating a uv-offset animation ?

The uv-offset is what is used in Maratis for this kind of thing :
http://www.maratis3d.com/wp-content/uploads/2011/01/10.jpg

Re: Best way to export this blender uv texture animation

It's the game engine. from the output, I would say this is a script. From the maratis mta export:

!!!Maratis!!!

!!!TextureAnim num="1"!!!

    !!!Texture id="0"!!!
        !!!translate num="1"!!!
            !!!k t="6" x="0.000000" y="0.000000" /!!!
        !!!/translate!!!
        !!!scale num="1"!!!
            !!!k t="6" x="1.000000" y="1.000000" /!!!
        !!!/scale!!!
    !!!/Texture!!!
!!!/TextureAnim!!!

!!!/Maratis!!!

(I replaced all < and > by !!! to be able to post it)
The mapping is exactly the same you described, because I used UV coordinates to place the textures on each side of the cube. The UV coordinates are correctly exported to Maratis, so yes, that must be using a script. I'll keep trying to do the same effect using offset changes.
http://img404.imageshack.us/img404/740/tmpv.jpg

as you can see the texture is correctly placed (that's how you have to place the texture on each face for the animation to scroll in the game engine). I'll try to do it again but using offsets this time. I'll probably use different files for each side of the cube (because some animations have 5 frames instead of 6 (I'm experimenting with an existing 2D game).

Last edited by dc740 (2012-02-28 12:20:47)

Re: Best way to export this blender uv texture animation

Hey, I just remember Vegas did a tutorial on this here :
http://forum.maratis3d.com/viewtopic.php?id=98

Maybe it can help.

Re: Best way to export this blender uv texture animation

Anael, thanks for the suggestion. I finally made my animation in blender (first I used it, it was a fun ride) using that method.

But I had another issue when I was trying to do an invisible cube with a texture surrounded by invisible borders.

My material has alpha 0.0
My texture has the following influences: color 1.0, alpha 1.0

This way I make the material invisible, and the image is shown with the invisible alpha channel. I get the desired output in blender  but when I exported the mesh in maratis the entity was completely invisible (I couldn't see the textures either).

Is this a known unsopported case? is it just a mistake during the export?

Thanks!

Last edited by dc740 (2012-04-14 14:32:39)

Re: Best way to export this blender uv texture animation

hi,

do you have a screen-shot ?
I don't understand how it is done. What do you mean by invisible cube with a texture ?

If you set the material alpha to 0, all the objects using this material will be invisible.
The influences are not really supported by Maratis, except the blend mode for the fixed renderer only.
There is a list of supported features here : http://www.maratis3d.org/?p=277

Re: Best way to export this blender uv texture animation

This is what I have in blender

http://img864.imageshack.us/img864/7459/tmpfd.jpg

And yes, I was using influences to get the material to be hidden, while I was showing the texture at the same time. Is there any way to do this in maratis? The idea is to use alpha compositing to hide parts of the texture at the same time.

That way I manage to show the human body without showing the cube. I know this one looks ugly, but it's just a test.

thanks

Last edited by dc740 (2012-04-14 16:33:49)

Re: Best way to export this blender uv texture animation

ok,

if you are using the "standard" material, just use a diffuse texture that has an alpha channel
(be sure your texture is saved in tga or png with alpha channel).

If the alpha channel is using grey values (anti-aliasing or semi-transparent) set blend mode to "Alpha"

Leave material alpha to 1 (it is the general alpha), where the diffuse texture alpha channel will be black it will be invisible.

Don't forget to select « Maratis » in the Blender Render menu (on top).

Re: Best way to export this blender uv texture animation

Thank you!

It worked as expected. Now I can keep experimenting when I have free time.

And before I make some stupid mistakes, to change the animation speed I would have to repeat the same frame several times? Is there a way to do this from code? or maybe from the Editor.
what would be the best way?

again, thank you so much for your patience

EDIT: I just found the answer in the Vegas tutorial. Thanks!

Last edited by dc740 (2012-04-14 18:35:49)