|
![](/i/fill.gif) |
Warp wrote:
>
> Dan Johnson <zap### [at] hotmail com> wrote:
> > Anyone know if this approach
> > is actually faster than plane intersections?
>
> There was once a long thread in some group about the most efficient way
> of making a box with all six sides textured differently.
> Several approaches were made and their rendering times measured. For
> example it was done with the intersection of six planes, the union of
> six 2-dimensional boxes, six polygons and a mesh. (Also using a single
> box with a clever pattern was suggested, but that's irrelevant in this case).
> Perhaps a bit surprisingly, with such a low triangle count the mesh was
> not the fastest option. I don't remember which one was, but it might have
> been the union of polygons. (The problem with it is that it's not usable
> in CSG.)
Interesting..
> In your case the intersection of planes might be just ok. You simply have
> to manually bound the tetrahedron eg. with a sphere.
If my thinking is correct that can be done such that each vertex is
exactly on the surface of the sphere.
> You might also try using a mesh (with inside_vector you can make it
> CSG'able). If you don't need to use the tetrahedron in CSG, you might want
> to try a union of four triangles, or even polygons, though I doubt it will
> be faster than the union of triangles.
> I think that with such a low triangle count, the union of triangles may
> be faster than a mesh.
Of course a union of triangles is so much easier that what I did. I
used more than one in the process of debugging my code. CSG is
important for pretty much everything I ever do.
> --
> #macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
> N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
> N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}// - Warp -
--
Dan Johnson
http://www.livejournal.com/userinfo.bml?user=teknotus
http://www.geocities.com/zapob
Post a reply to this message
|
![](/i/fill.gif) |