Page 1 of 1

How to Pyramid

Posted: Thu Jan 03, 2013 6:58 pm
by milen_zge
Hello and HAPPY NEW YEAR!

Several days I think about how to draw full 3D Pyramid in ZGameEditor and modifications such as truncated pyramid.

I try with RenderNet parts with recalculating vertex or to use MeshImplicit but I think that this is wrong way.

Please give me some ideas how to draw 3D pyramid.

Re: How to Pyramid

Posted: Thu Jan 03, 2013 7:41 pm
by Kjell
Hi,
milen_zge wrote:Several days I think about how to draw full 3D Pyramid in ZGameEditor and modifications such as truncated pyramid.

I try with RenderNet parts with recalculating vertex or to use MeshImplicit but I think that this is wrong way.
Neither RenderNet nor MeshImplicit are ideal for geometric shapes such as a pyramid. Attached is a example containing 3 procedural meshes.

- SloppyMesh: This is a pyramid generated from a Box of which the top points are moved together. It's the easiest method, but you end up with 4 "unused" triangles.
- PyramidMesh: This is a pyramid generated from a Plane + 4 Triangles. Since ZGE doesn't have a triangle component, it uses a imported triangle.
- FrustumMesh: This is a truncated pyramid created from a Box. Change the P variable to adjust at what height the pyramid is truncated.

Hopefully this helps :wink:

K

Re: How to Pyramid

Posted: Fri Jan 04, 2013 7:45 am
by milen_zge
Thank you, very much!

It was simple and with short code!
I will continue to try different techniques, tanks for fast help.

Regards,
M.