Jump to content
  • Advertisement
Sign in to follow this  
sipickles

Particle blending confusion

This topic is 4884 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I have a problem with my particle system It looks great, but has a few problems with the rendering order. At present, I have a background (skybox), an object (spacecraft) and the particles(engine). I render them in this order- bg, particles (with blending), object. I have Z-writing turned off while rendering the particles, because they are not sorted relative to the viewpoint. This makes the object always render over the particles, so looks wrong. However, if I change the order of rendering in any way, eg bg, object, particles, the particles will not render! I am using SetRenderState( D3DRS_DESTBLEND, D3DBLEND_ONE ), to blend the particles. Is this the problem? Thanks for any help. Simon

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
You might want to try something like this:

- Draw background
- Turn on depth writing/comparing
- Draw objects
- Turn off depth writing (keep comparing on)
- Draw particles

Share this post


Link to post
Share on other sites
Do you have a screen shot of both situations? It sounds as if the particles z values are beyond the z depth value. Are you drawing the particles close to the camera or far off? How do you draw your sky box? Is it far off?

Share this post


Link to post
Share on other sites
Have you tried turning off Zbufferwriteenable not acutally ZBuffer. I had a similar problem and that solved it.

Share this post


Link to post
Share on other sites
Yes, you guys have got it!

I was getting confused between Zbufferwriteenable and ZBuffer.

Lovely result, thanks!

Simon

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!