Advertisement

Three BIG topics to cover for a BIG newbie =P (Please Help)

Started by January 26, 2002 04:54 PM
2 comments, last by GroZZleR 23 years, 1 month ago
Hey all, Can you please help me with the specific areas that I''m really confused on. _____________________________________________________________________________________________ * Rendering A Scene * I haven''t done all of NeHe''s tutorials yet, but, from what I''ve gathered the way a scene is render is like this: You put a "cursor" at a certain point, and from that point you plug co-ordinates into the scene and it draws them. After each drawing of a point, it returns to the "cursor" location and draws your next point until your Quad is complete. I don''t understand how you can take something like that and then draw either an indoor or an outdoor level out of it. I mean, in your map file, you''re going to have to have a "cursor" point for every quad that gets drawn. Isn''t there a way to just put in an X-Y-Z co-ordinate based around the 3D space and draw it from there? Why do you have to set up this "cursor" to draw? Its hard to explain, I hope you followed that. Please fill me in on A) is there a way to avoid putting a translation point (is that the right word for it?) and B) How you would go about removing the point and C) How would a map file work, if you have to have this "cursor" at every point before your quad gets drawn. _____________________________________________________________________________________________ * Storing Quad Information * I''m going to try to make a Tetris clone with OpenGL. How could I house the information of where the quad currently is, within an array? The issue that comes to mind is, how would I get the X-Y-Z co-ordinates of the current quad to write into an array. Then my display would draw the array, with all 0''s being non-filled in parts and all 1''s being filled in parts. This more or less relates back to the first question. How would I go about knowing where the X-Y-Z points are, when in fact the "X-Y-Z" points are from the translation point? _____________________________________________________________________________________________ * Prevention of Rendering * I''ve been playing around with NeHe''s excellent tutorials and have had some fun. I did the tutorial (#10) where you can move around in the world. But it occurs to me, that the entire world is being rendered, even if I''m out in the blackness of space, the world is still being rendered. And I''m thinking, how is this possible in larger scale? Its no big deal when you''re in like 6 quads or whatever, but what if you had a huge world, how would you stop what you can''t see (behind you, to your sides, behind a wall thats blocking your view) and stuff thats out of your view range (say, 500m infront of you) from being rendered? What approaches would you take, what are the terms called, can you point me in the general direction, etc.? _____________________________________________________________________________________________ Thanks guys, all help is strongly appreciated. In recap: Is there a way to put points in 3D space using X-Y-Z without some translation? How would map files been written if you need this translation (or "cursor" point)? How can I store information into arrays for a tetris-clone, when my X-Y-Z of a quad is the translation or "cursor" point? How can you prevent things from being rendered that you can''t see (both distance and behind walls)? Thanks in advance! Tremble before me, I am your new God.
For your prevention of rendering, the term your looking for is depth culling. If you use the line:

glEnable(GL_DEPTH_TEST);

it won''t render the other side of the object that''s facing the camera (viewport).

This should be fine for a beginer like yourself.

Advertisement
Aww I see, thanks.

What about for the other stuff, anyone know or can give insight?

Tremble before me, I am your new God.
there are a few other culling techniques you might be interested in:
clustered backface culling, heirarchic view frustrum culling,
portal directed occlusion culling, and heirarchic occlusion
culling (among others)..

1) clustered backface culling deals with clustering polygons
according to the similarity of their normals

2) hierarchic view frustrum culling organizes the objects in the
scene into a precomputed hierarchy of bounding volumes (BSP trees
usually). it works by calling a recursive algorithm that determines
which objects potentially intersect the current view frustrum (thereby
eliminating the objects that you cant see).

3) portal directed occlusion culling is usually only used
in scenes that involve alot of 'indoor' activity..
ie) it'll only render 1 room and the hallway that you can see
(as well as all the objects within).

4) hierarchic occlusion culling is a fancy way of saying
depth buffering

if you search around the net you can probably find a few tutorials
on how to effectively use these culling techniques.. most
of what i know i've read from various reports around the net.

hope this has been of some use...

-eldee
;another space monkey;
[ Forced Evolution Studios ]

Vash says: eat more donuts, play more games!

Edited by - eldee on January 26, 2002 12:05:04 AM

-eldee;another space monkey;[ Forced Evolution Studios ]

This topic is closed to new replies.

Advertisement