Hi team,
I am currently trying to find an elegant way in order to import geometry.
P5 currently supports .obj ( loadModel) . The question is as follows:
Can the loaded geometry be divided in individual parts? If the model consists out of multiple cubes (lets say 20 or 50 cubes/boxes) i would like to have control over them to color them differently and place them in an array in order to do some sorting operations.
Currently, I could not find documentation this is feasible (out of the box), hope there is a way to do so or get confirmation that such is not possible as that functionality does not exist.
If that is the case would the only solution be:
treat the .obj file as a text file and read the code applying instructions to separate the cubes (or shapes) in the .obj file ( and then draw the shapes with beginShape()…vertex()…endShape() loops) ?
or is there a way more practical solution or library that tackles this issue in a fluent way.
Quite keen if I can be directed to a good direction. Would be of great help
ps: if dxf or .stl would allow such operations (out of the box) that would be a way too as not fixed to .obj