The CreatePolyhedron method yields different results on different devices

Hi everyone
I have some vertex data, and I use the CreatePolyhedron method to render them. However, there is a problem with the rendering result. At first, I thought it was caused by the vertices not being sorted clockwise or counterclockwise. But on my colleague’s computer, there is no such problem.

One thing that must be mentioned is that on my Windows device, there are problems with Chrome, Edge, and Firefox, while my colleague’s device has no problems with Edge and Safari.

my computer


colleague’s computer


I uploaded the simple code to Playground,Hope someone can answer this question.My English is not very good, so I used AI for translation. hope you can understand the translation result.

There’s a lot of flickering when moving the camera because of the large coordinates your are using, and it’s a bit hard to know if the problem comes from this or from something else. So, I have updated the PG to translate everything so that coordinates are smaller:

You can also use the floating origin trick if you really need to work with large coordinates.

I do have the same rendering than you with this PG:


Same thing with Chrome, Edge and Firefox. I would advice to remove everything from the definition of your polyhedron except for the bits that correspond to that part of the wall and see if you can find the problem that way.

I don’t really understand why your colleague has a different rendering, though…

1 Like