Problem with material in CMOD file (done)

All about models for Celestia. How-to, programs, work in progress...
Avatar
Topic author
EarthMoon
Posts: 200
Joined: 02.07.2022
With us: 2 years 4 months
Location: Germany

Problem with material in CMOD file (done)

Post #1by EarthMoon » 12.11.2022, 10:10

I'm working on a model for comet 67P, but the CMOD model has material bugs.

The (CMOD) model is in ASCII format for better visualizing (the bug also happens when I save it as binary file).

In the model's material definition I wrote "diffuse 1 0 0" (= red (just as example); blue marker),
but CmodView's material editor shows "Diffuse: 0 0 0" (= black; red marker),
and the model is displayed in white.

bug.png


Original model source: https://scifleet.esa.int
Converted to obj by Blender 2.79 (3ds format is not possible due to its 65535 vertices limitation, but the model has 740338 vertices).
Then I used CmodView to convert it from OBJ to CMOD (without materials, added them with 3DS 2 CMOD Converter's fix function).

Why isn't the material shown?

Here the fbx, obj and cmod files:
The attachment 67P-Models_fbx-obj-cmod.zip is no longer available
Last edited by EarthMoon on 14.11.2022, 15:45, edited 1 time in total.
Crew: "We are orbiting a black hole."
Control Center: "Do not fly too close to the black hole!"
Crew: "OH OOPS..."

Celestia versions:
1.6.3, 1.7.0 sRGB, 1.6.1 ED (plain)

Current projects:
Celestial (a Celestia-like program written in Python)

Avatar
Anthony_B_Russo10
Moderator
Posts: 672
Joined: 03.07.2018
Age: 21
With us: 6 years 4 months
Location: Tallahassee, Florida, US

Post #2by Anthony_B_Russo10 » 12.11.2022, 14:19

Converted to obj by Blender 2.79
That's your problem, CMOD View bugs out directly OBJ files to CMOD.
Anthony B. Russo, I like Pluto. Mod of the Celestia subreddit: https://www.reddit.com/r/Celestiasoftware/
I have over 40 computers, trying to list them here would be a pain.
Responsible for the NEO catalog: https://celestiaproject.space/forum/viewtopic.php?f=23&t=22203
And mod of the Discord server.

Avatar
John Van Vliet
Posts: 2944
Joined: 28.08.2002
With us: 22 years 2 months

Post #3by John Van Vliet » 12.11.2022, 16:39

is this the texture you are trying to use ?
Screenshot_20221112_113736.png


if so it is too complex a UV mapping to work for a cmod

Avatar
trappistplanets
Posts: 639
Joined: 11.06.2020
Age: 17
With us: 4 years 4 months

Post #4by trappistplanets » 12.11.2022, 19:22

John Van Vliet wrote:if so it is too complex a UV mapping to work for a cmod
than is it possible to bake it into a cylintrical texture, just like how i can bake orthographic views of an object into a flat map using blender
if one is able to do it with a sphere or irregular shape from orthographic view, than in theory it should be possible to "covert" that map to a flat cylintrical map
There is a limit to how far we can travel into the stars.
Owner of "The Grand Voyage" addon series
Collaborating with Dangerous_safety for the still developing Cer system

Avatar
John Van Vliet
Posts: 2944
Joined: 28.08.2002
With us: 22 years 2 months

Post #5by John Van Vliet » 13.11.2022, 02:41

it is possible but a cube map would be better

and cmods support a cube map

Avatar
Topic author
EarthMoon
Posts: 200
Joined: 02.07.2022
With us: 2 years 4 months
Location: Germany

Post #6by EarthMoon » 14.11.2022, 14:52

I'm not trying to use a texture, I just want to find out why the comet will be rendered in white, not in red (see post #1)
Crew: "We are orbiting a black hole."
Control Center: "Do not fly too close to the black hole!"
Crew: "OH OOPS..."

Celestia versions:
1.6.3, 1.7.0 sRGB, 1.6.1 ED (plain)

Current projects:
Celestial (a Celestia-like program written in Python)

Avatar
Topic author
EarthMoon
Posts: 200
Joined: 02.07.2022
With us: 2 years 4 months
Location: Germany

Post #7by EarthMoon » 14.11.2022, 15:46

Ah, I found a way to fix this: open the model in Blender 2.80 (newer versions have features that I don't need and are laggy a bit) and apply a material (e.g. base color white) to it before converting to CMOD.
Crew: "We are orbiting a black hole."
Control Center: "Do not fly too close to the black hole!"
Crew: "OH OOPS..."

Celestia versions:
1.6.3, 1.7.0 sRGB, 1.6.1 ED (plain)

Current projects:
Celestial (a Celestia-like program written in Python)


Return to “Modelling”