Author Topic: [fixed]tree is not selectable (rev 4497)  (Read 1292 times)

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
[fixed]tree is not selectable (rev 4497)
« on: 22 June 2013, 21:36:54 »
It looks like this is another problem related to the model optimisation. There is one palm tree in desert4 now that you cannot select.

In tileset desert4 you have a tree  called palm2_1.g3d . This model conains two seperate Meshes. One Mesh is used for the little bushes around the palm and the other one is the palm itself. Meshes have options in g3d and I used them to make the bushes non selectable ( you can see this in G3dHack very good ).
But now some kind of model optimasation must do something that the palm too is no longer selectable. The flag "non selectabel" means that the Mesh is not rendered when in selection Mode. This is a feature I took over from GAE some time ago ( its already in 3.7.2 )

So meshes with different flags cannot be merged into one mesh...
« Last Edit: 23 June 2013, 23:21:54 by titi »
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: tree is not selectable (rev 4497)
« Reply #1 on: 22 June 2013, 21:54:28 »
Fixed in svn rev#: 4500

Every should beware that this means that Will's model conversion tool corrupts model files as it joins meshes without looking at this flag.

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: tree is not selectable (rev 4497)
« Reply #2 on: 23 June 2013, 00:34:55 »
We already found out that this is not all and transparency is another thing that has to be looked at ( also already fixed in svn )

BUt I think the whole mehs header has to be compared to decide if the Meshes can be merged or not. If you don't do it you you will loose information....

so looking at this header:
Code: [Select]
struct MeshHeader{
uint8 name[meshNameSize];
uint32 frameCount;
uint32 vertexCount;
uint32 indexCount;
float32 diffuseColor[3];
float32 specularColor[3];
float32 specularPower;
float32 opacity;
uint32 properties;
uint32 textures;
};

we should compare these to enshure if a merge can be done:
Code: [Select]
float32 diffuseColor[3];
float32 specularColor[3];
float32 specularPower;
float32 opacity;
uint32 properties;
uint32 textures;
( not 100% sure about the textures )
Things like  "team color" "non selectable" "double sided" are in the "properties"  ( and future properties might follow.)
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: tree is not selectable (rev 4497)
« Reply #3 on: 23 June 2013, 03:10:33 »
svn rev# 4502 checks them all now.

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
[fixed]Re: tree is not selectable (rev 4497)
« Reply #4 on: 23 June 2013, 23:21:33 »
thanks! no more problems found now.
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios