|
|
No teddy bear yet... but I tried with a towel model from archive3d
(tried to model one with Megapov simcloth, but didn't get anything decent).
I figured a better method than tracing the threads: instead, I just
loop over all the triangles, then for each triangle I place 20 hairs at
randoms points on the triangle surface. I searched on the internet for
methods to do this, but as I didn't understand any of them due to my
poor knowledge of formal math notation, I ended up doing my own thing to
find random points on a triangle surface... it's ugly, slow and surely
inefficient, but works fine visually.
Then there was The Last Problem... I wanted to texture the threads so
that they follow the uv_mapped texture on the mesh, but eval_pigment
will not work on this scenario. At that moment I realized the mesh data
extraction functions on hgpovray are missing one function: something
like get_uv_coordinates().
But squeezing a bit more my poor brain I figured a workaround: copy
and paste the uv_vertex info from the mesh include file into a separate
file, formatted as an array, and then use that with eval_pigment and a
flat version of the image_map. Fortunately, the uv_vertex and
uv_vertices are correlative, so it works fine. But it would be much
better (and faster) to have an hgpovray function for it.
Regards,
--
jaime
Post a reply to this message
Attachments:
Download 'hanging-towel-04-p4m21s-r12m48s.jpg' (185 KB)
Preview of image 'hanging-towel-04-p4m21s-r12m48s.jpg'
|
|