Real-time landscape rendering

Real-time landscape rendering

Post by Alex Champandar » Mon, 19 Oct 1998 04:00:00



Hi,

I'd like to optimize my realtime landscape renderer, every time i speed
up the algorithm it looks like shit.

Here's the basic algorithm:

        set the camera matrix
        for each ray do
                * find the coordinates of the ray in voxel space
                * with a 3d line algoritm, interpolate along the ray,                   starting at
the origin of the ray
                        - get the height of the voxel from the                                  height-map (project the
pixel onto the plane                    y=0 to get the coordinates in bitmap )
                        - if the ray intersects, then set the pixel to                          the corresponding
color, and exit the loop.
                end interpolation loop
        end for each ray loop

My problem is the 3d line part. I need a quick algorithm which enables
you to start at any point (x1,y1,z1) and interpolate to (x2,y2,z2)...
In all the algorithms I know, you must swap some values, to start with
the smallest.

My algo currently uses 16.16 fixed point, and splits each case into 4
groups:
                        Dx>0 , Dz>0
                        Dx>0 , Dz<0
                        Dx<0 , Dz>0
                        Dx<0 , Dz<0

and then calculates the step, and just interpolates ( very naive isn't
it). Anyway, this looks crap, since due to lack of precision, you can
distinctly distinguish the different zones in the voxel...

                        If you got any ideas, please let me know...

                                        Alex

 
 
 

Real-time landscape rendering

Post by John M. Dlugos » Wed, 21 Oct 1998 04:00:00



>I'd like to optimize my realtime landscape renderer, every time i speed
>up the algorithm it looks like shit.

Have you ever seen the "Graphics Gems" series of books?  They are full of
things like this.  I don't know if this particular problem is covered, or in
which volume, but reading some of the algorithms can be inspirational, in
general.

 
 
 

1. realtime landscape rendering

Does anybody know where I might be able to get some information on some
landscape renderers that operate in realtime. Please bear in mind it will
have to significantly high resolution and will run most likely on an SGI
Onyx or SparcStation 20. It will also have to be able to intcorperate
IGES files and DXF models. Please repond by mail.

--
+--------------------------------------------------+
| Q: What do you say to the man who has everyhing? |
| A: Hi, friend!                                   |
+--------------------------------------------------+

2. Great Looking Gif's

3. Real-time LOD Landscape

4. Web Designers 40% off our hosting fees.

5. Videogame developing "real time rendering"?

6. is it possible to reflect a glow?

7. Real-time rendering system becomes available

8. GL in X-Windows

9. NEW BOOK: REAL TIME RENDERING

10. Videogame developing "real time rendering"?

11. Real-time 3D volume rendering of medical images

12. Advice wanted: real time volume rendering

13. 3ds is for real-time rendering?