Meshing Question OWNMATERIAL in surface base : textures don't show...

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,995
Reaction score
4,419
Points
203
Location
Toulouse
Hello,

I'm trying to add a mesh (made of several meshgroups) I've done with anim8tor on a surface base. I used the an8->mesh plugin to convert it, and it appears in simulation as I wished.

My problem is that the materials appear on the mesh as they should, but without their textures, which is annoying.

Here is some more specific information :

- The textures appear as they should in anim8tor.
- I'm using D3D9 client
- In the my base .cfg file, the mesh has the OWNMATERIAL (without, it is full "default" white) and SHADOWS flags.
- The textures are in DTX1 format, and their dimensions are powers of 2 as required.
- I've put the textures both in the "Textures" and "Textures2" directories, just in case of...

If someone has an idea... I never had this problem with vessels meshes using the same exact process in anim8tor, so this is "bace-specific". :tiphat:
 
Did you add the texture files to the base.cfg file under the list of generic textures section?

If the textures are not referenced in that cfg the base will load without them.
 
If there isn,t a list of textures at the bottom of your mesh file, they won,t show up because they are not assigned to the mesh.
Also, in anim8tor, when you click a part of the mesh you need a texture, the material box comes up, to add a texture, click on the diffuse button and add your texture from there.

Gary, That,s not strictly true. My new moonbase textures list arent in the base.cfg, they load from the mesh.
 
Last edited:
Did you add the texture files to the base.cfg file under the list of generic textures section?

If the textures are not referenced in that cfg the base will load without them.

Gary: that's true only if mesh has texture manualy set in cfg file.

eg:

Code:
MESH
 .....
 TEX1 Fcd11 2 1
 .....
END

however having mesh flagged with OWNMATERIAL should render mesh with proper texture defined in msh file not in base cfg file

Code:
MESH
FILE meshname
 ... 
 OWNMATERIAL
 ...
END
 
Gary: that's true only if mesh has texture manualy set in cfg file.

eg:

Code:
MESH
 .....
 TEX1 Fcd11 2 1
 .....
END

however having mesh flagged with OWNMATERIAL should render mesh with proper texture defined in msh file not in base cfg file

Code:
MESH
FILE meshname
 ... 
 OWNMATERIAL
 ...
END

Yeah, that is true. I suggest that you test the mesh outside of a surface base to see if thats the problem. I myself have fallen victim to the power of two problem many times with textures :facepalm:.
 
exactly - try creating simple vessel cfg file with this mesh to try if it appears correctly as vessel

---------- Post added at 01:29 AM ---------- Previous post was at 01:08 AM ----------

Also I had problems with my first meshes exported from anim8or and if I recall correctly, filenames of textures in meshgroup head hasn't been passed correctly (it ommited extension)

eg:

Code:
MSHX1
GROUPS 4   ;Exporter: Msh export 070514;
LABEL Tunnel
MATERIAL 1     ;material01;
TEXTURE 1   ;texture;

should be:

Code:
MSHX1
GROUPS 4   ;Exporter: Msh export 070514;
LABEL Tunnel
MATERIAL 1     ;material01;
TEXTURE 1   ;texture[COLOR="Red"].dds[/COLOR];

but I'm not sure. It was long time ago and since I switched to 3ds max and max2msh export script those problems disapeared.

also why not saving file as 3ds and use 3ds2msh converter?
 
I found out. It was a file name typo during the jpg->dds conversion :facepalm:

But now that I disturbed you, what .dds subformat should I use for best results/performance ? DTX1, DTX3, or DTX5 ?

And another question : can meshes have "night textures", like blocks and other generic objects ?
 
Last edited:
I found out. It was a file name typo during the jpg->dds conversion :facepalm:

But now that I disturbed you, what .dds subformat should I use for best results/performance ? DTX1, DTX3, or DTX5 ?

And another question : can meshes have "night textures", like blocks and other generic objects ?

basically DTX# seems to get better with higher numbers; saving exhaust textures in DTX1 completely destroys them, while DTX5 keeps them nice & clear. I would assume that performance impacts are similarly linear.

Dont think so, although I could be wrong. You might be able to do something like that to a mesh if you had a vessel dll ship, but I dont think you can do much when its in a surface base.
 
I found out. It was a file name typo during the jpg->dds conversion :facepalm:

