• Advertisement
Sign in to follow this  

Drawing a distance map on a mesh

This topic is 2762 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello folks, I have the following problem to solve:

I created a fitting algorithm that basically fits a superquadric to a set of points which are the vertices of a mesh. I have a mapping that can project every point on the mesh to its closest point on the superquadric surface. This mapping also measures the distance between a mesh point and its closest sq surface point. What I now need to do is to de facto reverse the mapping, that means I have points liing on the sq surface an I need to assign a color value to them given by the closest mesh point.

Basically, I need to project the whole mesh surface onto the sq.

So far, I had the following idea:

- Create a copy of the mesh model
- Project every point of the copy mesh model to its closest surface point on the sq (this means deforming the model so it roughly looks like the sq).
- Use this deformed model as some kind of the texture.

Do you have a better idea? If no, what is the best method to achieve what I wrote above?

Thanks alot!

Ok, I'll write it again more shortly:

- I have a mesh. The mesh's vertices are colored according to their closest distances to an sq surface.
- I have an sq.
- For every vertex on the mesh, I can determine its closest vertex on the sq surface.
- What I need to do: For every sq point, determine its closest vertex on the mesh and sample its color value.
- The problem: I have no sq point -> mesh point mapping
- The idea: Somehow create a 3D texture from the mesh and let the GPU do the sampling.

[Edited by - Desperado on August 25, 2010 3:46:09 AM]

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement