Welcome to Dream.In.Code
Getting Help is Easy!

Join 136,172 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,917 people online right now. Registration is fast and FREE... Join Now!




Computer graphics question

 
Reply to this topicStart new topic

Computer graphics question

freeit
17 Dec, 2007 - 09:14 AM
Post #1

New D.I.C Head
*

Joined: 4 Aug, 2007
Posts: 22


My Contributions
Depth-buffer visibility is used for properly rendering a scene so that only pixels which are in front of the existing pixel are drawn. Any pixel which lies behind the existing pixel is not shown on screen. This checking is performed using a depth buffer which is a 2-dimensional array of depth or z values which map 1 to 1 to the frame-buffer. Normally modern games use (24-bit Z/8-bit stencil) or (32bit) z buffers. So you have 1 depth value for every pixel in the frame buffer.

Back-face removal is a performance enhancing optimization in which the faces whose normals are opposite to the direction of the camera are not drawn i.e. culled. This way they don’t need to be textured/lit/rendered.

You will have to sort the polygons as per their depth values if you want to know their visibility prior to sending them to the GPU for rendering.

Between the two techniques, can you compare their efficiencies or when one might want to use one or rather than the other?

User is offlineProfile CardPM
+Quote Post

William_Wilson
RE: Computer Graphics Question
17 Dec, 2007 - 09:19 AM
Post #2

lost in compilation
Group Icon

Joined: 23 Dec, 2005
Posts: 3,984



Thanked: 16 times
Dream Kudos: 3275
Expert In: Java, C, Javascript

My Contributions
This seems like a homework question, we are not here to do your work for you, though we are willing to help out. Why not take a shot at giving us an answer and we can guide you through more research or correct mistakes?
User is offlineProfile CardPM
+Quote Post

freeit
RE: Computer Graphics Question
17 Dec, 2007 - 09:25 AM
Post #3

New D.I.C Head
*

Joined: 4 Aug, 2007
Posts: 22


My Contributions
QUOTE(William_Wilson @ 17 Dec, 2007 - 10:19 AM) *

This seems like a homework question, we are not here to do your work for you, though we are willing to help out. Why not take a shot at giving us an answer and we can guide you through more research or correct mistakes?


You don't have to answer if you don't know the answer. The above description is my answer to an old question. It is big enough for anyone to answer the below question.
User is offlineProfile CardPM
+Quote Post

Jody LeCompte
RE: Computer Graphics Question
17 Dec, 2007 - 08:17 PM
Post #4

New D.I.C Head
*

Joined: 22 Sep, 2007
Posts: 47


My Contributions
QUOTE(William_Wilson @ 17 Dec, 2007 - 10:19 AM) *

This seems like a homework question, we are not here to do your work for you, though we are willing to help out. Why not take a shot at giving us an answer and we can guide you through more research or correct mistakes?

While I can see where your impression can be taken, I'd say I have to disagree.

Generally speaking, the question is a bit over-researched to be a homework assignment, the work is practically done.
User is offlineProfile CardPM
+Quote Post

freeit
RE: Computer Graphics Question
18 Dec, 2007 - 09:14 AM
Post #5

New D.I.C Head
*

Joined: 4 Aug, 2007
Posts: 22


My Contributions
QUOTE(Jody LeCompte @ 17 Dec, 2007 - 09:17 PM) *

QUOTE(William_Wilson @ 17 Dec, 2007 - 10:19 AM) *

This seems like a homework question, we are not here to do your work for you, though we are willing to help out. Why not take a shot at giving us an answer and we can guide you through more research or correct mistakes?

While I can see where your impression can be taken, I'd say I have to disagree.

Generally speaking, the question is a bit over-researched to be a homework assignment, the work is practically done.


Note to previous answerers: If you don't know what you are talking about, please do not answer. This question makes perfect sense and is perfectly reasonable if you know anything about Computer Graphics.
User is offlineProfile CardPM
+Quote Post

Jody LeCompte
RE: Computer Graphics Question
19 Dec, 2007 - 02:00 AM
Post #6

New D.I.C Head
*

Joined: 22 Sep, 2007
Posts: 47


My Contributions
I wasn't aware I had even attempted to answer a question, but thanks none the less for pointing out my wrong doing.

User is offlineProfile CardPM
+Quote Post

NickDMax
RE: Computer Graphics Question
19 Dec, 2007 - 11:23 AM
Post #7

2B||!2B
Group Icon

Joined: 18 Feb, 2007
Posts: 2,858



Thanked: 49 times
Dream Kudos: 550
My Contributions
QUOTE
You don't have to answer if you don't know the answer.
Ok, you DID realize that WW is a moderator? The site has a policy not to do peoples homework for them. You should take that to heart else you will not find this a very friendly forum.

Now on to your question:

Well I was a big fan of z-buffering -- it is a fairly strait forward way of dealing with the problem of rendering a scene. It DOES tend to lead to poor edge definition (z-fighting). You have to remember that it is actually a false 3D... it is a set of planes really.

Back Face removal on the other hand is more 3D friendly. The biggest problem is that it only works with convex polygons (well it can do some concave polygons just not all). For this reason you need to convert all of your shapes to collections of convex polygons.

You can read up on these techniques on sigraph.org (great place for info on computer graphics)

As for why you choose one over the other depends on what you are doing.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 12:39AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month