Newbie questions about textures and VT's

Tips for creating and manipulating planet textures for Celestia.
Avatar
Topic author
Chuft-Captain
Posts: 1779
Joined: 18.12.2005
With us: 18 years 11 months

Newbie questions about textures and VT's

Post #1by Chuft-Captain » 13.02.2006, 14:12

Sorry if I'm wasting peoples time with stupid questions, but I haven't done anything with VT's yet, so I have a few questions about the basics....

1.I've experimented with normal textures and they seem to somehow magically align and scale automatically to the object they are assigned to, however you don't seem to have much control over the exact positioning. For example, I'm not quite sure how the position of the longitude meridian is determined on lets say the earth, and how to ensure the corresponding longitude on the texture is aligned with the meridian on the sphere.

2. If you assign a texture (any file type: JPG,DDS,PNG, etc) to a model component in a 3D modelling program such as Anim8tor, how can you match up the edges of textures on adjacent object components of different shape and size, so that the texture appears to flow continuously from one to the other. What I find is that if I assign the same texture to different shaped objects it's applied and stretched differently for each object. I'd like to have control over how it's applied, positioned, stretched, etc. Perhaps VT's are the solution????

OK, that's a nice segway to Virtual Textures:

1. These always seem to be .DDS files. Can these be viewed with the same programs you use to view JPG's, BMP's, PNG's etc?
BTW: WinXP does not generate thumbnails for these files.

2. Can DDS's be imported into Anim8tor or other 3D modellers and assigned to object components as can other file-types?

3. I notice that VT's on the Motherlode isually say: "Requires a complete Earth VT.". What I'd like to do, is to perhaps import some or all of the levels of a VT into Anim8tor and position it on selected (different shaped) components of the model. The question is, can VT's only be applied to Celestia spheres and ring-models?

4. From what I understand, the tiles are positioned using lat/long co-ordinates, so how would that be applied to a non-spherical model. Lets say for example, you wanted to position a tile (which I assume is represented by a .DDS file) on the inside surface of a ring-world model you've designed, or perhaps a Borg-cube. (Again, I suspect this would have to be done in Anim8tor rather than Celestia)

If these questions don't make sense, that's probably due to my lack of experience in this area, but I'd appreciate any comments that will improve that situation.

Cheers
Last edited by Chuft-Captain on 13.02.2006, 16:12, edited 1 time in total.
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS

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

Re: Newby questions about textures and VT's

Post #2by selden » 13.02.2006, 14:46

Chuft-Captain wrote:Sorry if I'm wasting peoples time with stupid questions, but I haven't done anything with VT's yet, so I have a few questions about the basics....

1.I've experimented with normal textures and they seem to somehow magically align and scale automatically to the object they are assigned to, however you don't seem to have much control over the exact positioning. For example, I'm not quite sure how the position of the longitude meridian is determined on lets say the earth, and how to ensure the corresponding longitude on the texture is aligned with the meridian on the sphere.
Celestia's internal spheres are designed to work with simple-cylindrical surface texture image maps which have 0 degrees of longitude in the center and 180 degrees at the edge.

2. If you assign a texture (any file type: JPG,DDS,PNG, etc) to a model component in a 3D modelling program such as Anim8tor, how can you match up the edges of textures on adjacent object components of different shape and size, so that the texture appears to flow continuously from one to the other. What I find is that if I assign the same texture to different shaped objects it's applied and stretched differently for each object. I'd like to have control over how it's applied, positioned, stretched, etc. Perhaps VT's are the solution????
You have to specify the alignment of each of the surface textures on the various objects in a 3D model. This is called "UV Mapping". Anim8or has a rather crude UV mapping tool built into it. There's a freeware utility UVMapper that is somewhat better.

Complete VTs can't work on 3D models, only on Celestia's internal spheres.

OK, that's a nice segway to Virtual Textures:

1. These always seem to be .DDS files. Can these be viewed with the same programs you use to view JPG's, BMP's, PNG's etc?
BTW: WinXP does not generate thumbnails for these files.
VTs can be created using any image format that Celestia understands. (BMPs do *not* work well in Celestia.) It's just that DDS images have much better performance than the other formats.

Nvidia provides a freeware utility that will allow Windows to generate thumbnails for DDS files. In the past it's been buggy enough (causing lockups or crashing the Windows explorer) that I haven't used it for a long time. Irfanview is one of several freeware viewers that can be used.

