ascii cmod models broken

Report bugs, bug fixes and workarounds here.
Topic author
Boux
Posts: 435
Joined: 25.08.2004
With us: 15 years 3 months
Location: Brittany, close to the Ocean

ascii cmod models broken

Post #1by Boux » 14.02.2010, 15:38

Since svn revision 496x, ascii cmod models are no longer rendered properly.
Most noticeable symptoms are missing textures or texture corruption.
Once models are converted to binary format, they are rendered as they should be.
Looks like something got broken when those massive code changes were made two weeks ago.
Did anyone else noticed?
Intel core i7 3770 Ivy Bridge @ 4.4 GHz -16 GB ram - 128 GB SSD cache - AMD Radeon 7970 3 GB o'clocked - Windows 7 64 Ultimate / Linux Kubuntu

Avatar
selden
Developer
Posts: 10077
Joined: 04.09.2002
With us: 17 years 3 months
Location: NY, USA

Re: ascii cmod models broken

Post #2by selden » 14.02.2010, 20:46

Boux,

Can you provide a simple example (ssc,model & texture) ?

The example I thought I had seems to be failing with both 1.6.0 and the latest svn build.
I'm sure used to work for v1.6.0, so I'm not at all sure what has happened to it :(
Selden

Avatar
Joe
Posts: 162
Joined: 29.02.2004
With us: 15 years 9 months
Location: United Kingdom

Re: ascii cmod models broken

Post #3by Joe » 15.02.2010, 03:08

The "trilist" sections for the meshes in the cmod model file do not exist any more. They should be there to define the mesh surfaces.
Joe
8O

Avatar
selden
Developer
Posts: 10077
Joined: 04.09.2002
With us: 17 years 3 months
Location: NY, USA

Re: ascii cmod models broken

Post #4by selden » 15.02.2010, 19:27

Joe,

Your comment is ambiguous.
What model files are you referring to?

Or do you mean that the ASCII interpreter for cmod files no longer recognizes "trilist" ?
Selden

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 17 years 10 months
Location: Seattle, Washington, USA

Re: ascii cmod models broken

Post #5by chris » 16.02.2010, 00:08

If you're seeing a problem with ASCII cmod files, then it's likely that it was caused by my checkin two weeks ago. However, I've seen no problems so far with loading ASCII models, and I've tried quite a few. If anyone can provide me with an ASCII cmod file that's not loading correctly, I should be able to debug the problem very quickly.

--Chris

Avatar
Joe
Posts: 162
Joined: 29.02.2004
With us: 15 years 9 months
Location: United Kingdom

Re: ascii cmod models broken

Post #6by Joe » 16.02.2010, 03:07

selden,

What i did was as follows:

I created a box in 3D MAX 9.0 (just a simple 6-face box, no texture and surface features) and saved it in 3ds format as box.3ds.

Then I did the conversion with

3dstocmod box.3ds > box.cmod

This was I got for box.cmod, it seems that 3dstocmod rejected the trilist section from my box.cmod.

Code: Select all

#celmodel__ascii

mesh
#"Box01"
vertexdesc
position f3
normal f3
texcoord0 f2
end_vertexdesc

vertices 36
-19.684 -29.5266 0.001 0 0 -1 1 -0
-19.684 29.5286 0.001 0 0 -1 1 -1
19.686 29.5286 0.001 0 0 -1 0 -1
19.686 29.5286 0.001 0 0 -1 0 -1
19.686 -29.5266 0.001 0 0 -1 0 -0
-19.684 -29.5266 0.001 0 0 -1 1 -0
-19.684 -29.5266 7.87502 0 0 1 0 -0
19.686 -29.5266 7.87502 0 0 1 1 -0
19.686 29.5286 7.87502 0 0 1 1 -1
19.686 29.5286 7.87502 0 0 1 1 -1
-19.684 29.5286 7.87502 0 0 1 0 -1
-19.684 -29.5266 7.87502 0 0 1 0 -0
-19.684 -29.5266 0.001 0 -1 0 0 -0
19.686 -29.5266 0.001 0 -1 0 1 -0
19.686 -29.5266 7.87502 0 -1 0 1 -1
19.686 -29.5266 7.87502 0 -1 0 1 -1
-19.684 -29.5266 7.87502 0 -1 0 0 -1
-19.684 -29.5266 0.001 0 -1 0 0 -0
19.686 -29.5266 0.001 1 0 0 0 -0
19.686 29.5286 0.001 1 0 0 1 -0
19.686 29.5286 7.87502 1 0 0 1 -1
19.686 29.5286 7.87502 1 0 0 1 -1
19.686 -29.5266 7.87502 1 0 0 0 -1
19.686 -29.5266 0.001 1 0 0 0 -0
19.686 29.5286 0.001 0 1 0 0 -0
-19.684 29.5286 0.001 0 1 0 1 -0
-19.684 29.5286 7.87502 0 1 0 1 -1
-19.684 29.5286 7.87502 0 1 0 1 -1
19.686 29.5286 7.87502 0 1 0 0 -1
19.686 29.5286 0.001 0 1 0 0 -0
-19.684 29.5286 0.001 -1 0 0 0 -0
-19.684 -29.5266 0.001 -1 0 0 1 -0
-19.684 -29.5266 7.87502 -1 0 0 1 -1
-19.684 -29.5266 7.87502 -1 0 0 1 -1
-19.684 29.5286 7.87502 -1 0 0 0 -1
-19.684 29.5286 0.001 -1 0 0 0 -0

end_mesh

Joe

8O

Avatar
Joe
Posts: 162
Joined: 29.02.2004
With us: 15 years 9 months
Location: United Kingdom

Re: ascii cmod models broken

Post #7by Joe » 16.02.2010, 03:33

Just tested with amalthea.3ds:

3dstocmod amalthea.3ds > amalthea.cmod

amalthea.cmod did not show the trilist section either. But I tested with another 3DS model skylab.3ds, strangely the trilist section appeared in skylab.cmod. I guess 3dstocmod is now "picky" for 3DS models, but it never behaved as such before svn revision 496x.
Joe

8O

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 17 years 10 months
Location: Seattle, Washington, USA

Re: ascii cmod models broken

Post #8by chris » 16.02.2010, 07:49

Joe wrote:Just tested with amalthea.3ds:

3dstocmod amalthea.3ds > amalthea.cmod

Thanks! I've been able to reproduce the problem. The new code doesn't work for 3ds files that don't have any materials defined. I didn't realize that this was even legal (there doesn't seem to be any official documentation for the 3ds file format.) I'll have a fix ready soon.

--Chris

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 17 years 10 months
Location: Seattle, Washington, USA

Re: ascii cmod models broken

Post #9by chris » 16.02.2010, 19:37

SVN revision 4973 fixes the problem for 3dstocmod and cmodview. I still need to fix Celestia itself, which at this point uses different code to convert 3ds files (something I intend to address soon.)

--Chris

Topic author
Boux
Posts: 435
Joined: 25.08.2004
With us: 15 years 3 months
Location: Brittany, close to the Ocean

Re: ascii cmod models broken

Post #10by Boux » 17.02.2010, 09:20

Here is an example of what is happening:
http://www.quickfixcomm.fr/Celestia/mw-msx.7z
It is a small add-on by Selden.
The zip provide models in cmod ascii, cmod bin and 3ds for reference.
The bug happens with any ascii cmod model (I have dozens of them, all broken!).
Really nasty.
Intel core i7 3770 Ivy Bridge @ 4.4 GHz -16 GB ram - 128 GB SSD cache - AMD Radeon 7970 3 GB o'clocked - Windows 7 64 Ultimate / Linux Kubuntu

Avatar
Joe
Posts: 162
Joined: 29.02.2004
With us: 15 years 9 months
Location: United Kingdom

Re: ascii cmod models broken

Post #11by Joe » 17.02.2010, 12:17

Chris,

3dstocmod (code from SVN revision 4973) gets a hold when I tried it on a Windows XP.
Joe

8O

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 17 years 10 months
Location: Seattle, Washington, USA

Re: ascii cmod models broken

Post #12by chris » 17.02.2010, 15:48

Boux wrote:Here is an example of what is happening:
http://www.quickfixcomm.fr/Celestia/mw-msx.7z
It is a small add-on by Selden.
The zip provide models in cmod ascii, cmod bin and 3ds for reference.
The bug happens with any ascii cmod model (I have dozens of them, all broken!).
Really nasty.

Thanks, Boux. I used this model to find and fix the bug (a one-liner) in SVN revision 4976.

The bug affected ASCII cmod files with textures, and only in Celestia, not the cmodview tool that I'd been using to test a lot of cmod files.

--Chris

Topic author
Boux
Posts: 435
Joined: 25.08.2004
With us: 15 years 3 months
Location: Brittany, close to the Ocean

Re: ascii cmod models broken

Post #13by Boux » 17.02.2010, 16:12

Thanks, Chris.
Just built 4976 and everything is back to normal :D

PS: thanks Selden for the sphere model with inward normals. Very useful for many add-ons!
Intel core i7 3770 Ivy Bridge @ 4.4 GHz -16 GB ram - 128 GB SSD cache - AMD Radeon 7970 3 GB o'clocked - Windows 7 64 Ultimate / Linux Kubuntu

Avatar
Joe
Posts: 162
Joined: 29.02.2004
With us: 15 years 9 months
Location: United Kingdom

Re: ascii cmod models broken

Post #14by Joe » 23.02.2010, 03:51

Hi,

Anyone has a copy of WIN32 3dstocmod tool compiled from SVN revision 4973? I cannot make it work, it holds everytime I run it.
Joe

8O

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 17 years 10 months
Location: Seattle, Washington, USA

Re: ascii cmod models broken

Post #15by chris » 23.02.2010, 04:41

Joe wrote:Hi,

Anyone has a copy of WIN32 3dstocmod tool compiled from SVN revision 4973? I cannot make it work, it holds everytime I run it.

I'll build a new version of this as soon as I can... You might want to try out the new cmodview utility. cmodview is a GUI app which can preview, convert, and perform basic operations on 3D file types supported by Celestia. Here's the link for Windows:

http://www.celestiaproject.net/~claurel/celest ... -win32.zip

And the Mac version:

http://www.celestiaproject.net/~claurel/celest ... odview.dmg

There's no installer for the Windows version. The zip archive just contains the EXE and required libraries.

--Chris

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

Re: ascii cmod models broken

Post #16by Fenerit » 23.02.2010, 18:21

Thanks! Just FYI, no particular issues with 4973, CMOD models that I use doesn't have problems. Thanks to Vincent also for the locations patch. 8)
Never at rest.
Massimo

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

Re: ascii cmod models broken

Post #17by Fenerit » 23.02.2010, 19:31

Just a question: does the "change base texture" buttons are work-in-progress features ? They doesn't open the file selection... I tried to extract the cmodview both in /celestia/ and /extras. All the rest work perfecly but that buttons doesn't seems to work... (Windows system)
Never at rest.
Massimo

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 17 years 10 months
Location: Seattle, Washington, USA

Re: ascii cmod models broken

Post #18by chris » 23.02.2010, 22:10

Fenerit wrote:Just a question: does the "change base texture" buttons are work-in-progress features ? They doesn't open the file selection... I tried to extract the cmodview both in /celestia/ and /extras. All the rest work perfecly but that buttons doesn't seems to work... (Windows system)

Right--those buttons are not hooked up yet. Soon! :)

--Chris

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

Re: ascii cmod models broken

Post #19by Fenerit » 23.02.2010, 22:55

Never mind: happy to wait for that. However, although not yet tested, the OBJ to CMOD option is GREAT and was one of my personal Celestia's features request, so I wish to express my gratitude. THANKS!!! :D
Never at rest.
Massimo

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 17 years 10 months
Location: Seattle, Washington, USA

Re: ascii cmod models broken

Post #20by chris » 24.02.2010, 03:22

I've uploaded a new version of cmodview that has texture editing enabled. I'll be posting a lot more information about cmodview in the Utilities section of the forum.

--Chris


Return to “Bugs”

Who is online