Animated textures
Moderators: Omega, tillias, Mod Contributor
-
- Mercenary
- Posts: 125
- Joined: Sat Apr 11, 2009 1:47 am
Animated textures
I am trying, but failing to put animated textures on a mesh. Blender doesn't let me texture using a .ani file, and when I change the map kd element on a .mtl file to that of an ani file, it still doesn't play in game, and there is no animation element in the resulting xmesh. I am utterly confused.
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
Re: Animated textures
Perhaps you can't do it with a direct .obj -> bfxm conversion.
I think you must go through xmesh, since you have to tell it it's an animation. I could also fix mesher to detect an "ani" extension.
EDIT: correction, mesher already detects .ani extensions on the textures given in the .mtl file. Maybe you're messing not in the conversion but in putting the converted files into the engine. Animations, for instance, IIRC, have to be in the /data/animations folder.
I think you must go through xmesh, since you have to tell it it's an animation. I could also fix mesher to detect an "ani" extension.
EDIT: correction, mesher already detects .ani extensions on the textures given in the .mtl file. Maybe you're messing not in the conversion but in putting the converted files into the engine. Animations, for instance, IIRC, have to be in the /data/animations folder.
-
- Mercenary
- Posts: 125
- Joined: Sat Apr 11, 2009 1:47 am
Re: Animated textures
I reconverted the files again without changing the mtl file to a .ani texture. Only one of the textures shows up if I convert to XMESH. Mesher tells me there is an error: Bad case in switch<textype> in file from_BFXM.cpp: type=1996458796 index=0
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
Re: Animated textures
Can you attach the files so I can give it a try?
It sounds like a mesher bug.
It sounds like a mesher bug.
-
- Mercenary
- Posts: 125
- Joined: Sat Apr 11, 2009 1:47 am
Re: Animated textures
I can't attach the files... board attachment quota was already reached.
-
- Mercenary
- Posts: 125
- Joined: Sat Apr 11, 2009 1:47 am
Re: Animated textures
Here's the files... Finally got below the quota by deleting an old attachment.
Sorry for the delays... I've been very busy the past few days.
Thanks for helping!
Sorry for the delays... I've been very busy the past few days.
Thanks for helping!
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
Re: Animated textures
Hey, thanks for the file.
The bug seems more complex than I'd expected, somehow the BFXM parser gets... desynchronized... starts decoding garbage and, well, that isn't good.
I'll keep you posted
The bug seems more complex than I'd expected, somehow the BFXM parser gets... desynchronized... starts decoding garbage and, well, that isn't good.
I'll keep you posted
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
Re: Animated textures
I just found the bug.
I put up the fix for review, and will shortly be committed.
I put up the fix for review, and will shortly be committed.
-
- Mercenary
- Posts: 125
- Joined: Sat Apr 11, 2009 1:47 am
Re: Animated textures
I seem to have missed an important error - when I convert bfxm -> xmesh, mesher splits the bfxm into several different xmesh files (one for each material) - I didn't notice until the missing xmesh files were found at the top of my folder. Sorry for not reporting this earlier!
This is still happening w/ the SVN mesher.exe after update.
This is still happening w/ the SVN mesher.exe after update.
-
- Elite
- Posts: 1567
- Joined: Tue Jan 26, 2010 2:03 am
Re: Animated textures
the mesher.exe (unless you compiled the copy) hasn't been updated yet.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
-
- Elite
- Posts: 1567
- Joined: Tue Jan 26, 2010 2:03 am
Re: Animated textures
mesher.exe has been updated with the lasted bug fixes by klauss.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
-
- Mercenary
- Posts: 125
- Joined: Sat Apr 11, 2009 1:47 am
Re: Animated textures
The bug is still present after update... Strange!
-
- Elite
- Posts: 1567
- Joined: Tue Jan 26, 2010 2:03 am
Re: Animated textures
I can attempt to track it down.. but I doubt it.. will give it a try and maybe release something you can use soon.
Heres hoping!
BTW give me a step by step on what you are doing with mesher so I can repeat it and see whats going on. Never used mesher so no clue on how to do whatever it is you are attempting.
Heres hoping!
BTW give me a step by step on what you are doing with mesher so I can repeat it and see whats going on. Never used mesher so no clue on how to do whatever it is you are attempting.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
-
- Mercenary
- Posts: 125
- Joined: Sat Apr 11, 2009 1:47 am
Re: Animated textures
Sorry for the delay... finals for all my classes was a killer.
1. I run mesher.exe from the copy of cmd.exe that is in my conversion folder.
2. Copy the .obj, texture, etc. files into the conversion folder (I have designated a folder on my hard drive just for conversions to keep everything neat. Just to clarify, it does have expat.dll and everything else needed to run mesher.exe).
3. Convert the obj file to bfxm (usually something like "mesher shipname.obj shipname.bfxm obc)
4. Convert the bfxm to xmesh (usually something like "mesher shipname.bfxm shipname.xmesh bxc)
This is where I get an error, the xmesh is split into several files, one for each material I used in the file.
Thanks!
1. I run mesher.exe from the copy of cmd.exe that is in my conversion folder.
2. Copy the .obj, texture, etc. files into the conversion folder (I have designated a folder on my hard drive just for conversions to keep everything neat. Just to clarify, it does have expat.dll and everything else needed to run mesher.exe).
3. Convert the obj file to bfxm (usually something like "mesher shipname.obj shipname.bfxm obc)
4. Convert the bfxm to xmesh (usually something like "mesher shipname.bfxm shipname.xmesh bxc)
This is where I get an error, the xmesh is split into several files, one for each material I used in the file.
Thanks!
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
Re: Animated textures
It's weird... that same procedure works fine for me (linux).
-
- Mercenary
- Posts: 125
- Joined: Sat Apr 11, 2009 1:47 am
Re: Animated textures
Hmm, still doesn't work for me.
With direct obj -> bfxm conversion, the ani textures don't animate. When it gets converted to xmesh, the file is split up into 1 xmesh file per texture, and the ani textures still don't work unless I change the "ONE ZERO" setting to "ONE ONE".
Would it be possible to have mesher recognize an ani extension and change it to the equivalent of the "ONE ONE" xmesh tag at the same time?
Thanks
With direct obj -> bfxm conversion, the ani textures don't animate. When it gets converted to xmesh, the file is split up into 1 xmesh file per texture, and the ani textures still don't work unless I change the "ONE ZERO" setting to "ONE ONE".
Would it be possible to have mesher recognize an ani extension and change it to the equivalent of the "ONE ONE" xmesh tag at the same time?
Thanks
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
Re: Animated textures
It's supposed to split the mesh in submeshes, one per texture - that's a GPU limitation, GPUs can't render multiple textures at once, so they have to be split.
It's a common game modelling task to bake your multiple textures into one mamooth texture before shipping.
About ONE ONE / ONE ZERO, it shouldn't matter for the animation. Blinking lights obviously need the ONE ONE to look correct, but the animation should play the same.
You can add a "BLEND 1" line to your mtl file to any material that needs ONE ONE blending (that's additive blending). "BLEND 0.5" does standard alpha blending, and "BLEND 0" does no blending (opaque blending).
It's a common game modelling task to bake your multiple textures into one mamooth texture before shipping.
About ONE ONE / ONE ZERO, it shouldn't matter for the animation. Blinking lights obviously need the ONE ONE to look correct, but the animation should play the same.
You can add a "BLEND 1" line to your mtl file to any material that needs ONE ONE blending (that's additive blending). "BLEND 0.5" does standard alpha blending, and "BLEND 0" does no blending (opaque blending).
-
- Mercenary
- Posts: 125
- Joined: Sat Apr 11, 2009 1:47 am
Re: Animated textures
Thank you! Everything works now.
-
- Mercenary
- Posts: 125
- Joined: Sat Apr 11, 2009 1:47 am
Re: Animated textures
hmm - new problem - the animation becomes invisible when it goes into shadow, even if I make the material shadeless and unable to recieve shadows on blender. How would I make the streak animation so that it can always be seen, like on the ariston?
thanks
thanks
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
Re: Animated textures
You have to put it as a glowmap.
IIRC, "Map_ke"
IIRC, "Map_ke"
-
- ISO Party Member
- Posts: 461
- Joined: Fri Sep 03, 2010 12:10 pm
Re: Animated textures
Correction, if you use c++, you can with ogre manually modify the alpha channel of a texture.
I'm trying it out in the moment.
I'm trying it out in the moment.
plz visit my vegastrike project branch here
plz support VegaOgre by donating to it!
My systems: Mac mini 1, 4gig RAM;
i5 Quad Core 2400, 300mbit WLAN, 1,3Tbyte HD, 60 GB SSD,
nvidia geforce 8400gs 512MB, 6gig RAM with Ubuntu 11.4,
win7 and hackintosh installed
plz support VegaOgre by donating to it!
My systems: Mac mini 1, 4gig RAM;
i5 Quad Core 2400, 300mbit WLAN, 1,3Tbyte HD, 60 GB SSD,
nvidia geforce 8400gs 512MB, 6gig RAM with Ubuntu 11.4,
win7 and hackintosh installed
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
Re: Animated textures
I don't think it has anything to do with the issues here.strook wrote:Correction, if you use c++, you can with ogre manually modify the alpha channel of a texture.
I'm trying it out in the moment.