Page 3 of 3

Re: Reverse Model Wireframe

Posted: Sun Mar 01, 2020 1:04 pm
by Bigchillghost
It has been a while since the last time I posted something related to this topic. But before I post anything new, I'd like to make a simple summary of the old stuff about this topic.

As you may know, currently there're two tools I made are available in this forum that come with a quadrify feature. You can find them in the following posts in case you're interested in an attempt:

GSTDQuadifyer

A9Tool

Both of the quadrify method in these tools are based on a simple fact: the meshes they're dealing with have amost ideal face buffers, where almost every two triangles that should form a quadrilateral are placed in the buffer continuously. So there's even no need for a second thought about how to perform the quadrify process.

For those game models where mostly every two of these triangles are separated in discrete positions in the buffer, I came up with this 'unreliable' idea which was described in this post.

This method requires you to first manually find some quads with your judgement on its topology and figure out the 'filter rules' they followed. Then try to quadrify them with these found rlues through programing. It sounds logically unreliable but it does work for some cases as shown here and there. Maybe there do exist some kind of regular patterns if the original quads are simply split into triangles based on the orientation of the faces' vertex indices. But I can't imagine a way to mathematically prove it. :P

So, I've been working on a more universal method that's built upon some actually practical rules ever since: uniform and good topology. It's a dynamic and flexible system that allows you to specify how you want these rules to be applied. By changing the available parameters it can produce different results, and so as the side effects.

I'm not going to explain it in depth but merely to give an overall idea here.
The main idea of this method is to quadrify starting from those triangles which are known in certain ways to form quads with their neighboring triangles. I defined 3 types of such triangles and for properly referring I'll name them as pointcut type 1, 2 and 3. All these pointcuts are chosen from the border of the mesh, as it's easier to distinguish. The quadrify process is then performed outwards the two sides of these pointcuts along the border. When the first round is done, the new border is created by ignoring the triangles that have been processed. And so on all triangles should be handled since this process is theoretically convergent. Of course the settings of the parameters could result in termination before all triangles are processed, as that's what it is capable of at its best.

To demonstrate this algorithm here's a test I've done on a head mesh from RE7. For easier observation I replaced its UVs with the positions.

First image will be the original mesh:
Image

zoom in:
Image

Here's the result of quadrifying with pointcut type 1 only:
Image

The white areas are the pointcuts, which were handled firstly. The green and red areas are staggered after them. The black areas are what havn't been covered yet.

zoom in:
Image

Here's the result of quadrifying with pointcut type 2 only:
Image

zoom in:
Image

And here's the result of quadrifying with pointcut type 1 mixed with type 2 at the same time for each round:
Image

zoom in:
Image

Here's the result of quadrifying with pointcut type 1 first, and with type 2 when no pointcuts of type 1 can be found in current state, and with type 1 again when no pointcuts of type 2 can be found an so on:
Image

zoom in:
Image

Here's the result of quadrifying with previous method but with also pointcut type 3 in the switching list:
Image

The blue areas are pointcuts of type 2, and the yellow areas are pointcuts of type 3.

zoom in:
Image

Here's the result of the quadrify option of 3DS Max:
Image

zoom in:
Image

To further compare the previous result with it, here's the comparison under the wireframe view (2nd image for 3DS Max):

- overall:
Image
Image

- zoom in:
Image
Image

As you can see, this new algorithm has better performance than the Quadrify option in 3DS Max in terms of these areas it has covered. Currently its parameters control how you find these pointcuts, when you use them, how you switch between different types of pointcuts, and how you determine a quad to be a 'correct' one. By changing these values, this algorithm can accordingly change its behavior, so as to produce different results. Of course there're still some issues which might be possible to be fixed later.

For instance, there're some dis-located quads that result in those red triangles which were supposed to be treated as two quads.
Image

One possible way to fix this issue is by providing a mechanism to check all the remaining triangles after the process is finished and determine if they're supposed to be handled as quads instead of triangles, and do some patching procedure like this:
Image
Image

That's still just an idea and a TODO thing in the future though.

Re: Reverse Model Wireframe

Posted: Sun Mar 08, 2020 7:57 am
by Bigchillghost
Another quick test on a mesh part:
Image
Image

Re: Reverse Model Wireframe

Posted: Fri Mar 13, 2020 11:36 am
by wansf
mr.Bigchillghost could u please activate PM? ive something to ask

Re: Reverse Model Wireframe

Posted: Fri Mar 13, 2020 12:10 pm
by ashitaka3369
everyone who use Quadrangulate (maya),quadrify(max) or the blender option , is actually dreaming about that tool
congratulation amazing work

Re: Reverse Model Wireframe

Posted: Mon Jun 22, 2020 10:55 am
by Tosyk
@Bigchillghost thanks for the researches!
can you update GSTDQuadifyer to work with FBX or even make a noesis plugin?
I often use noesis console commands to easily convert models

Re: Reverse Model Wireframe

Posted: Fri Jan 22, 2021 8:15 am
by behrang
Bigchillghost wrote: Sun Mar 08, 2020 7:57 am Another quick test on a mesh part:
Image
Image
how could we have this tool in 3ds max or as a standalone exe?

Re: Reverse Model Wireframe

Posted: Sun Jan 24, 2021 12:59 pm
by Bigchillghost
behrang wrote: Fri Jan 22, 2021 8:15 am how could we have this tool in 3ds max or as a standalone exe?
It's not yet a tool. Everything is still experimental. And the research had been paused for a long time ever since that post was made. Though I shall return to it in the near future. Just a matter of time.

Re: Reverse Model Wireframe

Posted: Sun Jan 23, 2022 7:15 am
by mono24
Was wondering if you still consider this technique new algo you developed for quads from tris as a modifier perhaps for 3dsMax, where we could try it on any given imported triangulated geometry, would really be useful.

Re: Reverse Model Wireframe

Posted: Sun Jan 23, 2022 5:05 pm
by Bigchillghost
Well, what a surprise anniversary reminder. Happy New Year mono24! :D

But the project has been on hold ever since, well, a year ago, and it's too soon to ask for any tool given that I have no idea where the research might lead. Yeah a Max utility would be great but it means that I'll have to learn Max Script/Max Python and the way to implement it so no, there's no such plans.

Re: Reverse Model Wireframe

Posted: Sun Jan 23, 2022 6:04 pm
by mono24
Bigchillghost wrote: Sun Jan 23, 2022 5:05 pm Well, what a surprise anniversary reminder. Happy New Year mono24! :D ...
Yes indeed, I decided to do it as such, I said, well why not, so here we are :)

And I am sad to hear it will not come to fruition, thank you for responding, I can now at least move on and try to find other alternatives, if any.

Re: Reverse Model Wireframe

Posted: Mon Jan 23, 2023 10:02 pm
by mono24
Bigchillghost wrote: Sun Jan 23, 2022 5:05 pm Well, what a surprise anniversary reminder. Happy New Year mono24! :D

But the project has been on hold ever since...
Another full year has passed, Happy New Year! Bigchillghost, hope your well.

Still hoping the project hasn't fully died out, fingers crossed.

Re: Reverse Model Wireframe

Posted: Wed Jan 25, 2023 9:30 am
by Bigchillghost
mono24 wrote: Mon Jan 23, 2023 10:02 pm Still hoping the project hasn't fully died out, fingers crossed.
It's not dead. I shall continue the research in the first half of the year, just not a top priority at the moment.