Body rendering with normal maps from a distance

General discussion about Celestia that doesn't fit into other forums.
Topic author
CAP-Team
Posts: 194
Joined: 27.12.2006
Age: 49
With us: 17 years 11 months
Location: Vriezenveen, the Netherlands
Contact:

Body rendering with normal maps from a distance

Post #1by CAP-Team » 03.05.2008, 12:13

I've noticed for a while now that there are some flaws in rendering bodies:

1. If a body has a bump/normal map, and when rendering from a distance (say, 100,000 km) the bump/normal map is rendered in an ugly way, also, when approaching the object you can see the pixels changing until viewed from up close.
(I noticed this with Io and Callisto from the Galileo spacecraft, both bodies have normal maps in my system)

Here's how Callisto is rendered (enlarged 200%)
callisto.jpg


2. If a body is unlit and viewed from a distance, it will still get a white pixel (or what color that body is), even if it's unlit from the viewer's point of view.
Windows 7 Ultimate x64, Intel Core i7 2600K 3.4 Ghz, 4 GB RAM, 120 GB SSD + 1 TB hdd, nVidia GTX460 1 GB, Celestia 1.6.0.xxxx
Download my latest SVN Build

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Re: Body rendering with normal maps from a distance

Post #2by t00fri » 03.05.2008, 13:27

How about reformulating your claim after using a normalmap of scientific quality, like the ones produced with my nmtools directly from scientific raw data?

I have worked most extensively with normalmaps of all kinds in Celestia in the past 5 years or so. I have never observed such phenomena as you are alluding to. The "normalmaps" you were using were NOT generated by any real data and may well exhibit artefacts of some kind, since they were produced by users via some kind of "handicrafting" (=witchcraft ;-) ) ...

Normalmap textures must be of very high graphical quality, otherwise they produce bad renderings! Standard DXT1 compression, for example is unsuited for normalmaps due to generated artefacts. You did not bother to tell us what graphical format your "normalmaps" are stored in? Note that both DXT and JPG are lossy, compressed formats. Many people are ignorant about the crucial quality optimization means with these formats.

F.
Image

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Re: Body rendering with normal maps from a distance

Post #3by selden » 03.05.2008, 13:36

1. Please report the problems using the error tracker on SourceForge at https://sourceforge.net/tracker/?atid=1 ... unc=browse

2. Please assemble and include a link to a packaged Addon which demonstrates the problem. Be sure to include a Cel:// url of a viewpoint which shows the failure. It's not an effective use of Chris' time for him to try to find and install the appropriate Addons and try to locate an appropriate viewpoint so he can verify the bug, fix the problem and verify the fix.

If you can demonstrate the problem with an unmodified version of Celestia, that would be even better, so that you only have to provide a Cel:// URL. The moon in eclipse might do this.
Selden

Topic author
CAP-Team
Posts: 194
Joined: 27.12.2006
Age: 49
With us: 17 years 11 months
Location: Vriezenveen, the Netherlands
Contact:

Re: Body rendering with normal maps from a distance

Post #4by CAP-Team » 03.05.2008, 23:39

I did some testing and (ofcourse ;)) Tootfri and Selden are totally right.. the resolution of the used normal map was the cause. I tried a higher resolution map and the problem was gone. I didn't have a problem with Earth, of which I built the 64k VT textures with Tootfri's texture and nmtools

The map (of John van Vliet) is, an artist's interpretation, and I'd love to work with real data if it's available.
Last edited by CAP-Team on 03.05.2008, 23:54, edited 1 time in total.
Windows 7 Ultimate x64, Intel Core i7 2600K 3.4 Ghz, 4 GB RAM, 120 GB SSD + 1 TB hdd, nVidia GTX460 1 GB, Celestia 1.6.0.xxxx
Download my latest SVN Build

BobHegwood
Posts: 1803
Joined: 12.10.2007
With us: 17 years 1 month

Re: Body rendering with normal maps from a distance

Post #5by BobHegwood » 03.05.2008, 23:44

CAP-Team wrote:2. If a body is unlit and viewed from a distance, it will still get a white pixel (or what color that body is), even if it's unlit from the viewer's point of view.

I have always thought that this is a beneficial feature of Celestia. I actually LIKE seeing the white pixel in order to locate objects. This a bug? News to me. :wink:
Thanks, Brain-Dead
Brain-Dead Geezer Bob is now using...
Windows Vista Home Premium, 64-bit on a
Gateway Pentium Dual-Core CPU E5200, 2.5GHz
7 GB RAM, 500 GB hard disk, Nvidia GeForce 7100
Nvidia nForce 630i, 1680x1050 screen, Latest SVN

Topic author
CAP-Team
Posts: 194
Joined: 27.12.2006
Age: 49
With us: 17 years 11 months
Location: Vriezenveen, the Netherlands
Contact:

Re: Body rendering with normal maps from a distance

Post #6by CAP-Team » 03.05.2008, 23:59

Well I partly agree with Bob, that it is sometimes handy to see a pixel to locate objects, but on the other hand, for instance the moon orbiting earth.

