Every clone / instance of a model has their own copy of all components that are placed in the Definitions node. So in case you want all clones to use the exact same Mesh, don't put the Mesh in the Definitions node. But if you want each clone to have their own copy of the Mesh ( in order to procedurally generate / modify the mesh for each individual clone ), put it inside Definitions.fracteed wrote:What is the advantage of meshes under model definitions? I noticed some of the sample projects did that.
I'm afraid not ( at the moment ) .. you can only see the triangle count for individual Meshes. Thing is, triangle count isn't as big of a factor when it comes to performance these days though. But you can always use gDebugger to find out what the GPU bottlenecks of your project are.fracteed wrote:The console displays the total number of models when a project is run, but is there any way of seeing the total number of triangles? Would be very useful for optimizing.
Certainly Simply select the component(s) you want to copy and use good ol' copy-paste. Since ZGE uses the XML format for its project files, you can even paste your component onto the forum. Like this ..fracteed wrote:Is there any way of saving out components/hierarchies for use in another project...for instance reusing a sound or mesh component that I have created?
Code: Select all
ZZDC<?xml version="1.0" encoding="iso-8859-1" ?>
<Mesh Name="MyMesh">
<Producers>
<MeshBox XCount="15" YCount="15" Grid2DOnly="255"/>
<MeshExpression>
<Expression>
<![CDATA[float y = noise2(this.v.x,this.v.y);
this.v.z = 0-this.v.y;
this.v.y = y;]]>
</Expression>
</MeshExpression>
</Producers>
</Mesh>
K