www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: ehud101 on October 12, 2014, 07:08:39 pm

Title: invert culling to specific triangles
Post by: ehud101 on October 12, 2014, 07:08:39 pm
Hi, me again

so I'm making my own cylinder, and I started "tiling" with triangles the upper and lower bases.
but since all triangles are being culled the same way, you can see both bases from only one direction. is there a way to invert the culling of triangles of only one base? so one base will be seemed from one direction and the second one from another direction?
both bases belong to the same object called "cylinder" so if I do "invert culling" it effects all triangles and I need to invert the culling for only some of them.
thanks
Title: Re: invert culling to specific triangles
Post by: EgonOlsen on October 12, 2014, 08:37:42 pm
Just change the order of the vertices when creating the geometry, i.e. when order 1-2-3 is not the right culling, create the polyon 3-2-1 (or 2-1-3 or whatever).
Title: Re: invert culling to specific triangles
Post by: ehud101 on October 12, 2014, 10:11:56 pm
thanks again !