Page 1 of 1

3D model help

Posted: 07.01.2010, 10:37
by Tuefish
So, I have recently picked Celestia back up and dusted off the addons I had been working on, I also picked up Wings3d, and having much more understanding of how things work, knocked up a small model for an orbital habitat. However, I can't get the textures to cooperate, I've tried using both CMOD and 3DS formats, to no avail.
To illustrate my problem, I have two pictures:
First, the desired result:
Image

Next, the invariable outcome:
Image

Any hints or suggestions?

Re: 3D model help

Posted: 07.01.2010, 13:08
by Fenerit
Hi Tuefish, from the second image the problem is unclear:
1) is the model "out of center"?
2) Is the texture too bright?

Can you please post an image more resized in order to fit the forum's framework?

Re: 3D model help

Posted: 07.01.2010, 14:48
by selden
It looks to me like Celestia is being confused by translucent sections. This is a problem which has not yet been resolved completely. Transparent meshes are not always properly depth sorted.

If the transparency is entirely a result of using an alpha channel in the texture, Celestia usually does a better job of depth sorting if you set the transparency of the material itself to 0.999 instead of 1.0.

Re: 3D model help

Posted: 08.01.2010, 02:23
by Tuefish
Selden,
You are correct, Celestia seems to rendering the whole thing transparent, when the domes are the only part that should be transparent.
But I am unable to find the correct field to enter the transparency, please forgive my ineptitude, as this is my first time working with 3D software.
The Cmod file simply reads:

Code: Select all

#celmodel__ascii

material
diffuse 1 1 1
specular 1 1 1
texture0 "sphere14.png"
end_material

mesh
vertexdesc
position f3
normal f3
texcoord0 f2
end_vertexdesc

with the rest being the model itself.
Any help is greatly appreciated.

Re: 3D model help

Posted: 08.01.2010, 09:10
by Fenerit
Sorry Tuefish, probably you have a 16:9 monitor and the image is fit well. The set for transparency is

Code: Select all

#celmodel__ascii

material
diffuse 1 1 1
specular 1 1 1
opacity 0    # (0 = transparent, 1 = opaque)
texture0 "sphere14.png"
end_material

mesh


But, be sure that the png image be 24 bit not 32 bit. What mean this; your png image must be an "unique level", nor an image copy/pasted upon a new transparent canvas , otherwise the 32 bit alpha layer will be hold and the resulting 3d mesh on which the image is mapped will be managed by Celestia as transparent.

Re: 3D model help

Posted: 08.01.2010, 10:08
by Fenerit
Another thing, from your CMOD settings, seem that the model is an unique mesh; this is no good because you cannot set transparencies separately; you would make your model at least by two meshes: one for the dome (transparents, so that texture isn't required) and one for the wings (textured 24 bit, so will be opaque, even without to set this latter into the field).

Re: 3D model help

Posted: 10.01.2010, 13:07
by Tuefish
Thanks everyone. I finally got it sorted out. if I ever get my addon finished, I'll upload it to the motherlode.