Page 1 of 1

Celestia v1.3.1-1: Nebula 3DS cube drawn wrong

Posted: 01.01.2004, 04:23
by selden
Celestia v1.3.1 does not draw 3DS cube Nebula models properly.

I'm trying to implement cubical panoramas within Celestia.

I used Anim8or to design a cube which has a different image on each of its 6 faces. Anim8or draws the cube properly.

Image


When Celestia draws the cube, however, it draws the same image on all of the cube's faces. (The one listed last inside the 3DS file.)

Image
(The perspective looks somewhat strange because you're seeing part of the inside of the cube: the surface normals all point inward.)

An Addon demonstrating this bug can be downloaded from
http://www.lns.cornell.edu/~seb/celestia/cube-bug.zip

Posted: 01.01.2004, 18:57
by jim
Hi Selden,

This is not a bug.

In Celestia each 3D object can have only one material. That means you can't give any face a separate color and texture (one color and one texture per object). Built models with separate objects for each material.

In your case: split (detach) the cube in separate objects and all will work fine. :D

Bye Jens

Posted: 01.01.2004, 19:08
by selden
Jens,

Unfortunately, that's where I started: with six separate surfaces. That creates ugly visible seams between the texture images. My hope was that rendering multiple textures on the same body would eliminate those seams.

Posted: 02.01.2004, 01:41
by Malcolm
Hi Seldon,
Can you not combine the 6 individual textures into one master and then map the 6 different bits of the master onto the 6 different faces ?

I am not familiar with Anim8tor, I used ZModeler, but when I had a similar prob. some time ago when making a model of Ulysses, ( I wanted gold foil on the body, a light texture + ESA logo on the dish antenna etc. ) I combined the several textures into a single master texture and then using the UV mapper I was able to select different parts of the master texture to be transfered ( transformed?) onto the various faces of the 3ds model.
Is there not a similar function/tool in Anim8tor ?

Malcolm.
(not loged in cos I've forgotton my password and it seems I'm not using my original email to get a new one either ! )

Posted: 02.01.2004, 04:30
by selden
Malcom,

I don't think it would hurt if you created a new account. There are plenty of people with accounts who never post. An additional account for someone who does would be just fine.

Unfortunately, I'm very much a novice at 3D modelling. I use Anim8or because it has a relatively simple user interface for creating object models. I've found the user interfaces of 3DStudioMax and Blender3D to be absurdly complex for the "simple" things I've wanted to do.

I don't know what you mean by "master texture" or "map different bits onto the different faces". (But it's given me an idea I'll try after posting this.)

I've managed to create a multi-faceted object that approximates a sphere and project a single rectangular texture image onto it. (Fortunately for me, this sphere is one of the basic shapes defined within Anim8or.) This results in a model that will accept an image that's a "simple cylindrical projection" and look like a planet or all-sky map depending on the direction of the surface normals.

I've also created a distorted cube (a very thin square object) that accepts a rectangular image projected onto its "front". The image also happens to project straight through the object and onto the object's back. The sides of the object display streaks that correspond to the pixels around the edges of the texture image.

In the past few days I've managed to create two different cubical objects that accept multiple textures.

The first is an apparent cube that actually consists of six separate sides. They originally were parts of six different cubes. They're still separate objects within the model, but their corner verticies are in exactly the same locations they would have if they were faces on a single cube: the original six cubes were all identical and centered at [0,0,0].

Unfortunately, when textures are displayed on those surfaces, they show contrasting seams at the edges where they come in contact with one another. This happens even when the textures have similar coloration to one another. I don't know enough about how Celestia is supposed to handle this situation to know if this is a bug in Celestia or not. I'm beginning to suspect that it is a bug, though. The coordinates of the corresponding vertices and edges are precisely the same for the adjacent facets. There should be no separation -- no seam -- between them.

The other cube is the one I've reported as a bug in this thread. I used the UV tool within Anim8or to map a different texture image file onto each of the faces of a single cube. I've verified that the 3DS model file contains different file names for each of those six textures. Celestia projects the sixth texture image file onto all of the faces instead of showing the six different images.

*sigh*

Posted: 02.01.2004, 12:09
by JackHiggins
Selden,
As an alternative to using a thin 3D cube which seems to be causing problems, why not do the following in anim8or:

1) Change the cube to a "Mesh" rather than a primitive
2) Detach one large face to create a new object (i'm not actually sure which is the one that points towards earth, possibly the +Y axis face
3) Delete the remaining faces

