Transparency problems (with Sprites)
Hi. Im writing a 2D simple game. Forasmuch I can't insert pictures into the forum, I'll try with links, if it's not forbidden.
There is some cloud:
I have a background image:
(the turquoise color is the back color, it's ingored when drawing).
arranges:
- moving clouds
- draw clouds
- draw background
- draw, control enemies etc.
At this point everything is ok. When I hurt an enemy, some blood-blots is put onto the screen with alpha value:
The blood blot is burned into the background. I use the ID3DXSprite, change the surface's target (not to backbuffer), and draw it. It is neither problem.
The problem is inside the white circle. Can you see those yellow colors in the blood? That is the problem. When I burn a blood-blot to a background image, the background image's alpha bit changes too. That's why the clouds are filmy, I guess.
Question is: how to burn this bloody effect into the background not to be visible the cloud?
[Edited by - BigBeginner on January 20, 2006 6:04:09 AM]
Quote:Original post by BigBeginner
Hi. Im writing a 2D simple game. Forasmuch I can't insert pictures into the forum, I'll try with links, if it's not forbidden.
Nothing wrong with posting images inside posts unless they're "bad" pictures. Post a bad picture in a post and you might as well start running now [lol]
Anyway, to embed an image:
<img src="filename here">
If the image is particularly large (say, greater than 500 x 500) you can reduce its size:
<img src="filename here" width="50%">
Your images are pretty small though - posting slightly larger ones might be a good idea.
Jack
Quote:Original post by BigBeginneruhm, whats this all about?
if my English was **** (it is possible), or something is not clear, write it...
Don't be unreasonable:
- You're the only one thats posted - your last 3 posts haven't really had anything in them (unless you edited them quickly?)
- No one has commented on the use of your language, but less of the swearing please as it's not appropriate here.
- It's been less than 5 hours since you posted. Wait longer for a reply, in truth there are rules against bumping a thread inside of 24 hours.
Jack
I think your solution is to change the draw-order for your sprites. You could possibly set D3DTS_ZWRITEENABLE to FALSE - you'll need Z Testing, but particle systems can often skip the draw-order sorting by avoiding Z writes.
hth
Jack
hth
Jack
Hm.
I'll think about it over, but the main problem is: when I burn the blood to the background image, it's alpha values change - all the pixel of background's alpha value is 255 (not transparent) and when the blood put it on, it's alpha values changes too. That's why the clouds are appearing in the blood-effect. I guess.
I'll think about it over, but the main problem is: when I burn the blood to the background image, it's alpha values change - all the pixel of background's alpha value is 255 (not transparent) and when the blood put it on, it's alpha values changes too. That's why the clouds are appearing in the blood-effect. I guess.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement