Jump to content

World size


isidisi
 Share

Recommended Posts

Is necessary to have any consideration about the size of the world in dimensions?

 

Because I have noticed that if I create a world with a model in it (dimensions near 10), and later I create a world with the same model scaled * 1000 (dimensions near 10000) and lights with theirs range scaled * 1000, and all coordinates scaled * 1000, the result seems not to be the same...

 

In the world scaled * 1000 I notice some light artifacts similar to z-fightings, and in the small world all is rendering nice. These artifacts doesn't start near origin, only as I go far in distance from it...

 

I did the test of moving the model so the parts that were far from origin now are near origin. Then this parts are rendered ok. It seems that objects far away from origin is not lighting ok...

 

Is there a model scale Leadwerks is designed to work properly, or a maximum value for object coordinates?

Link to comment
Share on other sites

Is there a model scale Leadwerks is designed to work properly, or a maximum value for object coordinates?

 

I think 1 unit = 1m is the scale it's designed for. I personally use 1 unit = 25cm (So 4x larger), and that seems fine. I suspect that the scale is not the issue, but rather, how far apart the vertices are. Doing a simple ScaleEntity(entity,Vec3(1000,1000,1000)) will make the vertices much further away. Larger faces probably result in crappy lighting - regardless of scale.

LE Version: 2.50 (Eventually)

Link to comment
Share on other sites

[offtopic]

 

In my language "isidisi" means "easygoing" - yet, you keep wetting yourself.

 

Here is my straight personal view !

Iam a very bad guesser.

I cant say what kind of experiments you are trying and for what reason.

Plus you are a 2.0SDK user - there possibly where bugs no_one remembers.

 

[/offtopic]

 

So let this be my last guess on you newbees. :P

 

The modelscale should be choosen relative to the world and/or terrain size.

 

It might be not wise to (over)scale lights nor to intersect pointlight volumes. -> choose a midway.

 

The key here is renderpasses per pixel ( if its the same for a deferred renderer ) e.g. guessing.

 

At least provide your system specs so one can exclude driver issues.

AMD 64 X2 Dual 5k - 4GB - XFX GForce9800GT - nv196.21 - WinXP Sp3

zBrush4R2 - Silo2Pro - Unwrap3DPro - Gile - MaPZone2.5

 

adv_banner-april2012_720x150_tex01.png

 

Xxploration FPS in progress ...

Link to comment
Share on other sites

[offtopic]

 

In my language "isidisi" means "easygoing" - yet, you keep wetting yourself.

 

Here is my straight personal view !

Iam a very bad guesser.

I cant say what kind of experiments you are trying and for what reason.

Plus you are a 2.0SDK user - there possibly where bugs no_one remembers.

 

[/offtopic]

 

So let this be my last guess on you newbees. :P

 

The modelscale should be choosen relative to the world and/or terrain size.

 

It might be not wise to (over)scale lights nor to intersect pointlight volumes. -> choose a midway.

 

The key here is renderpasses per pixel ( if its the same for a deferred renderer ) e.g. guessing.

 

At least provide your system specs so one can exclude driver issues.

 

 

I'm sorry, I'm developing using 2.28 version of the library.

My system specs are:

Windows XP SP3

CPU Core 2 Quad Q8200 2.33GHz

4GB RAM

Graphics Card: NVidia GForce 9500 GT.

 

My model is a train and is the only model on the scene, there's no terrain, all the scene is composed by the train, a camera and a light.

 

The train is about 100meters long. With the model exported in meters all is ok. With the model exported in cm (10000 units) artifacs appear far away of the origin of the coordenates.

 

The light is child of the camera so as I move the camera along the train it lights the zone near to the camera. Because of this is a strange thing I see artifacts far away of origin of coordenates, not far away of light...

 

If I move my model I see that the zone near origin always is renderend ok, artifacts only appear at the geometry further from origin of coordinates...

 

 

