3D Polygons

1. A concise explanation of the problem you’re experiencing.

How to create polygons that float in 3d?

When I create a polygon geometry with the perPositionHeight, what is rendered on the screen is a polygon which goes down to the ground. I only want the top of the extruded polygon.

2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.

Sandbox.

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

3D modelling

4. The Cesium version you’re using, your operating system and browser.

Sandbox, Win7, latest Chrome

If you remove extrudedHeight:0, does this look like what you want it to be?

Yes, that is it. The answer was so simple, I thought I has already tried it.
Thanks

Hi Omar,

I have created a new sandcastle using primitives instead of entities. I am doing this because:

a) I will be generating models with many polygons, and

b) as far as I understand, primitives with instances will be more efficient than entities

Could you take a look at my function, is there anything else I could optimise?

Sandcastle.

Patrick

I think you’re on the right track! There are many ways to optimize an application. In terms of graphics, often times the bottleneck is the amount of calls you’re making between the CPU and GPU, so combining things (whether that’s putting all your textures into one big image, so you only send one instead of many) or putting a bunch of different geometries into one primitive are all good ideas. This page on Geometry and Appearances talks a bit about efficiently rendering a large amount of polygons under the “Combining Geometry” section:

Best of luck!