Hi Nicola, Sorry for not answering before. I have to improve my mail filters.
As for the shadows, currently only the spotlights can cast shadows. I have yet to implement shadow mapping for directional lights. As for point light, I won't be implementing them in the near future, because they are very expensive. Currently you can simulate a point light casting shadows by using 6 spotlights with different orientations but in the same point. Also, you have to use deferred shading if you need shadows (WDFPSSimpleExample8 >> #initializeSceneRenderer) As for the polygons, Woden cannot render arbitrary polygons. Only points, lines, triangles and quads because that is what the graphics cards support. For an arbitrary polygon, you have to perform some kind of triangulation. If the polygon is convex, this is trivial, but if the polygon is concave this is hard (the algorithm missing is a Restricted Delaunay Triangulation). For drawing a convex polygon, you have to do something like this: positions := "Some Collection" .. builder newTrianglesScope. "Add the positions". positions do: [:i | builder addP: .... ]. "Add the indices" 3 to: positions size do: [:i | builder addI1: 1 i2: i - 1 i3: i ]. What this code does is to generate a triangle fan ( http://en.wikipedia.org/wiki/Triangle_fan ) which is a simple way to triangulate a convex polygon. I think that I should add a method to the geometry builder. Greetings, Ronie 2014-10-28 11:33 GMT-03:00 Nicolas Lusa <nicolas.l...@usi.ch>: > Hi everyone, > > I am working on some 3d representation and I am trying to draw 3D polygons > with woden. I actually manage to make "the walls" but I still have to > implement top and bottom parts which are not so simple since the shape can > be really different from case to case. > How I am actually doing it is with: WDGeometryBuilder adding vertices with > addP: N: C: TC: messages and with addQuadI1: i2: i3: i4: > Furthermore I have some issues with the shadows which actually don't > appear. > > You can see a current polygon created with the code that I made in the > attached image. (also notice the shadows are missing as well as the bottom > and top part of the polygon). > [cid:E6905B6F-F5CA-447D-A42D-BA1604AC7F5A@mobile.usilu.net] > Now my question is: is there already something that makes those polygons > or does anyone have any hint on how to make the top part with woden? > > Thannks in advance. > > Cheers, > Nicolas >