[Request] Normal Map Conversion

Post requests, images, descriptions and reports about work in progress here.
Avatar
Topic author
CM1215 M
Posts: 188
Joined: 30.08.2017
Age: 17
With us: 2 years 1 month
Location: Ohio, U. S. A.

[Request] Normal Map Conversion

Post #1by CM1215 » 09.09.2017, 13:05

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:
iapetus-normal.png
CM1215: Celestial master in learning.

john71
Posts: 462
Joined: 10.08.2016
With us: 3 years 2 months

Post #2by john71 » 09.09.2017, 13:14

Utilities topic:

https://celestiaproject.net/forum/viewtopic.php?f=25&t=17655

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.

https://vvvv.org/contribution/dds-converter

Avatar
Topic author
CM1215 M
Posts: 188
Joined: 30.08.2017
Age: 17
With us: 2 years 1 month
Location: Ohio, U. S. A.

Post #3by CM1215 » 09.09.2017, 13:30

Thank you, the converter worked, but the normal map still doesn't want to render...I need some help with that.
CM1215: Celestial master in learning.

Avatar
selden
Developer
Posts: 10069
Joined: 04.09.2002
With us: 17 years 1 month
Location: NY, USA

Post #4by selden » 09.09.2017, 16:52

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

convert.png



Here's a screengrab showing the png normalmap

png_normalmap.png



Here's a screengrab shoing the dxt5nm normalmap

dxt5nm_normalmap.png


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]
Selden

Avatar
Topic author
CM1215 M
Posts: 188
Joined: 30.08.2017
Age: 17
With us: 2 years 1 month
Location: Ohio, U. S. A.

Post #5by CM1215 » 09.09.2017, 20:01

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:
iapetuspost.PNG

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: https://celestiaproject.net/forum/viewtopic.php?f=6&t=14325&p=117849&hilit=iapetus+cmod#p117849
In case that download link doesn't work, I've attached the model also.
iapetus_cmod.zip
(350.85 KiB) Downloaded 29 times
CM1215: Celestial master in learning.

Avatar
selden
Developer
Posts: 10069
Joined: 04.09.2002
With us: 17 years 1 month
Location: NY, USA

Post #6by selden » 09.09.2017, 22:41

"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.

gl2.png
OpenGL v2.0 render path


oglvp.png
Open GL vertex program


normalmap.zip
normalmap example addon zip
(13.29 MiB) Downloaded 25 times
(13MB expands to 17MB)
Selden

Avatar
Topic author
CM1215 M
Posts: 188
Joined: 30.08.2017
Age: 17
With us: 2 years 1 month
Location: Ohio, U. S. A.

Post #7by CM1215 » 10.09.2017, 00:44

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.
CM1215: Celestial master in learning.

Avatar
FarGetaNik M
Posts: 459
Joined: 05.06.2012
With us: 7 years 4 months
Location: Germany

Post #8by FarGetaNik » 10.09.2017, 07:39

I had exactly the same problem over there: https://celestiaproject.net/forum/viewtopic.php?f=30&t=17471

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.

Avatar
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 12
With us: 12 years 6 months
Location: Thyrrenian sea

Post #9by Fenerit » 10.09.2017, 08:18

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.
Never at rest.
Massimo

Avatar
selden
Developer
Posts: 10069
Joined: 04.09.2002
With us: 17 years 1 month
Location: NY, USA

Post #10by selden » 10.09.2017, 11:33

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.
Selden


Return to “Add-on development”

Who is online

Users browsing this forum: 2 guests