Problem with a 3DS model

Tips for creating and manipulating planet textures for Celestia.
Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Re: Problem with a 3DS model

Post #21by cartrite » 10.12.2008, 00:57

The values are as follows in cmod files. There is a line for every set of coordinates that describes each vertice. The first 3 numbers of each line are xyz position coordinates. The next 3 are the xyz normal coordinates. The last 2 are the texture coordinates. These are also referred to as UV coordinates. This maps the the 2d texture onto the 3d mesh. This is done with the 3d program you are using. It sounds like you have to remap the UV's or texture coordinates. Which 3d program are you using? I use Blender and sometimes Anim8or.
cartrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Stuffer
Posts: 67
Joined: 03.12.2008
With us: 15 years 11 months
Location: Stuttgart, Germany

Re: Problem with a 3DS model

Post #22by Stuffer » 10.12.2008, 09:53

I use Cinema 4D, but it pointed out, that C4D does not export textures to 3ds-files.
can I create cmod-files out of other 3d file formats?
Or is that different with Blender or Anim8or?
Since I get my model from CATIA it has many meshes where I would have to guess which ones I have to lay a texture on. So I would definitely prefer to have this done by my 3D-program.
Win XP Pro x Core2Duo 2,1GHz x 2 GB RAM x NVidia Quadro FX 1500 256 MB

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Re: Problem with a 3DS model

Post #23by cartrite » 10.12.2008, 10:18

Blender and Anim8or can work with 3ds files. With Blender, it is a bit tricky though. They are both free too.
Maybe you should familiarize yourself with one of those. If anything, they may be able to import the 3ds file and then export it to something you can use in C4D.
Then the textures should already be assigned.
cartrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Stuffer
Posts: 67
Joined: 03.12.2008
With us: 15 years 11 months
Location: Stuttgart, Germany

Re: Problem with a 3DS model

Post #24by Stuffer » 10.12.2008, 10:34

can blender/anim8or export to 3ds with textures assigned so that I can make a cmod out of it with the help of 3ds2cmod?
Or did you try the blender exporting script to cmod which is linked in one of the manuals on the celestia motherlode?
Do you export to 3ds, too, and afterwards use the tool 3ds2cmod like I did?

At the moment my idea is to export from C4D into a format that one of those progs can read keeping the textures and from there go on to the cmod-file if it is possible (see 1st question). Then I could avoid exporting to 3ds from C4D with the textures dropped.

Best way would probably be to load the VRML-files directly into blender and then assign the textures but I'm not that familiar with blender and I had hoped to avoid to lose time with getting so.
Win XP Pro x Core2Duo 2,1GHz x 2 GB RAM x NVidia Quadro FX 1500 256 MB

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Re: Problem with a 3DS model

Post #25by cartrite » 10.12.2008, 10:49

can blender/anim8or export to 3ds with textures assigned so that I can make a cmod out of it with the help of 3ds2cmod?
Yes. Anim8or can probably export 3ds better.
Anim8or also has a better cmod export script that Selden wrote. I wrote the cmod export script for Blender and that was meant for planet models. I just wrote enough of it to get a task done because I was tired of playing the 3ds game so it's incomplete.

If C4D can export a waveobject ".obj" file, Anim8or can import it. Then you can use the cmod export script Selden wrote for Anim8or or just export it with Anim8or's 3ds export option. Anim8or can also import other formats but I'm not sure which ones.
Do you export to 3ds, too, and afterwards use the tool 3ds2cmod like I did?
I only model planets and I write my own export scripts to export to cmod from Blender.
Best way would probably be to load the VRML-files directly into blender and then assign the textures but I'm not that familiar with blender and I had hoped to avoid to lose time with getting so.
Blender can import some VRML but I've never used that format. So I'm not sure if importing this format into Blender will save all the original information in the model. You can try it. Just import it in then export it to 3ds and check and see if it works. Learning how to use Blender can take a lot of time though but it shouldn't be that bad if you are only importing and exporting.
cartrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

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

Re: Problem with a 3DS model

Post #26by Fenerit » 10.12.2008, 23:52

Stuffer wrote:Thank you, I really apreciate your help.

I made a simple model consisting only of three bodies. On one of them I layed a texture and saved it as .3ds.
With the 3ds2cmod-software I converted it into cmod (I did none of the fixing options, is that necessary?).

here's what I get in the cmod:

Code: Select all

#celmodel__ascii

material
specular 0.00392157 0.00392157 0.00392157
specpower 128
opacity 4.25804e-011
end_material

material
specular 0.00392157 0.00392157 0.00392157
specpower 128
opacity 4.25804e-011
end_material

material
specular 0.00392157 0.00392157 0.00392157
specpower 128
opacity 4.25804e-011
end_material

mesh
vertexdesc
position f3
normal f3
texcoord0 f2
end_vertexdesc
etc


Then I changed the opacity and specular values as I mentioned before. But there's no diffuse entry and no texture0 entry.
When I tried the real model of my satellite I had a diffuse entry with similar values to the ones here at specular but also no texture0
.


This sound as you haven't assign material and UV coord to the mesh. It's unncessary that your 3d program does export textures when then from 3ds you convert in CMOD. A simple "filemanager" copy/paste operation of the textures in the relevant \medres folder is enough. When you convert from 3ds to CMOD, the 3ds files can be everywhere on your disk and as far as possible from the relevant textures. Probably there is some additional operation in the textures managing of your modeller which allows they to be assigned at mesh.

