Can I use ComputeSphereVisibility to check if a vector is visible? 
Author Message
 Can I use ComputeSphereVisibility to check if a vector is visible?

I'm trying to make a light flare system. Any other (fast) approaches,
perhaps? What about accessing the Z-buffer directly?


Mon, 21 Oct 2002 03:00:00 GMT  
 Can I use ComputeSphereVisibility to check if a vector is visible?

Quote:
> I'm trying to make a light flare system. Any other (fast) approaches,
> perhaps? What about accessing the Z-buffer directly?

I thought about the same thing ( accessing z-buffer directly ) back in 97 or
so. Problem then was that the locking was too much overhead to do more than
a few times per frame. Also, some hardware like VideoLogic/PowerVR PCX and
PCX2, and the new Neon250 do not even HAVE a zbuffer to lock. The same
question popped in in the DirectX developer's mailing list just recently,
and pretty much same arguments were repeated -- seem that this has not
changed much of lately.

It seems the best way to check if a point, sphere, whatever is visible to
the viewpoint, is to check against the database you are rendering. You need
fast intersection code anyway, if you are to test trajectories ( of bullets?
;-) for instance against the database.

I don't know what you are doing, but if it is a game, then I assume it is
interactive, which requires you to design the world database so that it
drives both, physics -and- visualization efficiently. Very many graphics
programmer, who work or want to work with games, need also be very good
physics programmers ( or, need to design the software with one in close
cooperation ;-)

.. just my experiences ( aka. $.02 -- but I am only a guy, which means I can
only speak for myself -- anyone with more constructive help, step forward
;-)

--j



Wed, 23 Oct 2002 03:00:00 GMT  
 Can I use ComputeSphereVisibility to check if a vector is visible?
Darn. I'm only an amateur yet, and such advanced routines would be >quite<
hard for me to implement fast enough. Well, back to the drawing board. :-(



Quote:
> > I'm trying to make a light flare system. Any other (fast) approaches,
> > perhaps? What about accessing the Z-buffer directly?

> I thought about the same thing ( accessing z-buffer directly ) back in 97
or
> so. Problem then was that the locking was too much overhead to do more
than
> a few times per frame. Also, some hardware like VideoLogic/PowerVR PCX and
> PCX2, and the new Neon250 do not even HAVE a zbuffer to lock. The same
> question popped in in the DirectX developer's mailing list just recently,
> and pretty much same arguments were repeated -- seem that this has not
> changed much of lately.

> It seems the best way to check if a point, sphere, whatever is visible to
> the viewpoint, is to check against the database you are rendering. You
need
> fast intersection code anyway, if you are to test trajectories ( of
bullets?
> ;-) for instance against the database.

> I don't know what you are doing, but if it is a game, then I assume it is
> interactive, which requires you to design the world database so that it
> drives both, physics -and- visualization efficiently. Very many graphics
> programmer, who work or want to work with games, need also be very good
> physics programmers ( or, need to design the software with one in close
> cooperation ;-)

> .. just my experiences ( aka. $.02 -- but I am only a guy, which means I
can
> only speak for myself -- anyone with more constructive help, step forward
> ;-)

> --j



Wed, 23 Oct 2002 03:00:00 GMT  
 Can I use ComputeSphereVisibility to check if a vector is visible?
You could have a look at the SDK flare sample.

I would just check for the light source visibility. IMO if the light source
is not visible, no flares. If the source is visible, I would just spread
scaled quads on a line that start from the ligh source accross the screen
passing by the center of the screen (no need for 3D computation IMO)...

Patrice



Quote:
> I'm trying to make a light flare system. Any other (fast) approaches,
> perhaps? What about accessing the Z-buffer directly?



Wed, 23 Oct 2002 03:00:00 GMT  
 Can I use ComputeSphereVisibility to check if a vector is visible?
im not so sure about that, ive just had a look at a couple of flight sims ,
and the flares are sometimes visible when the light source is not

--
www.mr-gamemaker.co.uk
The Ultimate Game Developers Resource

Quote:
> You could have a look at the SDK flare sample.

> I would just check for the light source visibility. IMO if the light
source
> is not visible, no flares. If the source is visible, I would just spread
> scaled quads on a line that start from the ligh source accross the screen
> passing by the center of the screen (no need for 3D computation IMO)...

> Patrice



> > I'm trying to make a light flare system. Any other (fast) approaches,
> > perhaps? What about accessing the Z-buffer directly?



Thu, 24 Oct 2002 03:00:00 GMT  
 Can I use ComputeSphereVisibility to check if a vector is visible?
Anyway having accurate physics here is much less important than having
something nice. I believe this is caused by refraction of light in the lens
(hence my source light visible restriction) but this is really not that
important.

Anyway there should be ne no lens flare for human vision, other than when
looking through a camera, but who cares ;-)

Patrice



Quote:
> im not so sure about that, ive just had a look at a couple of flight sims
,
> and the flares are sometimes visible when the light source is not

> --
> www.mr-gamemaker.co.uk
> The Ultimate Game Developers Resource


> > You could have a look at the SDK flare sample.

> > I would just check for the light source visibility. IMO if the light
> source
> > is not visible, no flares. If the source is visible, I would just spread
> > scaled quads on a line that start from the ligh source accross the
screen
> > passing by the center of the screen (no need for 3D computation IMO)...

> > Patrice



> > > I'm trying to make a light flare system. Any other (fast) approaches,
> > > perhaps? What about accessing the Z-buffer directly?



Thu, 24 Oct 2002 03:00:00 GMT  
 Can I use ComputeSphereVisibility to check if a vector is visible?

Quote:
> Anyway having accurate physics here is much less important than having
> something nice. I believe this is caused by refraction of light in the
lens
> (hence my source light visible restriction) but this is really not that
> important.

Acturally, the light source dont need to be visible through viewpoint to
have lenz flare in real camera lens. All it needs is the light shine
directly on the 1st glass of the lens. for example, you have a 50mm lens,
its FOV is about 50 degrees. however the sun can directly shines on the
glass even if it is out of the FOV, (say... 45degreen on the right of the
lens dir??), in this case, you still have lens flare, (of couse, assume you
have a crappy lens.. :), thats why most people add a shader infront of their
lens.

modern (good) Multi-coating lens can reduce the lenz flare effect by a great
deal.



Sat, 26 Oct 2002 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. List1.Visible - what am I missing

2. I am trying to update a record, i am not using data control

3. I am trying to update a record, i am not using data control

4. Making Check Boxes More VISIBLE

5. Help Please - checking if form is visible

6. Checking if a form is visible

7. How to check if a window/control is partially visible

8. ComputeSphereVisibility?

9. ComputeSphereVisibility

10. API to check if a Form (Window) is visible or not

11. How to check if a window/control is partially visible

12. Using a dataset to check items in checked listbox

 

 
Powered by phpBB® Forum Software