POV-Ray : Newsgroups : povray.binaries.images : placing things on mesh object ... : Re: placing things on mesh object ... Server Time
5 Nov 2024 08:27:20 EST (-0500)
  Re: placing things on mesh object ...  
From: Jim Charter
Date: 20 Sep 2005 14:08:19
Message: <43305013$1@news.povray.org>
David El Tom wrote:
> while trying to render something hairy, i stumbeld over the problem how
> to place objects evenly distributed on a mesh object. First I thought
> about using some of the includes and/or macros out there. But the
> methods I found included always a preliminary step of converting the
> mesh data to the compressed mesh format (C. Colfax AFAIK). I didn't like
> that approach, 'cause then I will have the same mesh as original
> modeller file (eg. blender, wings3d etc.) an temporary Wavefront obj
> file, the compressed mesh file and the include file with the mesh in
> mesh2 format. Also I found that using SDL to place lots of objects takes
> too long (in my opinion).
> 
> So I wrote a small PERL script, which directly reads the include file
> with the mesh2 and creates an include with two arrays; one for the
> positions on the mesh surface and on with the corresponding normals.
> 
> This include can be used to place whatever I want ontop of the mesh
> according to the stored positions and normals.
> 
> The script needed ca. 40 sec. to create a file with over 1.7 million
> positions and normals.
> 
> I included image shows the first test render of a snuggle pet 
> (Kuscheltier???) and  1.7 million small cylinders on top of it.
> Where you can see the underlying mesh, you are looking directly on top 
> of these small cylinders.
> 
> By the way, ..., memory consumtpion was 1,4 G for this render
> 
> ... dave
> 
> 
> 
> ------------------------------------------------------------------------
> 
I would be very interested in a conceptual description of how you did 
this.  I know there were some "maya fur" macros written which do an even 
distribution but I could not understand what was happening from the 
code.  I could not use your particular script directly because I am 
doing other things to manually control the direction and fall of hair or 
fur.  But right now I am controlling the density and distribution 
manually and could use a poly-based method on occasion.


Post a reply to this message

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