0

I'm making a simple application with 3D graphics, in which I don't want to load any 3D models, but only geometric shapes are enough. How is it possible to create such geometric shapes in the Panda3D engine? I am interested not only in simple ones (pyramid, cube, parallelepiped), but also in figures with slightly more complex geometry. These are figures that have a polygonal base and "walls" perpendicular to the plane of construction. In short, these should be primitives of buildings that do not necessarily always have the shape of a rectangle at the base.

I tried to figure out how to work with NodePath, but I didn't understand almost anything.

ЧАС
  • 1
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Mar 18 '23 at 09:09

1 Answers1

0

So generally it is possible to generate geometries programmatically as you described. I was at the same point of wanting to generate some primitives with code, but it turned out to be quite complicated, because you have to define every vertex individually. This is described in detail in the panda3d-docs https://docs.panda3d.org/1.10/python/programming/internal-structures/procedural-generation/index . But from my experience, it was usually easier to import some primitive geometries and scale and position them appropriately.

ductTapeIsMagic
  • 113
  • 1
  • 8