Might be however I recall I had problems with anim8or export script.

But now that I disturbed you, what .dds subformat should I use for best results/performance ? DTX1, DTX3, or DTX5 ?

For base objects I usually use either dxt1 or dxt5. Usually dxt1 since base objects don't need as much quality as vessels IMO.

And another question : can meshes have "night textures", like blocks and other generic objects ?

Yes but it has to be 1 meshgroup mesh with single texture and you have to register day texture in Config\base.cfg file and use TEX handle instead of OWNMATERIAL inside cfg file.

I've never experimented with it though.
 
Last edited:
For base objects I usually use either dxt1 or dxt5. sually dxt1 since base objects don't need as much quality as vessels IMO.

DTX1 is usually fine for bases. You just have to be careful that it doesnt do weird things to the original image while saving.

Yes but it has to be 1 meshgroup mesh with single texture and you have to register day texture in Config\base.cfg file and use TEX handle instead of OWNMATERIAL inside cfg file.

I've never experimented with it though.

That might work, but how will the texture get UV mapped?
 
That might work, but how will the texture get UV mapped?

with proper UVW mapper it's much easier to texture complex shapes like this for example:
XR3_tophull3-preview.jpg




In the same way you're making night version of texture. The only limatation is single default material on it.
 
Last edited:
with proper UVW mapper it's much easier to texture complex hapes like this for example:
XR3_tophull3-preview.jpg


---------- Post added at 02:03 AM ---------- Previous post was at 02:02 AM ----------

In the same way you're making night version of texture. The only limatation is single default material on it.

No, no I understand how UV mapping normally works, but how will Orbiter know to correctly map the texture to the mesh? Does it read the material data from the mesh file?
 
no - it reads only UVW map coordinates and apply texture defined in TEX handle in yourbase.cfg file
 
But now that I disturbed you, what .dds subformat should I use for best results/performance ? DTX1, DTX3, or DTX5 ?

And another question : can meshes have "night textures", like blocks and other generic objects ?
Had answers already, but just to add, dds1 doesn't do transparency. Off the to of my head I can't remember if everything above 1 does, or if only dds5 does.


As to night time textures, yes you can. Look at the current WIN, it uses them. You basically need 2 copies of each building texture, name.dds and name_n.dds. It will only work with buildings loaded in the specific base cfg file and requires manual editing of the base.cfg file. I think its explained in the orbiter manual, but looking at the WIN files and manual should give you everything you need to work it out.
 
XR3 is defined as base object with following definition (xr3_tophull3 is registered in base.cfg):

Code:
MESH
    FILE XR3Phoenix\xr3-fusetest_5
    POS 3432 30 1267
    SCALE 1 1 1
    ROT 45
   PRELOAD
   [COLOR="Red"]TEX XR3Phoenix\XR3_tophull3[/COLOR]
END

You can see (on the nozzles) that all materials has been replaced with single texture.

base-test.jpg


---------- Post added at 02:24 AM ---------- Previous post was at 02:22 AM ----------

Conclusion - it doesn't even has to be single meshgroup - just single texture.
 
Loru, say if I have a Base, with 2 or 3 different windows, can you have more than one texture in that list. ?
 
What do you mean by 2-3 different windows? In one building or in the base?

You can register more files in Config\base.cfg file and all will be displayed when called.
 
Sorry, in your config sample above, you had a texture ie TEX xxxxxx.
This is so it picks it up from the base.config.
If a MoonBase for example is 1 mesh but it has various textures to it, and it also has say 3 different window textures, can these 3 windows textures be added as I describe below.?

MESH
FILE KPosi/KenBase
OWNMATERIAL
POS -270 0 50
SCALE 1.25 1.25 1.25
ROT 55
SHADOW
PRELOAD
TEX xxxxx
TEX zzzzz
TEX yyyyyyy
END
 
You can use multiple textures in mesh using OWNMATERIAL but then you'd be limited only to "daytime" texture as it won't change into night texture automatically.

Also in your definition you have both OWNMATERIAL and TEX parameters - I'm not sure how orbiter would render that and you have to try it.

IMHO best course of action would be to split mesh into 3 separate meshes "depending on materials) each using single texture with night and day version.

I've splitted for example few of my CSSC meshes but for a different reasons (not day night texture but shadow issues)
 
Back
Top