When viewed from a great distance, the moon won't be visible as a white dot next to earth.

Or even when the moon is half lit, viewed from a distance but not too far, so the moon is still resolved, the moon is hardly visible. And then, going just a little bit further, and voil? the moon is a white/gray dot. This doesn't seem right to me.

if the dark side of the moon is viewed from a big distance, it will show as a white dot while it shouldn't be visible at all.
Windows 7 Ultimate x64, Intel Core i7 2600K 3.4 Ghz, 4 GB RAM, 120 GB SSD + 1 TB hdd, nVidia GTX460 1 GB, Celestia 1.6.0.xxxx
Download my latest SVN Build

bdm
Posts: 461
Joined: 22.07.2005
With us: 19 years 4 months
Location: Australia

Re: Body rendering with normal maps from a distance

Post #7by bdm » 04.05.2008, 23:29

BobHegwood wrote:
CAP-Team wrote:2. If a body is unlit and viewed from a distance, it will still get a white pixel (or what color that body is), even if it's unlit from the viewer's point of view.
I have always thought that this is a beneficial feature of Celestia. I actually LIKE seeing the white pixel in order to locate objects. This a bug? News to me. :wink:
Thanks, Brain-Dead
If one wants to locate objects, Celestia has the ability to mark the objects. To do this, enable Markers in the Rendering menus and select the object of interest.

I think the pixel is a flaw because it is not realistic. If a body is hidden in shadow, or small enough to be otherwise invisible, it should be invisible.

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 10 months
Location: Seattle, Washington, USA

Re: Body rendering with normal maps from a distance

Post #8by chris » 05.05.2008, 01:56

CAP-Team wrote:Well I partly agree with Bob, that it is sometimes handy to see a pixel to locate objects, but on the other hand, for instance the moon orbiting earth.

When viewed from a great distance, the moon won't be visible as a white dot next to earth.

Why do you think that it wouldn't be visible? The Moon is smaller and less reflective than the Earth, but it would still be easily visible from both Venus or Mars.

Or even when the moon is half lit, viewed from a distance but not too far, so the moon is still resolved, the moon is hardly visible. And then, going just a little bit further, and voil? the moon is a white/gray dot. This doesn't seem right to me.

if the dark side of the moon is viewed from a big distance, it will show as a white dot while it shouldn't be visible at all.

The transition from rendering planets as spheres to the point representation isn't perfect, but I think it's a pretty good compromise. Consider that Mars is clearly visible in Earth's night sky even though it would cover less than a pixel in Celestia at a typical resolution with a 30 degree view. In a 1000x1000 window, each pixel is 1.8 minutes x 1.8 minutes. Yet, the angular diameter of Mars as seen from Earth is never greater than about 25 seconds. That's about 1/20 of a pixel in the 1000x1000 30 degree view. If Celestia were to just render Mars as a sphere in this situation, it wouldn't show up at all. The graphics hardware would simply throw away the tiny polygons that are used for the sphere mesh. So, the point rendering of planets can be thought of as a way to address the undersampling problems that are inevitable with current graphics hardware.

The problem you're reporting with a dot appears when the dark side of the Moon is seen at a great distance is due to incorrect expectations. First of all, at a phase angle of exactly 180 degrees, Celestia does show the Moon disappearing. At slightly lower phase angles some thin crescent is still illuminated, meaning the Moon should remain visible but not be as bright as when seen at very low phase angles. Celestia does a reasonable approximation of the variation of illumination with phase. I do agree that in Celestia the transition isn't quite right when zooming away from a planet at high phase angle. However, the problem isn't that the planet gets rendered as a dot--which is correct--but that the finite resolution of the frame buffer means that no lit pixels of small crescent disks are drawn.

There's actually one more issue contributing to the apparent overbrightness of planets when rendered as points. Celestia uses two different mappings of radiance to pixel value: a logarithmic mapping for point objects (distant stars and planets) and a linear mapping for objects larger than one pixel. The logarithmic mapping is affected by the limiting magnitude setting for stars, whereas the linear mapping is not. We're beginning to address this with high dynamic range rendering, where the mapping of radiance to pixel value can be treated uniformly.

--Chris

Topic author
CAP-Team
Posts: 194
Joined: 27.12.2006
Age: 49
With us: 17 years 11 months
Location: Vriezenveen, the Netherlands
Contact:

Re: Body rendering with normal maps from a distance

Post #9by CAP-Team » 05.05.2008, 07:59

Thanx Chris for explaining.
Windows 7 Ultimate x64, Intel Core i7 2600K 3.4 Ghz, 4 GB RAM, 120 GB SSD + 1 TB hdd, nVidia GTX460 1 GB, Celestia 1.6.0.xxxx
Download my latest SVN Build

Avatar
John Van Vliet
Posts: 2944
Joined: 28.08.2002
With us: 22 years 3 months

Re: Body rendering with normal maps from a distance

Post #10by John Van Vliet » 07.05.2008, 22:48

edit 5:28 pm


Return to “Celestia Users”