Loading external geometry

So far, we've been drawing quads and cubes, but if we want to draw more complex geometry, it is probably handier to model it on a 3D modeling tool rather than doing it by code. We can cover multiple chapters on this topic, but let's just look at a quick example of how can it be done and you can extend it to your needs.

We have used a Blender to model our example data. Blender is a free and open source 3D modeling toolset and can be downloaded for free at its website: https://www.blender.org/.

For this example, we haven't modeled an extremely complex example; we've just used one of the primitives that Blender provides: Suzanne:

To simplify our importing tool, we'll select the object mesh under the Scene | Suzanne ...

Get Building Android UIs with Custom Views now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.