Smoke only showing white?
Blitz3D Forums/Blitz3D Programming/Smoke only showing white?
| ||
I'm not at home atm and was trying to knock up some smoke. I know this isn't the best method but I'm really just testing this out. But the problem is I can't get the smoke to be dark gray. It's only showing up pure white. I've done smoke before and I'm not sure what's up with this. You'll have to forgive me if it's simple. It's been awhile since I've done any programming. 8( BTW, the "smoke.bmp" I am using is 64x64. |
| ||
I think you will need to use a blend value of 1, (alpha): EntityBlend fx,1 |
| ||
look here: my Demo shows Realtimesmoke http://www.blitzbasic.com/Community/posts.php?topic=47964#538761 |
| ||
basicly you shouldn't use a bmp for smoke, but a tga. so the alpha channel should actually contain the "body" of the smoke, where the RGB channel may contain no drawings, but only contain the color you want the smoke to be painted. So this way you can set the smoke color to whatever you like. This way you would also make simplyfied shadows. An other method that may utilize a BMP would be to use writepixelfast to edit the RGB channels and use the initial pixel brightness for the alpha channel: rgb=readpixelfast(x,y) and $FFFFFF a=((rgb shr 16)+((rgb and $FFFF) shr 8) + (rgb and $FF))/3 grey=$777777 argb=grey or (a shl 24) writepixelfast x,y,argb of course, this requires to use the alpha flag. argb=rgb |
| ||
Ok I found it. I had to load the texture in a different manner. Looks stunning (according to the wife). :) |
| ||
Depends very much on the quality of the texture. I just used an old smoke texture I found, and it looked very cartoony (-not your code's fault). Would you post the texture you're using? |