MD2, CopyEntity, and Alpha trouble
Blitz3D Forums/Blitz3D Beginners Area/MD2, CopyEntity, and Alpha trouble
| ||
Found a bit of a quirk! Been using masked bmps for a long time. No problem. Went to use alpha and - whoa. Here's what happens: 1. I have an animated grass md2 object. 2. I use copyentity to save on memory. 3. I use several animations picked at random for each copy at different speeds, starting frame#. AnimateMD2. 4. It works. UNTIL I don't use a masked .bmp and/or use ALPHA at ALL. Then suddenly every copy is running the same ANIMATION. Huhhh... ? I can't do ghost grass? Someone know the magic trick/combo? EntityAlpha. BrushAlpha. TGA file with alpha flags. Different brush and texture fx/blend modes All no good. Am I asking too much of it? |
| ||
Code example? |
| ||
WHERE Plant.md2 is 8 verts, 3 Quads, containing normal data and 141 frames of vertex animation AND Grass1.bmp is green grass on a black background. Without any alphas uncommented, runs fine. Desire- Alpha transLUCENCY AND masked. I did TRY multitexturing also. |
| ||
Guess I'm asking too much. Sigh... The MD2 method's very fast and I have other MD2's To use with this method - like Ghost Monsters, etc... |
| ||
No idea really, but you are treating the orginal and the copies differently. Original gets this:br=GetEntityBrush(A) BrushColor br,255,255,255 ;BrushAlpha br, .7 PaintEntity A, br FreeBrush br ;EntityAlpha A,.7 Perhaps try doing the same to all the copies: For t=0 to 49 C[t]=CopyEntity(A) br=GetEntityBrush(C[t]) BrushColor br,255,255,255 ;BrushAlpha br, .7 PaintEntity C[t], br FreeBrush br PositionEntity C[t],Rnd(-40,40),0,0 ;EntityAlpha C[t],.7 s=Rand(0,13)*10 AnimateMD2 C[t],1,.2,s,s+9 NextOf course this is pure guesswork, completely untested. I'm just editing code in the reply box here on the forum, replacing A with C[t]. |
| ||
You'd be amazed the permutations I tried. Edit: VERIFIED total brush application redundancy to copied entities is a NO GO also. |
| ||
Inconvenient quirk. Anybody else NOT having this problem? |
| ||
Never used MD2's anymore since my first encounters with Blitz3d, as I got the impression they were for very low poly characters only, and the B3D format was more superior. Perhaps true for most people? |
| ||
I love blitz3d and it's format for maps and common objects! But- I observed (at least on my rig) that for monster onslaughts the md2 format and per-vertex animation (insane detail, I know) it provides for simple critters seemed to top out at about 10x faster than an articulated b3d character. I had two-thousand md2 objects/instances in my test, and could only keep about 200 b3d objects working at the same frame rate. I save b3d for my most detailed and important characters! BUT MY OLD TEST IS NOT what I need help with here. Heh. |