# 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 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 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 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 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 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 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?)

## Create an account

Register a new account

• ## Partner Spotlight

• ### Forum Statistics

• Total Topics
627682
• Total Posts
2978614
• ### Similar Content

• Both functions are available since 3.0, and I'm currently using glMapBuffer(), which works fine.
But, I was wondering if anyone has experienced advantage in using glMapBufferRange(), which allows to specify the range of the mapped buffer. Could this be only a safety measure or does it improve performance?
Note: I'm not asking about glBufferSubData()/glBufferData. Those two are irrelevant in this case.
• By xhcao
Before using void glBindImageTexture(    GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format), does need to make sure that texture is completeness.
• By cebugdev
hi guys,
are there any books, link online or any other resources that discusses on how to build special effects such as magic, lightning, etc. in OpenGL? i mean, yeah most of them are using particles but im looking for resources specifically on how to manipulate the particles to look like an effect that can be use for games,. i did fire particle before, and I want to learn how to do the other 'magic' as well.
Like are there one book or link(cant find in google) that atleast featured how to make different particle effects in OpenGL (or DirectX)? If there is no one stop shop for it, maybe ill just look for some tips on how to make a particle engine that is flexible enough to enable me to design different effects/magic
let me know if you guys have recommendations.
• By dud3
How do we rotate the camera around x axis 360 degrees, without having the strange effect as in my video below?
Mine behaves exactly the same way spherical coordinates would, I'm using euler angles.
Tried googling, but couldn't find a proper answer, guessing I don't know what exactly to google for, googled 'rotate 360 around x axis', got no proper answers.

References:
Code: https://pastebin.com/Hcshj3FQ
The video shows the difference between blender and my rotation:

• By Defend
I've had a Google around for this but haven't yet found some solid advice. There is a lot of "it depends", but I'm not sure on what.
My question is what's a good rule of thumb to follow when it comes to creating/using VBOs & VAOs? As in, when should I use multiple or when should I not? My understanding so far is that if I need a new VBO, then I need a new VAO. So when it comes to rendering multiple objects I can either:
* make lots of VAO/VBO pairs and flip through them to render different objects, or
* make one big VBO and jump around its memory to render different objects.
I also understand that if I need to render objects with different vertex attributes, then a new VAO is necessary in this case.
If that "it depends" really is quite variable, what's best for a beginner with OpenGL, assuming that better approaches can be learnt later with better understanding?

• 13
• 12
• 10
• 12
• 22