Jump to content
• Advertisement

2D Mesh Merging

This topic is 3631 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

Hi, I have the following two 2-dimensional meshes Mesh_A and Mesh_B: Now I want to unify both meshes as shown in the third picture. I thought it´d be the best way to go for using a BSP-based approach. Does anyone have some thoughts / informations about that to get solved? Thanks in advance

Share this post

Share on other sites
Advertisement
You need to explain what's the data structure and purpose of these "meshes" and what you mean by "unifying" them, since the only thing we see are two pictures overlaid on top of each other.
As a bonus explanation, what entities are you considering for your BSP tree? Vertices? Segments? Polygons? Something else?

Share this post

Share on other sites
Well, the enire mesh is buid of vertices. Faces are described by reffering to these vertices. So the entire mesh is a bunch of faces.
So what you can see in Mesh_A are three rectangular faces, in Mesh_B triagular and another arbitrary convex face.
Unifying these two meshes should result in the last picture which shows several faces that result from blending Mesh_A and Mesh_B.
The bsp-tree itself should be build by using the face´s edges as splitting planes so that each semgent contains faces. I´ve already implemented that to some extent.
I just wanted to ask if someone has come across something similar and has another idea how to achive that.

Share this post

Share on other sites
You still didn't answer his question.

You just rephrased your uninformative first post, without adding information.

This is important. Clearly and concisely describe what you want the end result to be. "unifying" and "blending" aren't clear or concise, instead they are completely undescriptive of what you want to do.

It may very well be that you yourself arent sure of what you want, and are actualy fishing for some ideas on a feature that you currently have no purpose to implement.

If this feature has a purpose, then you have intent. What exactly is the intent?

Edited to add:

Describe a simpler case. Fir instance, suppose each mesh has exactly 3 vertices, thus each a triangle. Exactly what do you intend the output to be? Remember, clear and consise. How many vertices will the output have, how many faces, ...

Share this post

Share on other sites
I think i understand what you mean. The first one has 3 quads, the second has 2 triangles and 1 quad, and the "unified" mesh has 2 triangles and 4 quads.

You're absolutely right that a BSP is the way to go for this. Wikipedia actually has a great page on it. This also looks pretty good, and this one is great.

One thing to note is that it will make more sense to treat everything as triangles, so split all those quads in half.

Share this post

Share on other sites
I was just about to make some other drawings to show what I mean :-) but then Funkymunky got it. So it obviously seems I´m not on the wrong track. Thank you

Share this post

Share on other sites

• Advertisement
• Advertisement

• Popular Contributors

1. 1
2. 2
Rutin
19
3. 3
khawk
18
4. 4
5. 5
A4L
11
• Advertisement

• 9
• 12
• 16
• 26
• 10
• Forum Statistics

• Total Topics
633768
• Total Posts
3013753
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!