POV-Ray : Newsgroups : povray.newusers : to make group in the mesh Server Time
24 Dec 2024 11:27:58 EST (-0500)
  to make group in the mesh (Message 1 to 4 of 4)  
From: here I am
Subject: to make group in the mesh
Date: 12 Feb 2008 05:25:00
Message: <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


Post a reply to this message

From: Chris B
Subject: Re: to make group in the mesh
Date: 12 Feb 2008 07:21:19
Message: <47b18f3f@news.povray.org>
"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

From: Alain
Subject: Re: to make group in the mesh
Date: 12 Feb 2008 12:44:51
Message: <47b1db13$1@news.povray.org>
Chris B nous apporta ses lumieres en ce 2008/02/12 07:21:
> "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. 
> 
> 
If you use CSG to cut a mesh, you don't need the mesh normals to be correct, or 
even the mesh to be closed.
You need a well behaved mesh if you use it to cut another object.

-- 
Alain
-------------------------------------------------
If you are good, you will be assigned all the work. If you are really good, you 
will get out of it.


Post a reply to this message

From: here I am
Subject: Re: to make group in the mesh
Date: 17 Feb 2008 06:25:00
Message: <web.47b81963a507e67ab61821680@news.povray.org>
Alain <ele### [at] netscapenet> wrote:
> Chris B nous apporta ses lumieres en ce 2008/02/12 07:21:
> > "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.
> >
> >
> If you use CSG to cut a mesh, you don't need the mesh normals to be correct, or
> even the mesh to be closed.
> You need a well behaved mesh if you use it to cut another object.
>
> --
> Alain
> -------------------------------------------------
> If you are good, you will be assigned all the work. If you are really good, you
> will get out of it.

Thanks Chris and Alain for the suggestion.

As Chris suggested I tried using Maya to Chop my scene into different region.I
succeed but it turns out that when I tried to render those scene(regions) in
pov-ray..they had different orientation and spatial coordinate.Thus that rules
out the idea of chopping in Maya.

To make this work I am using CSG, means hit and trial and am finding the
intersection of face and cylinders and by using different cylinders  I'll have
different groups. I guess this is what you guys suggested me.

Basically I have different albedo map based on the location on the face and have
to use Torrance-sparrow BRDF model and since different region have different
BRDF coefficient.I need to chop my scene in to different region.
I would appreciate if you add something to it.(Other than what I am doing to
make this grouping thing more efficient)

Thanx

Regards
Ran.


Post a reply to this message

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