Bmp for Particle

Blitz3D Forums/Blitz3D Beginners Area/Bmp for Particle

Hardcoal(Posted 2015) [#1]
Hi..
When I see Particle engines they use bmp
Format and not png.. As a particle
But how can you turn bmp into transparent..?
Or do they just put it on a sprite?

Does it matter which format I'll be using?


Matty(Posted 2015) [#2]
Some do use png.

If they are using bitmaps they may be simply be using additive blending in which case alpha doesnt always matter.

Alternatively they use a mask colour and set the mask to transparent.

Or they use two bitmaps. One with color info and the other usually greyscale as a transparency map.

Those are some possibilities.


RemiD(Posted 2015) [#3]
When you load a texture, you can specify if you want to hide the black (0,0,0) texels (flag 4) or display a progressive transparency/opacity of some texels (flag 2), if the image has no alpha info, i suppose that the texels which are darker are the most transparent and the texels which are brighter are the most opaque.

You can also write the alpha of each texel after having loaded the image with flag 2.

From what i understand, png have rgba infos whereas bmp have only rgb infos.

You may be interested in this : http://www.blitzbasic.com/Community/posts.php?topic=82448


Hardcoal(Posted 2015) [#4]
I'll check the link later remi tnx
And Matty too

So Particle Effects are made by cloning sprites?
Are cloning sprites faster then cloning a 3d textured cube?

I made my engine by cloning mesh
But I suspect sprites are faster..


Matty(Posted 2015) [#5]
Using an entire cube is pretty wasteful in 99.9 percent of cases.

There are different techniques these days with blitz3d / directx7 rectangular quads (2 tris) which share the same surface are the way to go for speed.

Sprites will work fine until you find that performance is becoming an issue. However if you arent using too many (in other words performance is fine on your target device) then use them.


The only time I would a cube as a particle is if I wanted a particular rffect that I couldnt achieve another way.


Hardcoal(Posted 2015) [#6]
U say sprites are heavier then a 2 tris shape?

I thought sprites are made for speed..

For example vegetation on a terrain, arnt they sprites?


RemiD(Posted 2015) [#7]
On all computers that i have tested my prototypes/demos/templates on, using seperate meshes/surfaces (copymesh) is slower than using copies of entities (copyentity) and is slower than using one mesh/surface.

An example :



Hardcoal(Posted 2015) [#8]
So bottom line.. Which is the goal of my questions..

What should I use for Particle engine?
For example how does ParticleFX works..?