Sign in to follow this  
BladeStone

OpenGL measurement vs render speeds

Recommended Posts

If I've posted this under the wrong topic, please locate it accordingly - thank you. I'm finally getting the hang of OpenGL and I'm designing depth and measurements for the game and I understand that the arbitrary unit of graphics means nothing, we have to decided if 1 unit = 1 inch or 1 mile, etc. But is it easier for the rendering of the scene to render an object which is measured in one'th distance is any faster then rentering the same object in thousand'th. For example, if some one is only 6 units high or 60,000 units high. Does it really make an impact on render time and graphic limits? (same number of vertex's, spline, faces, edges, etc) I'm not talking about scaled either, these models are design and imported at those sizes. Thank you in advance, BladeStone

Share this post


Link to post
Share on other sites
Render time: nothing in all useful scenarios.
Render quality: "less is better" up to a certain degree because of the various FP limitations but generally you can choose whatever unit you want and still get reasonable accuracy.

Share this post


Link to post
Share on other sites
How you define your units doesn't affect render time.

Whether the size of an object (6 or 6000 units) affects the render time depends on how big it appears on the screen. When you use the proper projection matrices the screen sizes may be equal for 6 and 6000 units and thus render time would not be affected.

What your choice affects is the render quality. When sizes are too small or too big you could run into precision problems and get ugly artifacts like cracks and seams in your models.

Share this post


Link to post
Share on other sites
I will just add that it's the relative size of objects that can cause artifacts. Rendering a closeup of an ant is ok, and rendering a truck is ok, but rendering an ant on a truck will make it very difficult the see the ant :)

Share this post


Link to post
Share on other sites
It's not only the relative size, but further factors like distance to the camera, distance of near and far clipping planes etc.

Sometimes you'd still get artifacts when rendering two trucks at coordinates that are too big. It's just a matter of unit definition.

Example:

A truck at position (1000km, 1000km, 1000km).

If 1 unit = 1km it's OK: coordinates = (1000, 1000, 1000).

If 1 unit = 1cm you'd get artifacts: coordinates = (100000000, 100000000, 100000000)

Share this post


Link to post
Share on other sites
Ok cool, I was planning of everthing being 10 units = 1 foot and the near plain would be 100 feet and the far plain starts at 200 feet and inbetween would be a intermediate plain.

Thank you again.

Share this post


Link to post
Share on other sites
Near plane at 100 feet with 1 foot = 10 units?

That would mean that everything that is closer to the camera that 1000 units will be clipped and not visible. Is that really what you want? (Since you mentioned the "intermediate plain" I'm not sure if you fully understand the concept of the clipping planes, do you?)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this