Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (536)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Z-test problem  (Read 2070 times)
0 Members and 1 Guest are viewing this topic.
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Posted 2006-09-06 18:05:41 »

1st image : everything looks fine, the white plane is under the grass one
2nd image : the camera is a bit lower and the white plane appears over the grass one (though it's still under).

What's *that* ?  Shocked Shocked Shocked

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline bohdan

Junior Member




Java-positive...


« Reply #1 - Posted 2006-09-16 15:19:03 »

Did you get it sorted?

Strange things like that did happen to me too, well not exatly your case, but as you saing - just move a camera a bit - and it got wrong rendered, move it back - everything fine.... and the movent is so little, that actually nothing changes in the scene really, same nodes in your view and same order...

I going to open new topic with very simple yet killing me test case with that sort of thing happening, but this time it would be regarding transparency...
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Reply #2 - Posted 2006-09-16 15:22:39 »

In fact it may be due to a lack of precision of the Z-buffer : when the farPlane value is too far the precision is reduced, thus leading to some mistakes in rendering. Is 3000 really too high for a back-clip distance ?

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline bohdan

Junior Member




Java-positive...


« Reply #3 - Posted 2006-09-16 15:28:16 »

In fact it may be due to a lack of precision of the Z-buffer : when the farPlane value is too far the precision is reduced, thus leading to some mistakes in rendering. Is 3000 really too high for a back-clip distance ?

Well, yes, but only when your nodes are very close, my test case will be sort of "general", objects will be far from each other, and another thing is - I have triyed to make farPlane of relatively little distance (200), and nearPlane of (1) - didn't help.
BTW, nearPlane distance - would be something to worry about first of all, since depth buffer resolution is much more sensitive to it than to farPlane.
Don't make nearPlane too close...

But anyhow, it doesn't seems to be the depth test problem...

Edit: What about 3000, well... sounds a bit too big, do you realy need it to be so big? Always try to make farPlane as close as your scenario allows, and nearPlane - as far as it is acceptable (1 or 0.5 should be fine, don't do 0.001 etc, as people tend to do)...
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Reply #4 - Posted 2006-09-16 15:31:32 »

In fact it may be due to a lack of precision of the Z-buffer : when the farPlane value is too far the precision is reduced, thus leading to some mistakes in rendering. Is 3000 really too high for a back-clip distance ?

Well, yes, but only when your nodes are very close, my test case will be sort of "general", objects will be far from each other, and another thing is - I have triyed to make farPlane of relatively little distance (200), and nearPlane of (1) - didn't help.
BTW, nearPlane distance - would be something to worry about first of all, since depth buffer resolution is much more sensitive to it than to farPlane.
Don't make nearPlane too close...

But anyhow, it doesn't seems to be the depth test problem...
Can't wait to see the test case. Each bug is a chance to understand more the rendering code.

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #5 - Posted 2006-09-16 16:15:33 »

Just my three cents...

Can't you simply put your whole scene into a TransformGroup, which scales it down such that a farplane of any smally value would be sufficient?
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Reply #6 - Posted 2006-09-16 16:37:05 »

Just my three cents...

Can't you simply put your whole scene into a TransformGroup, which scales it down such that a farplane of any smally value would be sufficient?
Yeah of course.

Anyway the I don't have two planes which are rendered as close in my game : the white plane was there for debugging purposes only.

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline bohdan

Junior Member




Java-positive...


« Reply #7 - Posted 2006-09-16 18:23:04 »

Quote
Can't wait to see the test case. Each bug is a chance to understand more the rendering code.

See here http://www.java-gaming.org/forums/index.php?topic=14898.0.
Offline darkprophet

Senior Member




Go Go Gadget Arms


« Reply #8 - Posted 2006-09-16 22:03:30 »

Quote
Can't you simply put your whole scene into a TransformGroup, which scales it down such that a farplane of any smally value would be sufficient?

Well, you could, but you would lose even more accuracy through floating point transformations. A multiplication with the scale, followed by the depth comparion...

So its not a good idea....

Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Riven (20 views)
2014-07-29 18:09:19

Riven (13 views)
2014-07-29 18:08:52

Dwinin (12 views)
2014-07-29 10:59:34

E.R. Fleming (31 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (42 views)
2014-07-24 01:59:36

Riven (42 views)
2014-07-23 21:16:32

Riven (28 views)
2014-07-23 21:07:15

Riven (29 views)
2014-07-23 20:56:16

ctomni231 (60 views)
2014-07-18 06:55:21
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!