Sign in to follow this  
Mystery

Creating a regular mesh

Recommended Posts

Can anyone show me how to create a regular mesh to fit into a particular geometry? Currently I have the geometry of the following structure in the 3d world: As you can see above, the mesh is irregular and manipulation would be difficult. I would like to create a regular mesh to fit the above geometry so that it will be easier to manipulate.

Share this post


Link to post
Share on other sites
It looks like that your mesh is "flat" enough such that it can be represented as a height map. If this is true, the conversion should not be too difficult.

Say, the x- and y-axis in 3D space corresponds to the window x- and y-axis of your screenshot (otherwise, rotate the 3D geometry accordingly).

1) Project all nodes p_n of the irregular mesh to the x-y-plane by simply leaving out the z-coordinate ("push the book flat"). You get 2D-points q_n.

2) Find the outer perimeter of the 2D-points q_n. That's the outer boundary of the book in your screenie.

3) Find a regular mesh with nodes g_n for the 2D region that is contained in the border found in 2). To do this, just put a rectangular grid on top of the border and correct the outmost nodes to coincide with the boundary.

4) Find the z-coordinate of the regular grid from 3) by projecting the 2D grid points g_n back to the book. This requires computing intersections of lines (g_n+t*(0,0,1)) and triangles (of the irregular mesh), but should be no problem. Note: If the book is really a heightmap, you'll always get exactly one intersection.

5) Ready!

hth

Lutz

Share this post


Link to post
Share on other sites
Thanks for the reply. Is there any link which elaborate more on of your above method. I am pretty new to this so will need more details in order to implement it.

Btw, the structure is not really exactly flat. Here is a cross-sectional view of it.

Share this post


Link to post
Share on other sites
It looks like you're trying to make pages in a book. Could try for a cloth simulation; that way it would behave like actual paper.

Did you compute the triangulation on the fly? It looks great!

Cheers,
- llvllatrix

Share this post


Link to post
Share on other sites
I thought I remembered those pictures. You also started a thread three and a half months ago on a related, but not identical topic. I'll just post a link here since some of the things mentioned in the other thread may help people better understand what you're trying to do or what you've tried. Linky.

Enigma

Share this post


Link to post
Share on other sites
Wouln't it be easier to make a new mesh rather that trying to fix the old one.
if you want a procedural one you could try using a nurb mesh,it would work just fine for this.

Share this post


Link to post
Share on other sites
Quote:
Original post by llvllatrix
It looks like you're trying to make pages in a book. Could try for a cloth simulation; that way it would behave like actual paper.

Did you compute the triangulation on the fly? It looks great!

Cheers,
- llvllatrix


No, it was not made on the fly. The information was obtained from the obj file generated by the 3D scanner. :)

Share this post


Link to post
Share on other sites
Quote:
Original post by Enigma
I thought I remembered those pictures. You also started a thread three and a half months ago on a related, but not identical topic. I'll just post a link here since some of the things mentioned in the other thread may help people better understand what you're trying to do or what you've tried. Linky.

Enigma


Thanks Enigma. Yes, I posted this pics sometime back. All this while, I have been working on this irregular mesh directly. Now I am considering turning this irregular mesh to a regular one before working it in hope of getting a more stable simulation.

[Edited by - Mystery on December 2, 2004 10:08:30 PM]

Share this post


Link to post
Share on other sites
Quote:
Original post by Mystery
Thanks for the reply. Is there any link which elaborate more on of your above method. I am pretty new to this so will need more details in order to implement it.

Btw, the structure is not really exactly flat. Here is a cross-sectional view of it.

If you rotate the sheet slightly to the right, you will be able to get a heightmap. Even without rotation, it might work. It doesn't need to be exactly flat, it is just required that there are no overhangs.

I don't have implementation notes on this (since I just thought it up), but the biggest part will be to find the outer perimeter and to move the regular-grid-nodes to that perimeter. But since you it's a preprocessing step (I guess), it doesn't need to be fast. Maybe you can even do that by hand if you only need to do it once.

Lutz

Share this post


Link to post
Share on other sites
Quote:
Original post by Mystery
Thanks Enigma. Yes, I posted this pics sometime back. All this while, I have been working on this irregular mesh directly. Now I am considering turning this irregular mesh to a regular one before working it in hope of getting a more stable simulation.


IS this something you have to do? i mean, use the 3dscanned version.
If i where you i would load that mesh into maya or lightwave and then while using that as a reference model, i would create a new mesh that is more regular than the first one.

Share this post


Link to post
Share on other sites
Quote:
Original post by lc_overlord


IS this something you have to do? i mean, use the 3dscanned version.
If i where you i would load that mesh into maya or lightwave and then while using that as a reference model, i would create a new mesh that is more regular than the first one.


You mean maya allows you to easily create a regular mesh to fit the geometry of my current mesh? I am not familar with maya but if this is true, I am willing to give it a try. Please advise. Thank you.

Share this post


Link to post
Share on other sites
Actuarly you have to do it manualy, but you can use the old one as a template so you can get the exact shape.
It's not that hard, but if you want, i could do it for you.

Share this post


Link to post
Share on other sites
Quote:
Original post by lc_overlord
Actuarly you have to do it manualy, but you can use the old one as a template so you can get the exact shape.
It's not that hard, but if you want, i could do it for you.


That would be very nice. Maybe you can drop me a pm on how should I send the obj files to you. I am hoping to compare the results of a regular mesh against an irregular one using my current particle dynamic system.

Btw, what abt the texture mapping coord? Currently the obj(wavefront) file also contains info on how to texture map the image onto the irregular mesh. Will that information be available for the regular mesh?

Share this post


Link to post
Share on other sites
Quote:
Original post by lc_overlord
Perhaps, but most likely it would.


Thanks. I have emailed you. Total file size is 3mb, in zip format.

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