Page 1 of 1

[Request] Normal Map Conversion

Posted: 09.09.2017, 13:05
by CM1215
I happened to get an Iapetus cmod model from these forums before they were shut down. I've always used it for Iapetus, but I also wanted to apply a normal map to it to add some more detail, but the normal map isn't compatible with the model. I've heard that the .dxt5nm format allows a normal map to be applied to a non-spherical body, but I don't know how to convert the normal map to that format. I would like for someone to convert it for me, if possible. Here is the normal map. I got it off a Celestial Matters forum thread:

Posted: 09.09.2017, 13:14
by john71
Utilities topic:

Added after 35 seconds:
This utility is a DDS batch converter Windows frontend and it is fantastic.

Very easy to use!

I converted all my png normalmaps to dxt5nm format in no time.

png->dds normalmap->you have to batch rename the *.dds extention to *.dxt5nm.

Posted: 09.09.2017, 13:30
by CM1215
Thank you, the converter worked, but the normal map still doesn't want to render...I need some help with that.

Posted: 09.09.2017, 16:52
by selden
What do you mean by "does not render"?

How are you trying to apply it to an object?

The dxt5nm version created by dds-converter renders for me, but it looks like crud, with lots of high-frequency noise. Maybe I'm using the wrong conversion options, though.

Here's the SSC that I used to test it:

Code: Select all

"normalmap" "Sol"
{ Radius 6000
  NormalMap "iapetus-normal.png"

  EllipticalOrbit { Period 1.3 SemiMajorAxis 1.235}
  UniformRotation { Period 1 Inclination 35}
AltSurface "dxt5"  "Sol/normalmap"
 NormalMap  "iapetus-normal.dxt5nm"

Here's a screengrab showing the converter and options


Here's a screengrab showing the png normalmap


Here's a screengrab shoing the dxt5nm normalmap


and here's a Cel url for that viewpoint (I guess you'll have to copy and paste it into your browser)

[url="cel://Follow/Sol:normalmap/2017-09-09T16:42:48.07453?x=IWXAOZfzFQ&y=oD9UE4jVav///////////w&z=6G/FNqE3fv///////////w&ow=-0.0735012&ox=0.287569&oy=-0.862848&oz=0.409139&select=Sol:normalmap&fov=27.4687&ts=1&ltd=0&p=0&rf=3970455&lm=0&tsrc=0&ver=3"]View normalmap[/url]

Posted: 09.09.2017, 20:01
by CM1215
By does not render I mean it appears as if there is no normal map at all. The texture renders fine, but the normal map doesn't appear. Here is a screenshot:

Perhaps you should try to use the normal map on a cmod model, which is what I'm trying to accomplish. I got the model from a very old thread:
In case that download link doesn't work, I've attached the model also.
(350.85 KiB) Downloaded 63 times

Posted: 09.09.2017, 22:41
by selden
"It works fine for me." I added a normalmap spec into a cmod and it works. It's extremely exaggerated, though.

*However*, your graphics card has to fully support OpenGL v2.0 (most do these days) *and* you have to select the OpenGL 2.0 render path in Celestia. No other Celestia render paths display normalmaps in cmod models. Type a Ctrl-V several times to step Celestia through its render paths.

OpenGL v2.0 render path

Open GL vertex program
normalmap example addon zip
(13.29 MiB) Downloaded 62 times
(13MB expands to 17MB)

Posted: 10.09.2017, 00:44
by CM1215
I've cycled through it, but the same result: no normal map. Perhaps you should try to also apply a regular surface texture to the model along with the normal map. That may be a reason as to why it's not working...

It could also be that you and I are using different versions of Celestia. You appear to be using 1.6.1, while I'm using the 64 bit 1.7.0 dev7.

Posted: 10.09.2017, 07:39
by FarGetaNik
I had exactly the same problem over there:

Celestia requires all surface textures (texture map AND normal map) to be png, or it won't work. Also the cmod has to be properly UV mapped (which seems to be the case). And you have to load it into cmodview and do Operations/Generate Tangents... then Operations/Uniquify Vertices.

Added after 3 minutes:
dxt5nm should work also, I used an addon before that sucessfully used it, but I never got around doing it mysels.

Posted: 10.09.2017, 08:18
by Fenerit
I recall that CMOD model is very coarse and without normal/tangent because just the ridge was sculpted from a spherical mesh with a Iapetus surface texure applied upon it. That model is not scientific at all, I made that just to show the 3D ridge feature because no Iapetus's normal maps were available at the time. You could achieve the same result with a proper normalmap upon default Celestia spheroids. Anyhow, you must increase the mesh resolution a bit before to set the normal/tangent options.

Posted: 10.09.2017, 11:33
by selden
Yup: Alex's version of v1.7.0 is broken in this regard. That includes the variant being worked on by Janus. I tested them both just now. I also tested JohnVV's linux version. It has the same bug(s), which surprises me since he's heavily into planet mapping.

Trying to make it work is going to be an exercise in futility unless you're willing to spend the time debugging Celestia's source code.