|
|
"here_I_am" <nomail@nomail> wrote in message
news:web.47b1738e5f9a6c867b1612e30@news.povray.org...
> Hi everybody!
>
> I have this face scene,where I have to define different region based on
> the
> location on the face(Such as one region for nose other for lips..and so
> on) but
> the problem I am facing is that even though I know the coordinate for all
> the
> triangle in the scene file i don't know which one corresponds to which
> region
> and I can't do this randomly since scene file has 15000 triangles.
>
> I would appreciate if you guys could help me out here.
> Thanks
>
The best approach depends on what you need to do with the different regions.
I suspect that the most effective approach overall would be to use a
modeller (either the one you created the mesh in or another modeller that
can read the mesh) and split the object down into separate meshes for each
of the 'regions' you need to manipulate independently.
Failing that, you can use CSG with meshes (so long as the mesh normals are
all ok). You may therefore be able to use objects to carve areas out of the
face and split it up in that way. For example, you could define a simple
squashed sphere and position it (using trial and error) to engulf just the
nose. You could then use a sphere with the same values in a CSG intersection
with the mesh to isolate the nose and manipulate it independently of the
rest of the face.
If you only need to identify separate regions for texturing it is possible
to use CSG within an 'object' pigment, so you could define a texture that
corresponds to the regions that you identified by trial and error.
If you only need to find points on the surface of the face (e.g. for
positioning eyelashes, glasses, a pipe or a hat) you could use the 'trace'
function. Once again this can be done fairly quickly with a little bit of
trial and error. Use 'trace' to locate a point on the surface somewhere near
where you want to be. Add a little sphere or a thin cylinder to your test
render and refine the trace parameters to home in on the points you need -
e.g. the bridge of the nose, the corners of the lips etc.
Also, if you have development skills you could use your favourite computer
language to split the mesh up using mathematical rules that you could devise
based on the trial and error technique above.
If you can give a bit more of an indication of what you need to do it'll
probably be possible to recommend a particular approach.
Regards,
Chris B.
Post a reply to this message
|
|