Hi,
I would like to draw shaded boxes, like 'Scene.Drawable.Geometry.New Box'. But I want to draw some 100.000 boxes or more. If I use this function, I have to join the boxes using the Object.Add Object' invoke node. Repeating this for 100.000 times takes a long time, costs a lot of memory, and results in a slow display.
As an alternative, I created a box primitive, built from 6 quads. I can create an array holding the vertices of 100.000 cubes, and display them like a mesh. The creation is fast, and also is the display. But: the shading of the boxes differs from the shading that results from the first method. See example code.
I tried a whole lot of different lighting and shading settings, but I cannot get it right. Is it possible to draw a box using a mesh that looks exactly the same as the box using the new.box method?
In the example code, I would like to have the red box to have the same sort of shading as the green box.
Any help is appreciated.