2. Can DDS's be imported into Anim8tor or other 3D modellers and assigned to object components as can other file-types?
Not Anim8or. I'm sure commercial 3D design packages can, but they cost lots.

3. I notice that VT's on the Motherlode isually say: "Requires a complete Earth VT.". What I'd like to do, is to perhaps import some or all of the levels of a VT into Anim8tor and position it on selected (different shaped) components of the model. The question is, can VT's only be applied to Celestia spheres and ring-models?
Only to Celestia's spheres. Not to rings. And not to 3D models, at least not as VTs. The individual image tiles of a VT can be applied, however, one at a time.

4. From what I understand, the tiles are positioned using lat/long co-ordinates, so how would that be applied to a non-spherical model. Lets say for example, you wanted to position a tile (which I assume is represented by a .DDS file) on the inside surface of a ring-world model you've designed, or perhaps a Borg-cube. (Again, I suspect this would have to be done in Anim8tor rather than Celestia)
They have to be aligned manually using UV Mapping tools.

p.s. Or, once you understand how textures map to objects by default, you can create the model with individual pieces that have appropriate images mapped onto them.
Selden

Avatar
Topic author
Chuft-Captain
Posts: 1779
Joined: 18.12.2005
With us: 18 years 11 months

Re: Newby questions about textures and VT's

Post #3by Chuft-Captain » 13.02.2006, 17:15

Thanks as always for your help Selden,
( you always seem to be first with the answers :wink: )
selden wrote:Celestia's internal spheres are designed to work with simple-cylindrical surface texture image maps which have 0 degrees of longitude in the center and 180 degrees at the edge.
Ditto for latitudes I guess...(except -90...0...+90 ?)

My conclusions from your other comments:
I need a tool firstly to be able to view DDS's,
If I want to apply individual DDS images to models, then my choices are either:
    get a tool other than Anim8tor that will allow them to be imported and applied to a model, (presumedly with this approach, once a texture is applied outside of Anim8tor, further structural changes to the model in Anim8tor would stuff up the texture)

    Get a tool that will convert DDS's to JPG's and then import them in Anim8tor

Complete VTs can't work on 3D models, only on Celestia's internal spheres.
So, models can only ever have one texture and therefore a single fixed resolution applied to each component of the model? (well, at least when the textures are embedded in the model).

Or, once you understand how textures map to objects by default, you can create the model with individual pieces that have appropriate images mapped onto them.
I've tried experimenting with different versions of a texture in lores,medres,hires directories. This was a while ago, but from memory, I think it only switched textures on planets etc. I might experient a bit more with that though.

BTW. I've had issues with textures breaking up into triangular patches exposing the underlying textures on other parts of the model. This seems to be also associated with very low (<1fps) frame rates. Not sure at this stage if the low frame-rate is symptom or cause of the problem.
Do you know if this breaking up of textures is a symptom of the sorting depth issues of models with transparent parts? I haven't noticed this problem with other non-transparent models of similar complexity. eg. Space Station V.
Any ideas on relative cost of polygon count versus texture resolution within Celestia. ie. What's most challenging to Celestia...models with high polygon counts and lores-textures, or models with lower polygon counts but hires textures? This might be a question only Chris or Fridger can answer fully.

Cheers

EDIT: Some other comments I found regarding VT'S, DDS: http://celestiaproject.net/forum/viewtopic.php ... ght=#47400
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS

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

Re: Newby questions about textures and VT's

Post #4by selden » 13.02.2006, 17:37

Chuft-Captain wrote:Thanks as always for your help Selden,
( you always seem to be first with the answers :wink: )
selden wrote:Celestia's internal spheres are designed to work with simple-cylindrical surface texture image maps which have 0 degrees of longitude in the center and 180 degrees at the edge.
Ditto for latitudes I guess...(except -90...0...+90 ?)
"simple cylindrical" usually means that the north pole is at the top and the south pole at the bottom, stretched to the full width of the image.

My conclusions from your other comments:
I need a tool firstly to be able to view DDS's,
If I want to apply individual DDS images to models, then my choices are either:
    get a tool other than Anim8tor that will allow them to be imported and applied to a model, (presumedly with this approach, once a texture is applied outside of Anim8tor, further structural changes to the model in Anim8tor would stuff up the texture)

    Get a tool that will convert DDS's to JPG's and then import them in Anim8tor
