POV-Ray : Newsgroups : povray.binaries.images : placing things on mesh object ... : placing things on mesh object ... Server Time
5 Nov 2024 08:24:38 EST (-0500)
  placing things on mesh object ...  
From: David El Tom
Date: 19 Sep 2005 19:30:54
Message: <432f4a2e@news.povray.org>
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


Post a reply to this message


Attachments:
Download 'test.png' (160 KB)

Preview of image 'test.png'
test.png


 

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