Page 1 of 1

Celestia v.1.3.1: VT Specular Reflection bug

Posted: 31.12.2003, 13:01
by selden
This demonstrates a bug in the specular reflection code. I think it may have been reported before. Maybe it's related to precision?

While taking a close look at a lake in eastern Africa, I noticed some large, dark, almost circular, bands within its specular reflections. The patterns are visible only within a small range of magnifications and distances.

Image

Here's a Cel://URL to take you near this viewpoint:

cel://Follow/Sol:Earth/2003-12-31T12:37:40.61916?x=WLH0x+NiESW7DA&y=XOuijICYFA&z=zaDZxF8ZdKvw/////////w&ow=0.901285&ox=0.011273&oy=-0.411974&oz=-0.133548&track=Sol:Earth&select=Sol:Earth&fov=0.482823&ts=1.000000<d=0&rf=72455&lm=4


By changing the magnification and viewpoint slightly, I managed to persuade it to show this pattern.

Image


Here's a Cel://URL to take you near this viewpoint:

cel://Follow/Sol:Earth/2003-12-31T12:35:10.52458?x=gPsLvNsiNCW7DA&y=yy/jRb5hHg&z=VXxk/+2ecKvw/////////w&ow=0.897751&ox=0.029923&oy=-0.416058&oz=-0.141576&track=Sol:Earth&select=Sol:Earth&fov=0.417081&ts=1.000000<d=0&rf=72455&lm=4

This pattern was first noticed when using the new 16K specular reflection VT by Buzz. (Thanks!)
Exactly the same kind of pattern is seen using the older 8K VT.

System:
256MB 512MHz P3; Win XP Pro SP1
128MB GF4 Ti 4200; Nvidia drivers v44.03
Celestia v1.3.1

Note: the most recent Nvidia drivers (v53.03) are unusable with my dual-screen configuration. They shutdown the secondary display and don't even put a desktop on the primary display. :(

Posted: 31.12.2003, 13:14
by Buzz
Hi Selden,

I didn't see what you saw - I do get another effect though: at very high magnification or zoom levels, I get flashing lines of black pixels...

Posted: 31.12.2003, 13:22
by selden
Buzz,

Which card and drivers are you using?
I've added another picture above.

Also, there's a (mis)feature related to how Cel://URLs interact with Celestia's on-screen display. I could only get a reproducable viewpoint by running Celestia in a full-sized window on the desktop (select the "maximum window" icon/decoration at the upper left of Celestia's desktop window. Don't use the Alt-Enter option to display it full-screen.) It may also be that this particular Cel://URL viewpoint is only available if you're running at 1600x1200 :(

Posted: 31.12.2003, 14:56
by Buzz
Selden,

I have a rather old GeForce 2 with 32 MB (Proven technology? :wink: ) and run Celestia with WinME.
I don't have the problem when I switch to 1600x1200 either...

Posted: 31.12.2003, 16:20
by selden
Buzz,

You haven't mentioned which version of Nvidia's drivers you're using.

Also, I only see the areas of non-specularity (the dark "rings") in a very small range of distances and magnifications. Maybe for you it's a different distance?

Posted: 01.01.2004, 09:55
by don
Howdy Selden,

I don't see what you see, but I'm running an ATI Radeon 9700 Pro card. I tried with the basic distribution package textures and also the 32 K VT Earth.

What textures are you using? Other files, mods?

-Don G.
_________________________________
Dell P4 (3.06 GHz), 1 GB RAM
ATI Radeon 9700 Pro, 128 MB RAM
Catalyst 3.6 drivers
Win XP Pro SP1 - fully patched

Posted: 01.01.2004, 11:59
by Buzz
Correction: the black single pixels I see at high magnification do occur in triangular patterns; maybe it is a related thing. I think I will create a dds version and see what that does.

Posted: 01.01.2004, 21:07
by chris
I have some idea about what may be going on here . . . Selden, are you using a normal map for Earth? When Celestia renders a planet with a normal map and a specular map, it uses two passes--one for the normal map and base texture, and a second for the specular map. If the specular map is a different size than the base texture, the planet sphere geometry may be split into more or fewer tiles. When the geometry in the two passes doesn't match exactly, you'll see 'z-fighting' artifacts like the ones in your screen capture. To fix the problem, Celestia needs to use the same splitting in each rendering pass. This same issue is behind a bug that Fridger observed with night light virtual textures.

--Chris

Posted: 01.01.2004, 21:22
by Buzz
Chris,

Thanks for this, I do have different size tiles for spec and normal maps. It looks like I will have to recreate my spec16k with 512 pixel tiles instead of 1024, as that seems to become the standard size.

Posted: 01.01.2004, 21:35
by don
Howdy Chris,

Thanks for jumping in here. :) ... I added your note to the Bug Tracker.

HAPPY NEW YEAR!

-Don G.

Posted: 01.01.2004, 21:43
by selden
Chris and Buzz,

Yup, that's my situation, too. I've combined surface, normal, night and specular reflection VTs into one AltSurface. They all seem to have different tile sizes.

Posted: 07.01.2004, 05:50
by timcrews
Is this a bug that can be fixed, or is it an inherent design limitation? From Chris' response, it appears to be fixable, but I want to be sure.

I do have mismatched virtual texture tile sizes. If different tile sizes can't interact, then virtual texture producers need to know to pick one size and stick with it.

Tim Crews

Posted: 07.01.2004, 06:14
by don
Howdy Tim,

The way Chris described "what Celestia needs to do", I assume it is definately fixable.

-Don G.