Meshing Question Anim8tor and multiple materials on a mesh

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,295
Reaction score
3,265
Points
203
Location
Toulouse
Hello, :hello:

There is something with Anim8tor, or rather with the an8->msh plugin, that saddens me.

Let's say you create a simple cube on Anim8tor. You convert it to a mesh. Good. Now you want to paint each face in a different color. So you select each face and apply a different material. Easy.

Now you are happy with your "color dice" and want to see it roll in Orbiter. You export it to .msh using the plugin. Elementary. You open the Carina .cfg file and replace the default mesh by yours. Not hard. Then you fire Orbiter and load the "dice" in...

... and it is all white !! So disappointing. :cry::cry::cry:

So I was wondering if someone found a solution to that problem ? Is there any other way around ? Urwumpe, do you think you could fix this in the plugin ?

Thanks for your suggestions :cheers:

Edit : in fact, the materials appear in MeshWizard once the file has been converted to .msh. So I really don't get what's wrong. Is there a way to edit the .msh file manually to fix this ?
 
Last edited:

wehaveaproblem

One step closer
Addon Developer
Donator
Joined
May 18, 2008
Messages
913
Reaction score
0
Points
16
Location
London
Website
wehaveaproblem.wordpress.com
If I understand you correctly, it's a problem the AC3D->.msh plugin also has. All it means is you need a separate object within the mesh for each separate material. I assume the same limitation is in place for the animator script. So you can have multiple materials in a single mesh, but requires multiple mesh objects. I'm not sure if this is a .msh limitation or a script limitation though.
 

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,295
Reaction score
3,265
Points
203
Location
Toulouse
So you can have multiple materials in a single mesh, but requires multiple mesh objects. I'm not sure if this is a .msh limitation or a script limitation though.

What do you mean by "multiple mesh objects ?". A mesh is a mesh... :hmm:

Notice I managed to get the materials in by :

1) Saving the an8 file to 3ds in Anim8tor.
2) Converting the 3ds file with 3ds2msh (Vinka, 2005)

BUT the mesh got some nasty deformations in the process, so it isn't a viable method. But it proves it is possible to keep the materials, in my case 8 materials for a single mesh.
 
Last edited:

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,891
Reaction score
2,141
Points
203
Location
between the planets
It's an orbiter limitation. Orbiter supports only one material per meshgroup, period. If you want your mesh to have several materials, you have to split it into several groups.

So no a mesh isn't just a mesh.

presumably, 3ds2mesh recognizes the multiple materials and tries to split the mesh into according groups, which would be where the deformations come from.
 

wehaveaproblem

One step closer
Addon Developer
Donator
Joined
May 18, 2008
Messages
913
Reaction score
0
Points
16
Location
London
Website
wehaveaproblem.wordpress.com
What do you mean by "multiple mesh objects ?". A mesh is a mesh... :hmm:
Not quite. A single mesh can be comprised of multiple objects. I don't use animator, so they may have a different name... maybe groups?

So, for example. My hangars at WIN are a single mesh. But have one object for the interior, and one for the exterior. That way I can have the exterior dark at night, but the interior lit up, due to the material's settings.

You can see it in this pick:
au29.jpg


Thanks for that hard confirm Jed.
 
Last edited:

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,295
Reaction score
3,265
Points
203
Location
Toulouse
Not sure that Anim8tor handles meshgroups at all then... There is a "group" function but it can group any kind of objects together, even non-meshes.

My problem involves resizing a lot of meshes that together represent a complex object (that object has no logical reality in anim8tor, only an "artistic" reality). The only way to resize more than one mesh and keeping the relative coordinates of everything is to merge all the meshes in one. Hence the materials problem.
 
Last edited:

liber

Member
Joined
Aug 15, 2008
Messages
950
Reaction score
2
Points
18
Location
Room
Website
www.bw.org
Not sure that Anim8tor handles meshgroups at all then... There is a "group" function but it can group any kind of objects together, even non-meshes.

My problem involves resizing a lot of meshes that together represent a complex object (that object has no logical reality in anim8tor, only an "artistic" reality). The only way to resize more than one mesh and keeping the relative coordinates of everything is to merge all the meshes in one. Hence the materials problem.

Nope,Anim8or work fine,you need to use some tricks with Anim8or for editing model.
Mainly select all than go on build and ungroup,woun't heart if you repeat couple of time than group all,not a merge,group.
Than you can resize all it's still in segment but like one body.
But each material need to have it's own group or segment to be able to export to orbiter mesh.

P.S.
After ungroup you can convert to mesh it's in same toolbar than group all.
 
Last edited:

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,295
Reaction score
3,265
Points
203
Location
Toulouse
Mh so correct if I'm wrong (because I didn't managed to get your trick working) :

1) I load my an8 file into anim8tor
2) "Select All"
3) "Ungroup"
4) "Group"
5) "Scale" ?

Because I still have the relative position of objects quite messed up, and that would be an insane pain to realign all manually (if it is even possible).

Well, here is my file anyway (.an8). Would you mind having a try at rescaling it (75%) ?
 

Attachments

  • RL10.zip
    144.6 KB · Views: 9
Last edited:

liber

Member
Joined
Aug 15, 2008
Messages
950
Reaction score
2
Points
18
Location
Room
Website
www.bw.org
Mh so correct if I'm wrong (because I didn't managed to get your trick working) :

1) I load my an8 file into anim8tor
2) "Select All"
3) "Ungroup"
4) "Group"
5) "Scale" ?

Because I still have the relative position of objects quite messed up, and that would be an insane pain to realign all manually (if it is even possible).

Well, here is my file anyway (.an8). Would you mind having a try at rescaling it (75%) ?

You did all fine,same problem here,usual I have couple of this issue but mainly solved easy.
Now you can this work export to 3DS and than import to Anim8or than you be able to scale it without problem.
 

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,295
Reaction score
3,265
Points
203
Location
Toulouse
OK for those that might have the same problem I've found a solution, thanks to basic maths.

The model are engines for a Centaur stage. Problem : we can't resize those engines. Then the Centaur stage is to small relative to the engines. The answer ?

Inverse the operation. Make the stage bigger, then add the engines model.

1) In anim&tor, I scaled the original model by x 1.25 (could have been anything else, as long as it fits).
2) Import the engines model. Now it is proportional to the Centaur stage.
3) Remember I can't scale the engines... in Anim8tor. So I exported the "1.25x Centaur" into the .msh format.
4) I loaded the model into MeshWizard.
5) I made a 0.8x proportionnal rescale of the whole model. 1.25 * 0.8 = 1. Bingo !
6) I saved the file to the an8 format (MeshWizard allows you to do that, which is very cool).
7) I was able to continue the work on the model, and once loaded in Orbiter, all the materials were there where they had to be !! :cool:

Only drawback : the "splines" were converted to meshes into the process. That's survivable.
 
Top