Or create the model using a dummy jpg surface texture, and then manually edit the model file (3DS or CMOD) to specify the final image file name.
Complete VTs can't work on 3D models, only on Celestia's internal spheres.
So, models can only ever have one texture and therefore a single fixed resolution applied to each component of the model? (well, at least when the textures are embedded in the model).
Celestia only supports one texture file per component. More sophisticated rendering packages can have more than one texture per surface. You can simulate that feature by cutting a component into separate pieces and apply a texture to each of them.

However, DDS texture files can contain several images with different resolutions. They're called "mipmaps". My understanding is that the different resolutions are automatically selected by the graphics card.

Or, once you understand how textures map to objects by default, you can create the model with individual pieces that have appropriate images mapped onto them.
I've tried experimenting with different versions of a texture in lores,medres,hires directories. This was a while ago, but from memory, I think it only switched textures on planets etc. I might experient a bit more with that though.
Currently, texture files specified within a model must be in the medres folder. I don't know if that'll change any time soon.

BTW. I've had issues with textures breaking up into triangular patches exposing the underlying textures on other parts of the model. This seems to be also associated with very low (<1fps) frame rates. Not sure at this stage if the low frame-rate is symptom or cause of the problem.
Do you know if this breaking up of textures is a symptom of the sorting depth issues of models with transparent parts? I haven't noticed this problem with other non-transparent models of similar complexity. eg. Space Station V.
Celestia has the most problems displaying partially transparent surface textures -- images with alpha channels specifying opacity. It has fewer problems with models that have transparent components. I'm not sure which situation you're describing.

Any ideas on relative cost of polygon count versus texture resolution within Celestia. ie. What's most challenging to Celestia...models with high polygon counts and lores-textures, or models with lower polygon counts but hires textures? This might be a question only Chris or Fridger can answer fully.
Once a model and its textures have been loaded, the performance depends on your graphics card. The load time is mostly affected by how much memory your system has (whether it has to page to disk) and the disk performace.
Selden

Avatar
Topic author
Chuft-Captain
Posts: 1779
Joined: 18.12.2005
With us: 18 years 11 months

Re: Newby questions about textures and VT's

Post #5by Chuft-Captain » 15.02.2006, 09:14

selden wrote: Or create the model using a dummy jpg surface texture, and then manually edit the model file (3DS or CMOD) to specify the final image file name.
I'm not sure what you mean by use of dummy jpgs. Could you explain further? What do you mean by 'manually edit the model file (3DS or CMOD)'?
I generally apply different textures within Anim8tor to individual meshes, or parametric components of my models (so there's several JPGs associated with each 3DS (where the model requires different textures for different parts, which is pretty much every model).

selden wrote:Complete VTs can't work on 3D models, only on Celestia's internal spheres. So, models can only ever have one texture and therefore a single fixed resolution applied to each component of the model? (well, at least when the textures are embedded in the model). Celestia only supports one texture file per component. More sophisticated rendering packages can have more than one texture per surface. You can simulate that feature by cutting a component into separate pieces and apply a texture to each of them.
What I'd really like to be able to do is to use VT tiles on a model so that as you got closer to the surface, you'd see more and more detail, (as with Celestia meshes) but it looks like that's not possible (at least with Anim8tor it's not). Even, if I used a more sophisticated modelling tool, it looks like from your comments that Celestia wouldn't handle multi-resolution VT's or DDS's on models anyway. Maybe this is something to put on a wish-list to Chris. :wink:

selden wrote:Celestia has the most problems displaying partially transparent surface textures -- images with alpha channels specifying opacity. It has fewer problems with models that have transparent components. I'm not sure which situation you're describing.

It's a model with semi-transparent windows ... I specify a % of transparency to be applied to the window components within Anim8tor. (The textures and most other parts of the model however, are all fully opaque, unless I've made a mistake within Anim8tor)
This is what happens: (Note the FPS)
Image

Should look like this:
Image

I think at the end of the day, the problem is caused by poor graphics performance exposing the transparency depth sorting issues. I think if the model didn't have transparent parts, this texture breakup might not occur. What do you think?

Bye,
CC
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS

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

Re: Newby questions about textures and VT's

Post #6by selden » 15.02.2006, 11:20

