Page 1 of 1
Adding bump mapping to Mars fries Celestia?
Posted: 22.03.2005, 09:28
by NeilF
I'm trying to add a bump map to Mars, but in doing so it seems to make Celestia die. It just sits there doing nothing but accessing Ram/Harddrive?
This is my current setup:-
Code: Select all
extras/
mars/
mars.ssc (see below)
textures/
hires/
lowres/
medres/
MarsVT.ctx (see below)
16kMarsBump.png
MarsVT/
level0/
*png files*
level1/
*png files*
level2/
*png files*
level3/
*png files*
level4/
*png files*
My mars.ssc file:-
Code: Select all
AltSurface "MarsVT" "Sol/Mars"
{
Texture "MarsVT.ctx"
BumpMap "16kMarsBump.png"
}
My Mars.ctx file:-
Code: Select all
VirtualTexture
{
ImageDirectory "Mars"
BaseSplit 0
TileSize 512
TileType "png"
}
Without the bump mapping Mars is displayed fine...
I apologise for what are no doubt "noob" questions, but none of these downloads seem to come with the slightest bit of help text (ie: what to put where etc), and I can't seem to find the answers on the forum, or help sites
note: I've tried the bump mapping with the standard textture as well... This does not fry Celestia, but doesn't seem to make any difference to Mars?
Posted: 22.03.2005, 11:57
by selden
What kind of graphics card do you have?
Some of them simply don't have the functionality to be able to draw bumpmaps.
Posted: 22.03.2005, 12:26
by TERRIER
I must admit that when I had 256MB of RAM, realistically I could only run a 4k "single piece" png bump/normal map on my system.
Using a 16k VT dds Normal map was fine, if a little jerky.
Posted: 22.03.2005, 14:55
by NeilF
selden wrote:What kind of graphics card do you have?
Some of them simply don't have the functionality to be able to draw bumpmaps.
Radeon 9800XT (2.8P4 with 1gb of ram)
I suspect the problem is me not knowing how to specify it in the script? ie: I cannot even use the bumpmap on the standard texture!? ie: It appears to make no difference.
Posted: 22.03.2005, 15:34
by selden
You should be able to see bumpmaps with a 9800. (I'm assuming you've installed the very latest drivers from ATI.)
Make sure the RenderPath is set to "OpenGL vertex program", although this should be the default for your card. While running Celestia, type a ctrl-V several times to see what Render Paths are available and how they differ.
Don't forget that the effects of a bumpmap are most noticable near the terminator, when sunlight is at a low angle. Also, bumpmaps do not cause Celestia to cast shadows across the rest of the landscape. They only shade the sides of the protrusions.
When looking at Mars using an unmodified version of Celestia and the Basic Render Path, you should not see any bumps:
With the OpenGL vertex program path, you should see something like this:
Does this help?
Posted: 22.03.2005, 15:43
by selden
Sorry: I went back and reread your original post.
I'm trying to add a bump map to Mars, but in doing so it seems to make Celestia die. It just sits there doing nothing but accessing Ram/Harddrive?
That is your system paging itself to death.
You are trying to use too many large textures at the same time. They simply don't fit into the amount of RAM you have on your system, so your computer is trying to use disk space as virtual memory. That makes the system absurdly slow. You need to buy more memory for your computer. In the meantime, you will have to limit the number of textures that you ask Celestia to use.
Open the "Task Manager" and look at what's shown by its "Performance" tab. When you run Celestia, make a note of how much memory it's trying to use. Your computer needs more memory than that.
(512 MB is a good place to start. 1GB should be enough.)
Posted: 22.03.2005, 15:43
by NeilF
selden wrote:You should be able to see bumpmaps with a 9800. (I'm assuming you've installed the very latest drivers from ATI.)
Make sure the RenderPath is set to "OpenGL vertex program", although this should be the default for your card. While running Celestia, type a ctrl-V several times to see what Render Paths are available and how they differ.
Don't forget that the effects of a bumpmap are most noticable near the terminator, when sunlight is at a low angle. Also, bumpmaps do not cause Celestia to cast shadows across the rest of the landscape. They only shade the sides of the protrusions.
Does this help?
I already have some bumpmaps working - Eg: for titan. That all came as a single downloadable zip so no problem.
I'm almost certain the problem here is the fact I have "16kMarsBump.png" and simply have not put it in the right place, or changed tge SSC correctly to use it? (see my examples above)
Posted: 22.03.2005, 15:49
by selden
Sorry: I've been answering the wrong question.
Remember that a 16K image is 16Kx8Kx4 bytes = 128MBx4=512MB. Before Celestia can load a PNG image into your graphics card, it has to expand it to its full size in RAM.
Your system needs to have more than 512MB of main memory in order to display a surface texture of that size in a reasonable amount of time.
"Virtual textures" help because you don't have to load one gigantic image at once, but you do have to load many of them, depending on how close the viewpoint is to the planet.
Posted: 22.03.2005, 16:42
by t00fri
Neil,
for 'Noobs' (and programmers alike
), it pays to do small back-of-the enveloppe memory estimates first, before plugging in
16k bump map files in addition to the main texture!
The problem is not so much your system memory, but rather the memory available on your graphics card (256MB?)! That's why you will be much better off, taking my virtualtex script that chops your 16k monster PNG file into many little PNG tiles. These you will be able to handle very smoothly with your graphics setup. Please use the forum's search engine to localize the latest version of my virtualtex.
Don't forget, that handling of such big textures in Celestia is best done after some familiarity with the program has been acquired already. In contrast, the default Celestia distribution is meant to work at the 'push button' level for newcomers.
Bye Fridger
Posted: 22.03.2005, 17:20
by TERRIER
Neil,
Looking at the AltSurface set-up in your original post, it would seem to be correct.
However, I'm not sure if you can run the 16k texture.
If you're still wanting to use a full size texture and not a VT, and although this might seem a bit of a pain, it might be worth trying a 4k, and then an 8k version to see if your system can handle them.
Posted: 22.03.2005, 17:52
by NeilF
TERRIER wrote:Neil,
Looking at the AltSurface set-up in your original post, it would seem to be correct.
However, I'm not sure if you can run the 16k texture.
If you're still wanting to use a full size texture and not a VT, and although this might seem a bit of a pain, it might be worth trying a 4k, and then an 8k version to see if your system can handle them.
I'm trying a 4K one, and am having some success now... Do I need to specify a "bumpheight" in the SCC as well?
eg:-
Code: Select all
Modify "Mars" "Sol" {
BumpMap "4kMarsBump.png"
BumpHeight 12.0
}
Posted: 22.03.2005, 18:23
by TERRIER
NeilF wrote:I'm trying a 4K one, and am having some success now... Do I need to specify a "bumpheight" in the SCC as well?
Ah yes, I'd forgotten about the bumpheight setting. I use a lot of Normal maps, which don't need a bump height setting.
regards,
TERRIER
Posted: 22.03.2005, 20:00
by Sky Pilot
Selden, the laptop I'm running right now is using a Radeon 7500 AGP with 32 MB RAM. Do you know whether this card will display bumpmaps? Thanks!
Posted: 22.03.2005, 21:51
by selden
Sorry, I don't know for sure. Sometimes the graphics vendors add new functionality in their drivers.
The quickest way to find out if they should work is to run Celestia and type a ctrl-V several times. Each time you type it, you should see a message appear briefly in Celestia's window telling you which "Render Path" it is using.
The paths you might see listed are
Basic
Multitexture
OpenGL vertex program
OpenGL 2.0
Here's a summary of the features they support:
"Basic" shows colored planets.
"Multitexture" adds night lights and shadows of planets on rings.
"OpenGL vertex program" adds bumpmaps, specular reflections and shadows of rings on planets.
"OpenGL 2.0" adds multiple light sources and their shadows
Each of the later three "Render Paths" requires additional OpenGL features which may not be present in older cards.
Posted: 22.03.2005, 22:48
by Sky Pilot
Thanks Selden. That answers my question. I only get Basic and Multitexture.