Archived

This topic is now archived and is closed to further replies.

HellRaiZer

Billboard problems

Recommended Posts

Hello... I have a little question on billboards. Is there any way of preventing billboards from overlapping polygons??? Let me explain. Imaging you have a billboard for a light flare. This billboard is attached to a light object, and the light object is attached to a wall. When you get away from the wall, billboard''s size increase, and from a distance and over, the billboard seams to get inside the wall (when you are looking at it from and angle, not staight ahead!!). I can''t find a way of testing this, and doing something about it, except from not increasing billboard''s size. But this is not a option, because light flares must behave like this!!! Thanks in advance, and forgive my terrible English. HellRaiZer

Share this post


Link to post
Share on other sites
Depending on which artifact you''re trying to prevent:

1) Render all the walls first so that they write to the depth buffer, then render the billboards with depth testing enabled so that the light is cut off if it goes behind a wall.

2) Render the walls into the stencil buffer and then only render the light billboard onto pixels which are set in the stencil buffer. i.e. the light will then clip so that it only appears on the wall.

--
Simon O''Connor
ex -Creative Asylum
Programmer &
Microsoft MVP

Share this post


Link to post
Share on other sites