Azzera filtri
Azzera filtri

How to color specific parts of an STL object in 3D World Editor

24 visualizzazioni (ultimi 30 giorni)
I am having trouble coloring a CAD model I designed in Fusion360 in the 3D World Editor (Simulink 3D Animation).
When I import an STL file, the 3D World Editor displays a completely grey model, but the original model has multiple colors in specific parts of the model. I followed the steps outlined here:
I found a way to color the model with only one color using the diffuseColor (SFColor) field, but I cannot find a way to color specific parts of the model with different colors.
If I need to import multiply CAD models, color them separately, and assemble them to make the whole model, how can I export multiple STL files and assemble them together in the editor?
Any assistance would be greatly appreciated.
Thank you in advance.

Risposta accettata

Jan Houska
Jan Houska il 17 Mar 2023
Hi Alex,
your geometry is most probably a hierarchical tree of Transform nodes that contain Shape nodes. These contain Geometry nodes that describe the body geometry and Appearance nodes that describe the body look. To add color, you create a Material node inside the Appearance node and set its diffuseColor field to the desired color. This is described in the X3D standard. You may also want to take a look at the vrmanipul_global shipping example and examine its node hierarchy. The example contains hierarchically organized individually colored objects, maybe similar to what you are trying to achieve.

Più risposte (0)


Scopri di più su Simulation in Help Center e File Exchange




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by