Shadows

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
Mad Boris
Posts: 50
Joined: 03.04.2002
With us: 22 years 10 months
Location: Cardiff, UK

Shadows

Post #1by Mad Boris » 31.05.2002, 21:30

Besides the impossible task of creating 3D models of the planets, is there any possible way of simulating shadow length of planetery features e.g. craters on the moon ? It would look amazing if you could watch the craters fade from view as the moon approaches full.... this is probably asking too much but hey, I'll ask it anyway.

Guest

Bump maps and displacement maps

Post #2by Guest » 03.06.2002, 22:25

If you have a recent Nvidia graphics card, Celestia apparently supports bump mapping. So if you have the right kind of hardware and you have a separate bump map and albedo map for a body, that will increase the lighting realism to some extent. The craters and mountains will appear to be lit from the correct angle.

But all a bump map does is mess with the surface orientation that is used to compute lighting; it won't allow bumps to project beyond the horizon of the body, or occlude other parts of the surface, or cast shadows on other parts of the surface. For that you'd need, at the very least, the idea of a "displacement map", wherein the map is used to generate micro-geometry that is then used to do the actual shading. In principle the displacement map could do anything that a super-high-resolution object mesh could do.

Celestia's orientation is toward features supported by game-oriented hardware accelerators, and my hunch is that displacement mapping would be a bit much to ask at this stage of the technology. This is the sort of thing that you see more often in high-end software rendering aimed at photorealism rather than speed. But I could be wrong.

Guest

Post #3by Guest » 05.06.2002, 08:48

It's possible to use a z offset with texture shaders on gf 3+ i believe. This doesn't actually displace the pixel but it adds an offset to the z value. If stencil shadows were used this wouldn't cast shadows for the bumps but would affect whether or not they were in shadow. I'm not sure how it would work with shadow maps.

Mikeydude750
Posts: 169
Joined: 31.01.2002
With us: 23 years
Location: Wisconsin

Bump maps and displacement maps

Post #4by Mikeydude750 » 06.06.2002, 04:24

Anonymous wrote:If you have a recent Nvidia graphics card, Celestia apparently supports bump mapping. So if you have the right kind of hardware and you have a separate bump map and albedo map for a body, that will increase the lighting realism to some extent. The craters and mountains will appear to be lit from the correct angle.

But all a bump map does is mess with the surface orientation that is used to compute lighting; it won't allow bumps to project beyond the horizon of the body, or occlude other parts of the surface, or cast shadows on other parts of the surface. For that you'd need, at the very least, the idea of a "displacement map", wherein the map is used to generate micro-geometry that is then used to do the actual shading. In principle the displacement map could do anything that a super-high-resolution object mesh could do.

Celestia's orientation is toward features supported by game-oriented hardware accelerators, and my hunch is that displacement mapping would be a bit much to ask at this stage of the technology. This is the sort of thing that you see more often in high-end software rendering aimed at photorealism rather than speed. But I could be wrong.


What do you mean by "recent" NVidia cards? Does your definition of "recent" include a GF2 MX200 PCI?

Guest

Post #5by Guest » 07.06.2002, 10:08

I've tried using bumpmaps, but to be honest, they don't seem to make the blindest bit of difference.

(Mad Boris)


Return to “Development”