Sign in to follow this  
Andrew Kabakwu

Game Object Scale Question

Recommended Posts

Hello,
I've been working on a game and have a problem making the objects' relative scales look realistic.

What I mean is, in my code I use 1 unit to represent 1 meter. So, a man in my game is around 1.8 to 2.0 units in height which I believe to be the average height for real world men.

Now, when I put the camera at this game object's head, the ground and surrounding objects do not LOOK realistic in scale i.e the ground does not look like it's at his feet 2 meters below.

My question is how can I set the world objects scales so that a man standing next to say a building actually looks as it does in real life?

Thanks.

Share this post


Link to post
Share on other sites
I was about to ask the same sort of question once. Played around with the camera FoV, but for some reason either the objects looked too far away, or the camera was too much focussed on a point (not seeing the surroundings). Still not 100% happy, but maybe these few tips can help, additional to what Evil Steve said:

- Screen resolution? Full-screen or a nested smaller view makes quite some difference in the "viewing experience"

- Texture scale. Really important. If your textures are stretched out, you'll get huge bricks and ugly texels. This will mess up your idea of the scalings as well. In case you are affraid of seeing too much tiling:
* Use mipmaps to blur out the distant textures a little bit
* Instead of shrinking the texture scale, add a second detail texture or normalMap for the fine details (spickles on wall/skin, wood nerves, carpet hairs, sand, etc.).

- Don't forget to add smaller details as well. If you are standing in a simple square chamber without small stuff such as lightswitches, pipes, railings, garbage, wall decals or cables, its size will can trick you as well. Have some reference points.

Good luck!
Rick

Share this post


Link to post
Share on other sites
Thanks for responding, sorry for the delay in getting back.

The camera has the following settings-
FOV 45.0
Height 1.8

The dimensions of the objects in the shot are -
Walls (7.97, 3.13, 0.27)
Border stone (2.00, 0.65, 0.55)
Candelier (1.37, 1.47, 1.40)
Column (0.65, 1.66, 0.65)

All are placed at the ground level (position y coord = 0).

I've attached a screen shot of the view from a test scene in the editor,

screenshot

Based on their dimensions, does the shot look correct?
If the shot looks wrong, How can I fix it?
What scales should I use to scale objects to look realistic from a human point of view that is 1.8 meters tall?

Thanks

Share this post


Link to post
Share on other sites
The screenshot looks reasonable, but 45 might be a little narrow for a field of view (either vertical or horizontal).

I'd suggest making the FOV easily tweakable (e.g. make it possible to change it in real time using the arrow keys), and then try some different values to see if you can get results that you like.

Share this post


Link to post
Share on other sites
First of all, for the love of Pete turn on mipmapping and texture filtering.

In terms of scale, the lack of positional lighting flattens and shrinks things; using point and spot lights instead of ambient/directional/unattenuated lights will add to the sense of scale.

Also, none of the items you've shown there provide strong scale cues. Pillars, chandeliers and miscellaneous ground box things can all be of any size. For that matter, your textures don't provide strong scale cues either... there's plenty of different sizes for stones.

Share this post


Link to post
Share on other sites
It's also pretty hard to judge the depth of an object without shadows in my opinion, which messes with (at least my) your perception of how big an object is. For instance, had you not told me the objects were all at Y = 0 I would have thought the chandelier was much closer to the camera (since my natural metaphor for a chandelier is that it is suspended in the air). Having shadows gives you a point of reference of the object versus the ground.

Share this post


Link to post
Share on other sites
Thank you for all your replies, I'll start looking at all the suggestions made.

Quote:
Original post by Sneftel
First of all, for the love of Pete turn on mipmapping and texture filtering.


Mipmapping is On. I called gluBuild2DMipmaps (...) (will be changing to glGenerateMipmap (...)) when I create the texture object and specify its data.
Is that enough?

In terms of texure filtering, Do you mean Anisotropic Texture Filtering?


Quote:
Original post by Sneftel
Also, none of the items you've shown there provide strong scale cues. Pillars, chandeliers and miscellaneous ground box things can all be of any size. For that matter, your textures don't provide strong scale cues either... there's plenty of different sizes for stones


I don't understand what you just worte.
Could you explain how textures can provide strong scale cues?

Share this post


Link to post
Share on other sites
Stones, bricks and so on can be any size really. Banks are often made of blocks which are 18 inches by two foot or even more. House bricks are much smaller. There's no cue to tell you which kind the walls are made of.

If your textures start having things in them that people intuitively know the size of, then it helps. Eg; calendars pinned on the wall, paintings and so on. Wood panelling (the sort you get in old houses) also has a known scale -- the squares are usually a foot or eighteen inches on a side or so. Rows of books on shelves also have a more obvious size.

Put human-scale objects into the scene -- chairs are good one. Everyone knows how big chairs should be.

Share this post


Link to post
Share on other sites
Quote:
Original post by Andrew Kabakwu
Mipmapping is On. I called gluBuild2DMipmaps (...) (will be changing to glGenerateMipmap (...)) when I create the texture object and specify its data.
Is that enough?
You also need to enable the use of the mipmaps on the texture object with glParameter.
Quote:
In terms of texure filtering, Do you mean Anisotropic Texture Filtering?
Ideally, but linear filtering would be enough. Anything to get rid of that background graininess you've got going on.

Share this post


Link to post
Share on other sites
Thanks for all your responses, I did use glTextureParameter but set both Min and Mag parameter to GL_NEAREST for the normal map.

I've changed that to GL_LINEAR for the Magnification parameter and GL_NEAREST_MIPMAP_LINEAR for the minification parameter.

This seems to have removed the grains.

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