POV-Ray : Newsgroups : povray.binaries.utilities : POV-Tree: some (advanced?) recommendations : POV-Tree: some (advanced?) recommendations Server Time
17 Apr 2024 22:05:13 EDT (-0400)
  POV-Tree: some (advanced?) recommendations  
From: Thomas de Groot
Date: 17 May 2013 04:37:18
Message: <5195ec3e$1@news.povray.org>
POV-Tree is an easy to use although not perfect utility by Gena Obukov, 
to make different kinds of trees. It exports them as mesh{} objects 
(/not/ mesh2{}!) to be used in POV-Ray scenes.

One of the problems is that the meaf meshes do not have consistently 
oriented normals. The obvious solution is to make one's own leaf mesh 
and use that as a Custom Mesh in the Leaf section of POV-Tree. The 
following code is such a simple mesh I want to share with you.

//start code
triangle {<-0.380625,0,0.1>,<-0.480625,0,0.2>,<-0.480625,0,0.1>}
triangle {<-0.380625,0,-0.1>,<-0.480625,0,0>,<-0.480625,0,-0.1>}
triangle {<-0.380625,0,0>,<-0.480625,0,0.1>,<-0.480625,0,0>}
triangle {<-0.380625,0,-0.220856>,<-0.480625,0,-0.1>,<-0.480625,0,-0.2>}
triangle {<-0.080625,0,0>,<-0.080625,0,0.121029>,<-0.280625,0,0.1>}
triangle {<-0.280625,0,0>,<-0.380625,0,0.1>,<-0.380625,0,0>}
triangle {<-0.280625,0,-0.2>,<-0.380625,0,-0.1>,<-0.380625,0,-0.220856>}
triangle {<-0.280625,0,0.1>,<-0.380625,0,0.220856>,<-0.380625,0,0.1>}
triangle {<-0.280625,0,-0.1>,<-0.280625,0,0>,<-0.380625,0,0>}
triangle {<-0.280625,0,-0.2>,<-0.280625,0,-0.1>,<-0.380625,0,-0.1>}
triangle {<-0.280625,0,0.1>,<-0.280625,0,0.2>,<-0.380625,0,0.220856>}
triangle {<-0.280625,0,0>,<-0.280625,0,0.1>,<-0.380625,0,0.1>}
triangle {<-0.380625,0,0.1>,<-0.480625,0,0.1>,<-0.380625,0,0>}
triangle {<-0.380625,0,0>,<-0.480625,0,0>,<-0.380625,0,-0.1>}
triangle {<-0.380625,0,-0.1>,<-0.480625,0,-0.1>,<-0.380625,0,-0.220856>}
triangle {<-0.380625,0,0.220856>,<-0.480625,0,0.2>,<-0.380625,0,0.1>}
triangle {<-0.480625,0,-0.2>,<-0.480625,0,-0.1>,<-0.680625,0,-0.12253>}
triangle {<-0.680625,0,-0.12253>,<-0.680625,0,0>,<-0.880625,0,0>}
triangle {<0,0,0>,<-0.080625,0,0>,<-0.080625,0,-0.121029>}
triangle {<-0.080625,0,-0.121029>,<-0.280625,0,-0.1>,<-0.280625,0,-0.2>}
triangle {<-0.080625,0,-0.121029>,<-0.280625,0,0>,<-0.280625,0,-0.1>}
triangle {<-0.480625,0,-0.1>,<-0.680625,0,0>,<-0.680625,0,-0.12253>}
triangle {<-0.080625,0,0.121029>,<-0.280625,0,0.2>,<-0.280625,0,0.1>}
triangle {<-0.480625,0,0.1>,<-0.480625,0,0.2>,<-0.680625,0,0.12253>}
triangle {<-0.480625,0,0>,<-0.480625,0,0.1>,<-0.680625,0,0.12253>}
triangle {<-0.280625,0,-0.1>,<-0.380625,0,0>,<-0.380625,0,-0.1>}
triangle {<-0.080625,0,-0.121029>,<-0.080625,0,0>,<-0.280625,0,0>}
triangle {<-0.480625,0,-0.1>,<-0.480625,0,0>,<-0.680625,0,0>}
triangle {<-0.080625,0,0>,<-0.280625,0,0.1>,<-0.280625,0,0>}
triangle {<-0.480625,0,0>,<-0.680625,0,0.12253>,<-0.680625,0,0>}
triangle {<0,0,0>,<-0.080625,0,0.121029>,<-0.080625,0,0>}
triangle {<-0.680625,0,0>,<-0.680625,0,0.12253>,<-0.880625,0,0>}
//end code

Copy these triangles into the Custom Mesh window and you are in business.

Now, an interesting use of this well-normalized leaf mesh is to provide 
the leaf with an interior_texture{} as leaves often have a lighter 
underside.

Beware, for the following issue. It appears that the trunk and branches 
mesh is inside out! In some situations, you may need to add the inverse 
parameter to object {WOOD} in the tree file.

Hope you enjoy this.

Thomas


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.