Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 


Submitted by Jaap Suter, posted on August 22, 2000




Image Description, by Jaap Suter



Hello,

Let me first apologize for the bad quality of these shots. You might have to turn up the brightness and contrast of you monitor to see something. I'm very sorry.

Now let me explain what these screenshots should be. The left two pictures are the same except that the upper one is solid and the other is wireframe. The same goes for the right two pictures. I'm sorry for the poor wirerfame quality but D3D has some problems with wireframe mode and the downscaling of the screenshots didn't help much either.

Anyway, the left two pictures are from a scene of 500 randomly scattered cubes. Each triangle has an alpha value of 0.1 which means you can detect overdraw up to 10 pixels. As you can see there is lots of overdraw in the scene. The right two pictures are from the exact same scene. Notice there is no overdraw at all. That is because the right pictures are drawn from a perfect visible set (not to be mistaken with a PVS, which is a potential visible set).

The perfect set can be used for lots of neat things and if you would like to know more about this (and these pictures) then read my latest techfile update over here.


[prev]
Image of the Day Gallery
www.flipcode.com

[next]

 
Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
ktingle

August 22, 2000, 01:19 PM

R u using something like this;


// Set the shading model
pDirect3DDevice->SetRenderState(D3DRENDERSTATE_FILLMODE, D3DFILL_WIREFRAME);





This does not disable lighting, so is it possible u r seeing the effects of the alpha blending?

 
Adam Hoult

August 22, 2000, 01:27 PM

This is some amazing stuff, Very nice Jaap. Now If only I knew how BeamTrees work and how to create them, i'd be able to write my nice fast Lightmap Generator ;) Anyway, congrats !

 
z80

August 22, 2000, 01:32 PM

Pretty amazing stuff! Nice coding Jaap!

Would be interesting to see this used with some lightsources (used as input to the algorithm) to create dynamic shadows.

 
Jaap Suter

August 22, 2000, 05:12 PM

Hi there,

Ktingle: I have no lighting at all in the above scene so that's not the problem. All D3D should do is render a line from begin to end using the following color RGBA( 1.0f, 1.0f, 1.0f, 0.1f ). That shouldn't be a problem imho. It's not something in the geometry cause solid rendering is ok.

Adam Hoult: just mail me if you have any question regarding beamtrees. There are some things simply not possible with them (which I first thought that were) and that makes things a lot simpler.

Z80: In it's current state the beamtrees are still way too slow to be used for dynamic shadows. Lots of optimizations can be done but when coding something not really testable until the full implementation I always implement the slowest most intuitive way first. But then still, there are better ways for shadows maybe.

Some things can be done however. Doing a 360 rotating light on static geometry with dynamic shadows. That is very possible. You construct the beamtree in the preprocessing step en after that you only have to clip against 4 more (current frustum of the light) planes.

Thanks for all your nice compliments. As soon as I have my first lightmap shots running I'll post them.

Jaap Suter

 
fluffy

August 22, 2000, 05:12 PM

Recently I tried implementing my own beamtree variant for dynamic scenes. (Yes, really. :) I wrote about the results in my development diary. Basically, it boils down to that even if beamtrees are great for static scenes (I don't doubt that), they still suck for anything dynamic. :) This particular beamtree implementation I did attempted to solve the arbitrary-order-insertion problem in a way signifigantly differently than your method as described in the techfile, by the way, which retained the O(n lg n) insertion time property.

Sometimes I wish I weren't so intent on keeping everything 100% dynamic, but then I remember how crappy having to compile objects is. :)

--

Code. Music. fluffy.

 
This thread contains 5 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.