Sign in to follow this  
wix

Finding out which face corresponds to which

Recommended Posts

wix    122
I am trying to figure out how to be able to sample the materials of a more high res model and apply them to the low poly version in the most accurate way. I know everything except the math part. Namely how to get what face corresponds to each face in the low res model. I cant just take face who's center is closest and i am thinking i should take the normals into consideration as well. Any suggestions would be greatly appreciated!!

Share this post


Link to post
Share on other sites
Atheist    150
Assuming no polys in the hi-res model correspond to more than one poly in the low-res one, I´d try this:


For each poly i in the low-res model:
- calcluate the plane Pi it lies in
- For each poly j in the hi-res model:
-- Project j on Pi. Also remember a distance d_ij of j from Pi (I´d try average distance of j´s points).
-- if projection lies within Pi mark it as possible possession of j.

Now, the problem is that for polys j it´s possible to meet the "possessed by" criteria of more than one poly i. That´s why a 2nd step is nessecary to determine which of the possible owners j has. This one would be as simple as:
j belongs to the poly i that it´s closest to: Owner = i: d_ij=min.


That´s just my first guess what I´d do. There may be professional algorithms that are better or it might be able to simplify above. It will probably not work if polys of the hi-res model do not project into a poly of the low-res model. I assumed you get the low-res model by removing points from the hi-res one. It should give ok results, then.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this