---- For what concern CMOD options, NORMALS and TANGENTS are relevant to normalmap. You may fix NORMALS also for standard use while TANGENTS - which raise the size of file - use it only whether you use normalmap. A normalmap mapped on a CMOD without TANGENTS lost the highfield when the lights hit the body tangentially.
Never at rest.
Massimo

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Re: Problem with a 3DS model

Post #27by cartrite » 11.12.2008, 09:06

Fenerit wrote:This sound as you haven't assign material and UV coord to the mesh. It's unncessary that your 3d program does export textures when then from 3ds you convert in CMOD. A simple "filemanager" copy/paste operation of the textures in the relevant \medres folder is enough.
I don't think he is trying to export the actual textures here. He is trying to export the texture names for each mesh that has been UV mapped. Then the names will be written into the model.
cartrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Stuffer
Posts: 67
Joined: 03.12.2008
With us: 15 years 11 months
Location: Stuttgart, Germany

Re: Problem with a 3DS model

Post #28by Stuffer » 11.12.2008, 10:31

Cartrire is right.
I do not want to export the actual textures but the names of them and the coordiantes and parameters (size, angle) which I appointed in Cinema 4D so that I would not have to assign them again in Blender or Animator or manually in the cmod-file.

I tried to export the model from C4D to anim8or via .obj but then I only get the meshes without any assigned material, not to mention textures.
So what I do now is I export from C4D to anim8or via .3ds where materials are still included. At least I have some materials on the model which can be seen in Celestia. Doesn't look that good but it's something to work with. Most likely I'll have to assign the textures later again in anim8or which is not too easy until now because the model is very complex and I'm not familiar with anim8or yet but if there's no other solution I hope I'll be able to handle that after some time working with it.

I have another question concerning another topic so I won't discuss it too much in here but I'll just ask here since you seem to have a good overview over what is possible with Celestia.
The satellite should be simulated by another software and what I want to do is visualize it in realtime while running a simulation. The purpose of this should be to see what the satellite does while a simulation is running. For example if it is supposed to shift it's position or turn about several degrees. Since Celestia reads the position at start-up can I change the orbit or position (angle) while it is running for example by a script or modifying the source code or something like that?
Perhaps you can tell me where the right topic for this problem is.

Thanks in advance
Win XP Pro x Core2Duo 2,1GHz x 2 GB RAM x NVidia Quadro FX 1500 256 MB

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Re: Problem with a 3DS model

Post #29by selden » 11.12.2008, 10:54

The Scripting Forum would be better.

In principle it can be done using ScriptedOrbit and ScriptedRotation functions written in Lua.
See the Celestia WikiBook for details. http://en.wikibooks.org/wiki/Celestia/
Selden

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Re: Problem with a 3DS model

Post #30by cartrite » 11.12.2008, 11:05

I'm also not too familiar with Anim8or. I use Blender most of the time. But I think I remember something about the textures have to be in the same folder as the 3ds file so Anim8or can find them. This will not affect the model running in Celestia but you may be able to see how the model looks in Anim8or. I'm not sure how to assign them with Anim8or though. I always use Blender for this. Maybe someone will see this that is more familiar with Anim8or.

Your other question seems to be in the realm of Scripting. Perhaps you should start a thread there. In short, I think you'll either have to write an xyz or if this is an actual satellite, there may be mission files available at the NAIF site. Celestia can use spice to recreate a mission.
http://naif.jpl.nasa.gov/naif/data_operational.html
You can take a look here to see how things are done.
http://en.wikibooks.org/wiki/Celestia
http://en.wikibooks.org/wiki/Celestia/Scripting
http://en.wikibooks.org/wiki/Celestia/S ... #Placement
Note: Much of what is shown on these pages may require a svn build. I have been building svn executables for some time now and they are available at my web pages.
viewtopic.php?f=4&t=12221

cartrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

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

Re: Problem with a 3DS model

Post #31by Fenerit » 12.12.2008, 14:50

Stuffer wrote:Cartrire is right.
I do not want to export the actual textures but the names of them and the coordiantes and parameters (size, angle) which I appointed in Cinema 4D so that I would not have to assign them again in Blender or Animator or manually in the cmod-file.

I tried to export the model from C4D to anim8or via .obj but then I only get the meshes without any assigned material, not to mention textures.
So what I do now is I export from C4D to anim8or via .3ds where materials are still included. At least I have some materials on the model which can be seen in Celestia. Doesn't look that good but it's something to work with. Most likely I'll have to assign the textures later again in anim8or which is not too easy until now because the model is very complex and I'm not familiar with anim8or yet but if there's no other solution I hope I'll be able to handle that after some time working with it.

...


If you work in 3ds format be sure that you set the working directory for C4D textures exactly that of your medres folder's model, because when launch a 3ds in Celestia it may "feel" the complete path which derives from the path give to him from C4D. Another guess that I suppose in order to resolve your problem,is whether in the C4D's textures assignment is specified the channel (that is, COLOR = DIFFUSE in a CMOD conversion).
Never at rest.
Massimo


Return to “Textures”