When you have a texture on this new face, it'll only be visible from one side, and invisible from behind. (you could always copy & rotate the first face to fix this...)

Hopefully since the new object has only one face, you won't get any odd seams...? This is basically the same as what I did when I made those mesh flags & logos (on this page, if you've forgotten) except that my meshes had different segments with different colours, which I then seperated out (since you can only have one colour/object in a 3ds mesh)


Malcolm,
If I understand you right, It's not possible to do that in a 3ds file. Anim8or won't let you anyway... Selden mentioned the UV mapper in his post- basically that's the feature in anim8or that you were using in ZModeler. Unfortunately 3ds format can only have one texture/colour/specularity etc per object, so when you try to UV a different part of the texture on a different part of the same box, the main texture will just get rotated around.

I've made a model- well- several... of Ulysses myself (available from near the top of this page) but as I've discovered, using textures with 3ds models is actually rather sucky, compared to the results you can get using mesh for logos, markings and... Gold foil! See the link I gave selden above for more about those.

Btw, that was one of the first models I did using the crinkly foil technique, and the first to have text markings on it. If I was doing an ESA logo now i'd do it link the NASA logo in the first link.

Create a new account as well- don't worry about your email addy- it's not like Chris is going to spam you about Celestia or anything... :twisted:

Posted: 02.01.2004, 14:36
by jim
Hi Selden,

now you can apply a single cylindrical map on your cube but I guess that's not what you want because of the limit of texture size (4k) on 3ds meshes in Celestia. I think the real reason for 6 separate textures is to improve the resolution of your 'scy' map. :?: ;-)

Now for mapping a cube there is a special DDS format that combines 6 textures to a seamles cube map. You can build this easy with 'Nvdxt'. But I guess celestia will not accept this DDS file. Further it's seams to need 3DSMax with plugin to apply such a map to a cube. ;-(
More infos on this can be found on Nvidea's support site.

Maybe I have a solution for the ugly visible seams. Detach each face of your cube. Than increase the size of each face a bit that these overlap. Now use textures with alpha channel and use these to blend out smooth the texture on the borders.
I'm not sure if this works but you can give it a try.

Bye Jens

Posted: 02.01.2004, 15:26
by Ptarmigan
Selden ,

>>"I don't think it would hurt if you created a new account. "

Yep, I thought of that ,, later,, ! at least then I would have been able to edit my post to correct my spelling of your name, sorry about that !!
So, here I am, it is I, Malcolm with a new monicker :)

>>"Unfortunately, I'm very much a novice at 3D modelling..... I don't know what you mean by "master texture" or "map different bits onto the different faces". (But it's given me an idea I'll try after posting this.) "

I'm still a novice also, which is probably why I didnt express myself well-- forget "master" insert "single".
Ie. combine your six images into a single large one (eg. tile it 2 rows of three or 3 rows of two or whatever)
( but I see from your latest post that you have done that already )
Then, using a UV mapper, the single large texture gets mapped onto the 3ds model such that each of the (,,hmmm what shall I call them ,,, sub-areas ?) six subareas of the texture end up on each of the faces of the cube.
However, I think we may be on a wild goose chase here cos I've just had a little look round the Anim8or site and its manuals and I dont see any mention of a UV tool, so it may not have one so we are a bit scuppered !
I think there are freeware stand alone UV mappers for 3ds models out there, or you could try Zmodeler**
The uv refers to a uvw coordinate system analagous to xyz in the real model space, w is not (generally) used so we are left with u and v cartesian coords in the texture plane which get transformed into the xy and z on the model.
( I think !! )

>>" Celestia projects the sixth texture image file onto all of the faces instead of showing the six different images. *sigh* "

Yep! need uv maper tool for sure :-) then you will be able to choose any part of the texture to be placed on any face or facet

