3D Space Limitations?

Blitz3D Forums/Blitz3D Beginners Area/3D Space Limitations?

CodeOrc(Posted 2008) [#1]
I read on another forum that DirectX has a fit sometimes if your models are not in a 4Kx4Kx4K area in 3D Space starting at 0,0,0 and not exceeding 4000,4000,4000...is this correct?

thx :)


GfK(Posted 2008) [#2]
No.

But floating point maths get less accurate the further you go from zero, so you should periodically normalise everything.


Zeotrope(Posted 2008) [#3]
Sort of related; If I move my infinite 'sea' plane, continiously in one direction at a rate of say, 1 unit per pass, pretty soon my game becomes unstable and slow.

Wondering if this has anything to do with accuracy being out....or something else.


Nate the Great(Posted 2008) [#4]
ok... yeah I think it makes it slower because of how blitz handles infinite planes, I am not an expert though.

I think if you reset the variable to zero ever time it reaches 1 or something like that, it would work or you could make an animated texture if you can't get that to work right


Zeotrope(Posted 2008) [#5]
Yeah....I dont need to scroll the sea plane ....but did so to test something....and inturn, found this slow down. Additionally, when this occurs, and I let it go, after some time I see some artifacts on the display (some of my pixels get fixed and turn white - like dead pixels on a cam-corder) Memory bank illegal access? Odd.

Anyway, back to the topic; if floats are less accurate the further they are from zero (like 4K), then wouldnt a good test be something like...

Position cube1,0000,0000,0000
position cube2,4000,0000,0000

(main loop)

x#=x#+0.01

Moveentity cube1,x#,0,0
Moveentity cube1,x#,0,0

text 100,100,"Cube 1 X position: "+entityx(cube1,1)
text 100,130,"Cube 2 X position: "+entityx(cube2,1)

(repeat)

-----wouldnt the above return different (slightly) values (decimal)?

(Cant test the above here...just theory)


Ross C(Posted 2008) [#6]
If you set up a test moving the camera and a cube away from the 0,0,0, you will see, as Gfk says, the world losing accuracy, as the cube and camera will jump around more and more. It's a sliding scale, so the further away you get, the worse everything is. Depends on what you set your camerarange at though, as this affect the z-buffer.

You could try and use the W-buffer, as i believe this is a linear scale.


Andy(Posted 2008) [#7]
>Additionally, when this occurs, and I let it go, after some time I see some
>artifacts on the display (some of my pixels get fixed and turn white - like
>dead pixels on a cam-corder) Memory bank illegal access? Odd.

Sounds like a dodgy graphics card... This is usually how memory problems manifest themselves.


Zeotrope(Posted 2008) [#8]
Not a dodgy card. Perhaps more like a zbuffer oddity like Ross says.

Anyhow, as I said, I dont need to scroll my water plane so no dramas.


Stevie G(Posted 2008) [#9]
@ Thermo,

Post some example code if you think it's not your card. Never seen this before myself. If it's a z-buffer oddity then it should be an issue on all cards.


Zeotrope(Posted 2008) [#10]
Let me sim it at home....if I can get it to happen again, All I can show is my movement code and a screen dump.