|
|
"Slime" <fak### [at] emailaddress> wrote in message
news:43627a77$1@news.povray.org...
>> How many vertices are in the scene?
>
> 15106, so it seems to be doing a little over 1000 a minute (ow).
Ah, well that explains why we haven't been using this technique at work (our
photon-based method takes only a couple of hours for a 3 million vertex
scene! But the results aren't as smooth as this).
In fact that time of 1000 a minute is hardly surprising. Rendering a cube
map at every vertex that means you're rendering 100 frames per second, and I
doubt if you'll get it much faster than that on a good game level.
> The two major bottlenecks in my implementation are the rendering of the
> scene itself (there's no visibility algorithms yet so the entire object is
> drawn for every vertex, and needs more optimization) and the retrieval of
> the render to calculate the (weighted) average color (I'm using
> glReadBuffer
> which appears to be extremely slow). I'm hoping to find a way to do the
> latter part with OpenGL itself so I don't have to use glReadBuffer. I'm
> rendering all parts of the hemicube at 256x256 or 256x128.
It should be possible to sample your cube maps down to one pixel with GL
itself, then maybe do this for several of your points so you end up building
up a texture where each point represents the lighting value for 1 vertex.
Then you can read them all at once with one read call instead of many. But
afaik there's no efficient way within GL to apply those values to the
vertices, you'll have to read them back at some point.
>> Have you applied any filters to the result to make it so smooth?
>
> Nope, just normal triangle interpolation between the vertices. All light
> comes from the environment cubemap, so there are no point light sources
> which would make sharper shadows.
Interesting. I'd be very interested in seeing this on a more organic-shaped
model, I suspect it's going to struggle a bit when you have sharp points or
grooves in your shapes.
--
Tek
http://evilsuperbrain.com
Post a reply to this message
|
|