I tried Blender3D and gave myself a headache :-(
Not tried StudioMax, cannot afford it, and anyway it would be a shame to use payware on beautiful open source Celestia. :)Might even be an insult to Celestia :)
** Zmodeler (freeware but registerable), http://www.zmodeler.com, I was using version 1.07a, but I see that he now has a Zmodeler2 on his site.
{after I've got my billboards (and other shapes) working I'll have to try Zmodeler2}

>> "Unfortunately, when textures are displayed on those surfaces, they show contrasting seams at the edges where they come in contact with one another. This happens even when the textures have similar coloration to one another."

I dont think I can help much here either, but I wonder if it might be a problem with the normals of one surface not being aligned with the normals on the other surface, so that they are each being given a slightly different illumination ?

*PS.* Just before posting the above I had another look round the Anim8or site and in the online manual, 10 Materials, it describes Environment Maps and illustrates this with a tiling for a cube being placed upon a sphere, any hope there ???

PPS and I see that discussion has moved on apace !
Jack : Give me a wee while and then I'll get back to you about Ulysses and things
(did Selden mention UVmaping ? I must be going blind ! In this thread or somewhere else ? ) Edit :) ah yes, so he did, in his second post which was after our first ones !
So, I dunno,,, I was able to use the Zmodeler UV maper to choose which areas of my single texture I wished to be placed on the various faces and/or facets of my model and it showed up ok in Celestia.
I should still have a screenshot somewhere on my HD, I'll see if I can post it later.
Malcolm.

Posted: 02.01.2004, 16:32
by Ptarmigan
Jack,
>>"If I understand you right,"

I think perhaps we have a misunnerstanding, or

>>" It's not possible to do that in a 3ds file. Anim8or won't let you anyway... "

It seems to have worked for me in Celestia using Zmodeler, ( but some 3ds models constructed by other people wont load into my Zmodler so there is summat a bit strange going on)

Anyway, here is a quick webpage that I've just made to show my texture and a screenshot for you to have a peek at before you whiz off to your skiing hols. Got room for a little fella in your luggage?:-)
It is a geocities page, sadly, so have your popup-killer handy !
http://uk.geocities.com/ptarmigana/celestia/


Malcolm.

Posted: 02.01.2004, 18:01
by JackHiggins
Ahhh... Ok I see what you mean now! I thought you meant you were trying to use the same image multiple times, rather than just wrapping around once.

(but some 3ds models constructed by other people wont load into my Zmodler so there is summat a bit strange going on)
Which models...? Dunno what might be causing something like that to happen...

It is a geocities page, sadly, so have your popup-killer handy !

Popups? What popups?! :) I use Crazy Browser. It's like IE, except it doesn't suck!

Posted: 02.01.2004, 18:31
by selden
I thought I'd bring you all up to date with my problem.

I did some more origami with a 3DS model and it seems to have revealed where the "seams" are coming from. As best I can tell, they're other edges of surface texture images slipping slightly into the field of view due to scaling. They're less than the width of a single pixel in the surface texrture image.

What I did was merge the 6 images into a T shape occupying 6 of the 12 tiles forming a single rectangular image. This rectangular surface texture image was projected onto a face of a rectangular object. The corner verticies of the object were deleted, leaving just those facets corresponding to the 6 images of the T. (The original object had only 12 facets, each of them exactly corresponding to a texture tile.)

This flat T-shaped 3D object then was folded up into a cube. As a final step, I merged adjacent vertices that previously had been on outer edges.

Then the surface texture image was scaled to be square and a power of two on a side, as required by Celestia.

After all this, only 4 seams (out of a possible 12 -- one on each edge of the cube) were visible inside the cubical panorama.

I managed to get rid of one of the seams by judiciously cutting and pasting one of the "invisible" tiles on the rectangular surface texture image. This modified tile was one that was not supposed to be projected onto the cube's surfaces. It was adjacent to one of those tiles, though. Apparently its edge was just barely visible.

What a pain.

I'm trying to make a "billboard" object that will simply accept 6 square images produced by a program like Terragen so they form a 3D panorama. It isn't appropriate for the billboard's user to have to patch the images together and slice and dice them in obscure ways so they tile seamlessly. I think this exercise has shown me what has to be done, though.

Posted: 02.01.2004, 18:38
by selden
Malcom and Jack,

My guess is that some of those models that won't load are billboards that I've created. I use Emacs to change the name of the surface texture image(s) within the 3DS file. I don't bother to try to keep the final name the same length as the original name.

