f.reichl Posted July 9, 2019 Share Posted July 9, 2019 Hi, I'm wondering about the meaning of the "name" tag for ObjectMeshStatic elements in the node / world XML file, and wether what I'm experiencing is intended behavior or a bug. It seems that the order of surfaces in the node file needs to match the order of surfaces in the mesh file, otherwise assignments of materials / properties is not done correctly, is this intended? If so, what is the purpose of the "name" tag? After some experiments, I find the behavior very inconsistent. I created a new world and added a mesh file with three uniquely named surfaces and assigned a unique material to each of them. For reference, I have three meshes in this order: Cylinder, Spiral, Sphere and three materials CylinderMat, SpiralMat, SphereMat. Then I messed around with the surface order / naming in an XML editor and found the following: If the order is changed (exchange Spiral and Sphere), but the names are kept: No errors / warnings in the log Material assignments are switched - the materials are assigned "by index", ignoring the names of surfaces in the node file (Sphere now has SpiralMat and vice versa) The editor shows the order of surfaces from the mesh file (Cylinder, Spiral, Sphere) If I rename Spiral to some random name: An error message appears in the logfile: unused argument "material=07035bc1e402822c86b9179b215fe83ed2e47285" in "surface" node Spiral has now the SphereMat assigned Sphere has mesh_base assigned The same happens if I exchange Spiral and Sphere and then rename Spiral to some random name This seems very weird to me - I'd either expect the names to be ignored or correctly associated with the surfaces? Link to comment
morbid Posted July 10, 2019 Share Posted July 10, 2019 Hi, XML files weren't designed to be manually edited. The XML structure in this case represents info from binary *.mesh file, almost any tag modification will break the required connections. 14 hours ago, f.reichl said: what is the purpose of the "name" tag? The only purpose is to represent this name in the Editor interface. If you need a functionality for surface renaming it can be done with a custom tool. I think all required methods are listed in the Mesh Class. We thought of a feature that will allow surfaces renaming right in the Editor, but it will break major FBX pipeline: if you'll rename a surface your data will be wiped after FBX reimport. Thanks. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Recommended Posts