Page 1 of 1

Body rendering with normal maps from a distance

Posted: 03.05.2008, 12:13
by CAP-Team
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.

Re: Body rendering with normal maps from a distance

Posted: 03.05.2008, 13:27
by t00fri
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.

Re: Body rendering with normal maps from a distance

Posted: 03.05.2008, 13:36
by selden
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.

Re: Body rendering with normal maps from a distance

Posted: 03.05.2008, 23:39
by CAP-Team
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.

Re: Body rendering with normal maps from a distance

Posted: 03.05.2008, 23:44
by BobHegwood
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

Re: Body rendering with normal maps from a distance

Posted: 03.05.2008, 23:59
by CAP-Team
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.

Re: Body rendering with normal maps from a distance

Posted: 04.05.2008, 23:29
by bdm
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.

Re: Body rendering with normal maps from a distance

Posted: 05.05.2008, 01:56
by chris
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

Re: Body rendering with normal maps from a distance

Posted: 05.05.2008, 07:59
by CAP-Team
Thanx Chris for explaining.

Re: Body rendering with normal maps from a distance

Posted: 07.05.2008, 22:48
by John Van Vliet
edit 5:28 pm