Mumbles, with your critery of 1 unit = 25cm, what's the bigger world you have created? My world is 10000 units long, must be this is the problem?

Link to comment
Share on other sites

If the artifacs appear on the train it might be "shadow acne" + quality of shadows are scaling over distance (for FPS) which can be visible.

 

zFar and zNear (camera) values have to be usable for with your scene too e.g. worldSettings.

 

As a 2.28 developer you should absolutely skim through the "old" forum at forum.leadwerks.com and download/read this one :

http://leadwerks.com/files/Deferred_Rendering_in_Leadwerks_Engine.pdf

 

hth

AMD 64 X2 Dual 5k - 4GB - XFX GForce9800GT - nv196.21 - WinXP Sp3

zBrush4R2 - Silo2Pro - Unwrap3DPro - Gile - MaPZone2.5

 

adv_banner-april2012_720x150_tex01.png

 

Xxploration FPS in progress ...

Link to comment
Share on other sites

If the artifacs appear on the train it might be "shadow acne" + quality of shadows are scaling over distance (for FPS) which can be visible.

 

zFar and zNear (camera) values have to be usable for with your scene too e.g. worldSettings.

 

As a 2.28 developer you should absolutely skim through the "old" forum at forum.leadwerks.com and download/read this one :

http://leadwerks.com/files/Deferred_Rendering_in_Leadwerks_Engine.pdf

 

hth

 

But quality of shadow are scaling over distance has sense if the distance is measuring from lights, not from origin of coordinates, isn't true? And i'm moving my light with the camera along the train...

 

I scaled near and far distance in camera in the same scale as the model...

Link to comment
Share on other sites

Mumbles, with your critery of 1 unit = 25cm, what's the bigger world you have created? My world is 10000 units long, must be this is the problem?

 

I don't have a 'world size'. the world is as big as it needs to be. The objects placed in it are built to the 1 unit : 25 cm scale. And camera ranges are: near: 0.01 (2.5 mm) far: 3000 (750 metres).

 

10000 units long, is it an MMO type game? A world that large is better built like a jigsaw puzzle, and only show each pice of the world when you are within (for example) 300 units of the middle of that piece.

LE Version: 2.50 (Eventually)

Link to comment
Share on other sites

I don't have a 'world size'. the world is as big as it needs to be. The objects placed in it are built to the 1 unit : 25 cm scale. And camera ranges are: near: 0.01 (2.5 mm) far: 3000 (750 metres).

 

10000 units long, is it an MMO type game? A world that large is better built like a jigsaw puzzle, and only show each pice of the world when you are within (for example) 300 units of the middle of that piece.

 

10000 units long is no because is a long world, is because I used cm as unit and have a model (train) of 100meters (= 10000cm = 10000units)... But using meter as units all works ok (100m = 100units). It's only that I wanted to know and understand why Leadwerks is scale dependent...

Link to comment
Share on other sites

I guess it's because of distance between verts

 

1 unit = 1 cm, the verts are really far apart

1 unit = 1 metre. the verts are quite close together

 

U and V are values between 0 and 1. So larger triangles (or quads), with the 1 unit = 1 cm scale, equals less accuracy with the floating point. I guess that has something to do with it.

LE Version: 2.50 (Eventually)

Link to comment
Share on other sites

I guess it's because of distance between verts

 

1 unit = 1 cm, the verts are really far apart

1 unit = 1 metre. the verts are quite close together

 

U and V are values between 0 and 1. So larger triangles (or quads), with the 1 unit = 1 cm scale, equals less accuracy with the floating point. I guess that has something to do with it.

 

I don't thisk this, if all is scaled the result must be the same, except if in Leadwerks something is supposed to work with lower coordinates...

 

But ok... knowing that normal use is working in meters I'll do this... in meters all works ok... but it would be nice an explanantion from Leadwerks programmers about this behavior (for my curiosity)...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...