Celestia has no trouble displaying a 3DS model that's been damaged in this way. 3D modelling packages, however, refuse to load them.

Posted: 02.01.2004, 20:39
by Guest
Jack,
by the way, no problems over email addresses and spam, no, quite the opposite. It was me with too many accounts forgetting which I had used when originally signing up to Celestia many many moons ago, you see.

>>"Ahhh... Ok I see what you mean now!"

Ohhhh dear me ! this text messaging is sooo difficult :) I'm not sure about that, I think we may still be at xporpoises !!
I thnk we need to go down the Elepant&Castle and have a pint and wave our arms about and sketch on beermats :)

>>" I thought you meant you were trying to use the same image multiple times, "

I am

>>"rather than just wrapping around once."

well it isnt exactly like wrapping, ummm not at all like a wrap in fact !
well, not in Zmodeller anyhows,,,
here, does this help us :-
http://uk.geocities.com/ptarmigana/celestia/page2.htm

Selden,
glad to see you are progressing, I'll shut up now, cos if I go on about Zmodeller any more then you might be tempted to change but I couldnt be held responsible for any mental injury caused :-) :-)
When I said about Zmodler not loading some 3ds models, I was speaking generally, not just Celestia 3ds models. Cant offhand remember any examples, it may just be that some are too big, too many polygons or something

Posted: 02.01.2004, 21:19
by Ptarmigan
and guess who forgot to log in, doh!
the above guest was me,

Malcolm.

Posted: 05.01.2004, 00:05
by granthutchison
Ptarmigan:
Your link to Zmodeler made my day, for a while. I've been hoping to find something that would smooth the meshes and take the shine off 3ds models exported by 3DWin3OGL. Zmodeler surely does a nice job on the normals, but there seems to be a bug in the materials editor - when I assign a new material with no shine at all, it adds shine to my model. (Aaaargh!) Is this a problem you've run into? I'm using 1.07b on Windows XP.

Can anyone out there recommend a simple 3ds editor that'll just let me assign a matt texture? I'm hoping to do a major revision to Celestia's stock of 3ds asteroids, comets and moons so that they all behave in a consistent manner, with their orientations and textures conforming to the Celestia norm. Now, thanks to Zmodeler, I'm 99% of the way there - all I need now is to get rid of the slight residual glaze effect that has been added to my edited models.

Grant

Posted: 05.01.2004, 01:09
by Rassilon
grant,

In the material editor, make your specular color black...

Posted: 05.01.2004, 13:50
by Ptarmigan
Grant :
>>"it adds shine to my model. (Aaaargh!) Is this a problem you've run into?"

Sorry, I can't help, I've not played with shine (yet).
Oleg, author, used to frequent the forum, maybe worth putting a question there ?

>>"Can anyone out there recommend a simple 3ds editor that'll just let me assign a matt texture? "

Another modeller that I tried was Milkshape, http://www.swissquake.ch/chumbalum-soft/ but it is(was) time limited, I was a raw beginner, it expired on me before I learned what I was doing ! :roll: Might be OK for experts tho'.

Rassilon :
I must be going blind, I can't find a specular control in there, whereabouts did you find it ?

Malcolm.

Posted: 05.01.2004, 21:00
by granthutchison
Ah-ha.
I can't see a specular colour setting in Zmodeler either, Ptarmigan, but there is one in MilkShape. But MilkShape also lets me export 3ds models with no material defined at all, which has the same apparent end result as setting specular colour to black, and seems a more satisfying approach to the problem.
So thanks very much, Rass' and Ptarmigan. That's me set up for a final great sorting-out of Celestia's 3ds models!

Grant

Posted: 05.01.2004, 22:52
by Rassilon
Ptarmigan wrote:
Rassilon :
I must be going blind, I can't find a specular control in there, whereabouts did you find it ?

Malcolm.


I use 3d studio max...Grant mentioned material editor...I took a shot in the dark thinking if theres a material editor there must be a color setting for all the mats...

And currently Celestia checks for color...if the color is set but the values not you will still have specular...it may be that the 3ds exporter doesnt pass these values into the file...From what I gather in the code both shininess and color are grabbed...