Jump to content

[SOLVED] Select by logic


photo

Recommended Posts

Working on asset with about 41.000 different components, problem is converting in fbx I loose the layer information, and have thousand of assets I need to assign a material.

Want to ask if there is any way to select by rule, i.e. select all the components in a circle starting from a specific object, or (to achieve directly the result), assign a specific material based on that rule.

The single components show the same name in the world hierarchy, but does have also a specific id in the node information panel (i.e. polyfacemesh_32569.mesh)

image.thumb.png.dd4d2a61fe7ccdec5334cd374c814d9c.png

Edited by davide445
Link to comment

Hi Davide,

The first thing I thought about - a script with regular expression that will change material field in the node xml structure. You can save your hierarchy in a separate *.node and parse it with a custom script. For instance, you'll see the following in the node file:

				</node>
				<node type="NodeDummy" id="1119939139" name="TRUCK1_MIRROR_RV1_18">
					<transform>1 0 -3.66987980255e-18 0.0 0 1 0 0.0 3.2689411858e-18 -6.61744490042e-24 1 0.0 0.0493144933271 21.8812825464 -6.04687595646 1.0</transform>
					<node type="ObjectMeshStatic" id="1093206024" name="Truck1_MirrorRV_Glass_54">
						<mesh_name>guid://f42f9b27c17a5e5a080799f1b4b0ca9ca35f654b</mesh_name>
						<surface name="carglas3" physics_friction="1" physics_restitution="1" material="6147f58cd398337ba6af929ef9325965ae78bb80"/>
						<transform>1 0 -3.66987980255e-18 0.0 0 1 0 0.0 3.2689411858e-18 -6.61744490042e-24 1 0.0 1.47036189446e-07 -1.68188468409 1.86523444852 1.0</transform>
					</node>
					<node type="ObjectMeshStatic" id="1669979560" name="Truck1_MirrorRV_54">
						<mesh_name>guid://6ef5fa2e4f18fbb5c9aad990cbdb5faf56c98942</mesh_name>
						<surface name="carbp1" physics_friction="1" physics_restitution="1" material="cdabca88e8226c475041bcfaf57b2811af4fc23c"/>
						<transform>1 0 -3.66987980255e-18 0.0 0 1 0 0.0 3.2689411858e-18 -6.61744490042e-24 1 0.0 2.95057361654e-07 -3.3750609662 1.57763686628 1.0</transform>
					</node>
				</node>

You have the type and name, the only thing you need to do is replace material value in the corresponding line. Material guid can be found in the *.mat file.

The other thing that disturbs me is the number of nodes and the current frame-rate.

Thousands of nodes can drain your CPU resource and the scene will lag in the runtime.

Have you tried clusterization? You can use instancing in fbx file (3DS Max can use instances for similar meshes) and then bake them into one object. That will give you better (much better) performance.

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

I solved the problem in 3ds max, using a script to select the nodes with similar geometry, selecting by color where possible, and grouping them by similarity.

Exported as fbx I have now in Unigine the whole nodes grouped by type.

image.thumb.png.15fdc0bfe8ab1e1fc93f4aed5bf9bc1b.png

Clusterization will came as soon I verify how I can manage the different materials to be applied.

Link to comment
×
×
  • Create New...