Chuft-Captain wrote:
selden wrote: Or create the model using a dummy jpg surface texture, and then manually edit the model file (3DS or CMOD) to specify the final image file name.
I'm not sure what you mean by use of dummy jpgs. Could you explain further?
I just mean use some simple jpeg that meets the needs you have while you're creating the model rather than one that's fully developed to make the model look beautiful in Celestia.
What do you mean by 'manually edit the model file (3DS or CMOD)'?
Use your favorite binary editor to modify the 3DS model file or a text editor to modify the model file after it has been converted to ASCII CMOD format. Change the material texture names in the model file from .JPG to .DDS, .PNG or .*
I've used Emacs to edit 3DS models, but if the final image texture file name isn't exactly the same length as the original name, the model will only be readable by Celestia. It's more generous with that kind of damage than modelling programs are. Of course, if you're using Anim8or, that won't matter since the "real" model file should be the one that's in .an8 format, and the .3ds file is an exported copy of it.
I generally apply different textures within Anim8tor to individual meshes, or parametric components of my models (so there's several JPGs associated with each 3DS (where the model requires different textures for different parts, which is pretty much every model).
That sounds quite reasonable.

selden wrote:Complete VTs can't work on 3D models, only on Celestia's internal spheres. So, models can only ever have one texture and therefore a single fixed resolution applied to each component of the model? (well, at least when the textures are embedded in the model). Celestia only supports one texture file per component. More sophisticated rendering packages can have more than one texture per surface. You can simulate that feature by cutting a component into separate pieces and apply a texture to each of them.
What I'd really like to be able to do is to use VT tiles on a model so that as you got closer to the surface, you'd see more and more detail, (as with Celestia meshes) but it looks like that's not possible (at least with Anim8tor it's not).
VTs won't work, that's true. However, as I mentioned, you can use NVDXT to create a DDS texture file that includes multiple images at different levels of resolution that NVDXT creates from a single high resolution image. Of course, then you're using one gigantic image file (about 2x the size of the high resolution image) instead of lots of little ones.
Even, if I used a more sophisticated modelling tool, it looks like from your comments that Celestia wouldn't handle multi-resolution VT's or DDS's on models anyway. Maybe this is something to put on a wish-list to Chris. :wink:
VTs depend on the model having tiny triangles onto which individual tile images can be mapped. The algorithm is relatively easy when you know the format of the model, like on a sphere. It's almost impossible on a random model made up of random triangles.
selden wrote:Celestia has the most problems displaying partially transparent surface textures -- images with alpha channels specifying opacity. It has fewer problems with models that have transparent components. I'm not sure which situation you're describing.
It's a model with semi-transparent windows ... I specify a % of transparency to be applied to the window components within Anim8tor. (The textures and most other parts of the model however, are all fully opaque, unless I've made a mistake within Anim8tor)

I think at the end of the day, the problem is caused by poor graphics performance exposing the transparency depth sorting issues. I think if the model didn't have transparent parts, this texture breakup might not occur. What do you think?
I fear you're correct. I don't think I've seen that particular effect on models I've created, but I've seen something similar. :(
Selden

Avatar
Topic author
Chuft-Captain
Posts: 1779
Joined: 18.12.2005
With us: 18 years 11 months

Post #7by Chuft-Captain » 15.02.2006, 13:26

VTs depend on the model having tiny triangles onto which individual tile images can be mapped. The algorithm is relatively easy when you know the format of the model, like on a sphere. It's almost impossible on a random model made up of random triangles.


AHA! I sense a chance here.
My model (at least the components I want to tile: the valley floors and the endcaps) DOES have a somewhat known or predictable structure.
2 hemispheres - 7.2 km diameter
3 rectangular boxes - 20km x ~4km x 0.1km (I think about 10-20 divisions lengthwise, and 6 across the width)
These should make it clear:
Image Image Image Image
Given this structure, is VT tiling workable, and if so what would be the procedure?

Let's say a valley floor was for arguments sake, 20x6 divisions.
I assume the base level would be made up of 120 images of matching aspect ratio, and then next level resolution tiles would align to those base images, and so on...., but if so, how do you get the base images positioned correctly. Do you have to have latitude/longitude references as on a planet mesh, and if so how do you define this on the model components?
Bear in mind that each valley is a curved 3D box but I only need to texture the inside face. I would also need to match the edges at valley end with corresponding tiles on the endcap.

....or am I completely off track? :wink:

Cheers[/img]
Last edited by Chuft-Captain on 09.03.2006, 04:14, edited 1 time in total.
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS

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

Post #8by selden » 15.02.2006, 14:26

Given this structure, is VT tiling workable, and if so what would be the procedure?


Someone would have to write the appropriate code in Celestia.

If you can actually use Celestia's spherical object, you could use a VT for that particular part of your Addon. Otherwise, not.

Sorry.
Selden


Return to “Textures”