Jump to content

[SOLVED] node file : surface id


photo

Recommended Posts

Hi,

 

We are generated on server side Unigine node with automatic generated mesh, unfortunately, we have some problem with settings surface name inside node file, do you know if will be possible to specify an id surface inside the node file ??

Like we have generated this : 
 

<node type="ObjectMesh" id="7046" name="Only_for_the_Brave">
  <mesh>6099_2.mesh</mesh>
  <surface name="17407_private_sku" intersection="0" collision="0" viewport_mask="2" collision_mask="2" material="17407_private_sku" property="surface_base"/>
  <transform>1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1</transform>
</node>
 
But will be better to have something like :
 
<node type="ObjectMesh" id="7046" name="Only_for_the_Brave">
  <mesh>6099_2.mesh</mesh>
  <surface id="0" intersection="0" collision="0" viewport_mask="2" collision_mask="2" material="17407_private_sku" property="surface_base"/> <-- We want this material on the surface 0 of the mesh 
  <transform>1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1</transform>
</node>

 

Thanks

 

Tony

Link to comment

Hi Anthony,

 

No ids, sorry. However, you can add custom arguments such as 'tag' or 'id' and parse it manually on client side to assign proper materials. Also, you can count that surfaces described in node file are in strict order as they are placed in the mesh.

Link to comment

Cool!

 

Also you can create something like surface map and place it near node file. This will reduce warnings in console about 'unused argument'. Please write here if you get some results. :)

Link to comment

Hi Andrey, I just try other things and it's work.

I have the id of my surface in BD, and I have access to the mesh file too, I quickly write in php a mesh header reader and how the first byte contains the num of surfaces and their name, was easy to change my id by the real name...

Tony

Link to comment
×
×
  • Create New...