Reverse Model Wireframe

Post questions about game models here, or help out others!
User avatar
Bigchillghost
double-veteran
double-veteran
Posts: 797
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 27 times
Been thanked: 788 times

Re: Reverse Model Wireframe

Post by Bigchillghost » Sun Mar 01, 2020 1:04 pm

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.
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)

User avatar
Bigchillghost
double-veteran
double-veteran
Posts: 797
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 27 times
Been thanked: 788 times

Re: Reverse Model Wireframe

Post by Bigchillghost » Sun Mar 08, 2020 7:57 am

Another quick test on a mesh part:
Image
Image
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)

wansf
advanced
Posts: 63
Joined: Sun Mar 11, 2018 10:56 am
Has thanked: 4 times
Been thanked: 4 times

Re: Reverse Model Wireframe

Post by wansf » Fri Mar 13, 2020 11:36 am

mr.Bigchillghost could u please activate PM? ive something to ask

ashitaka3369
ultra-n00b
Posts: 2
Joined: Fri Jun 28, 2019 10:39 pm
Has thanked: 5 times

Re: Reverse Model Wireframe

Post by ashitaka3369 » Fri Mar 13, 2020 12:10 pm

everyone who use Quadrangulate (maya),quadrify(max) or the blender option , is actually dreaming about that tool
congratulation amazing work

User avatar
Tosyk
double-veteran
double-veteran
Posts: 953
Joined: Thu Oct 22, 2009 10:24 am
Location: Russia, Siberia
Has thanked: 227 times
Been thanked: 123 times
Contact:

Re: Reverse Model Wireframe

Post by Tosyk » Mon Jun 22, 2020 10:55 am

@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
Thank you for all you do here
my blog | my forum

behrang
ultra-n00b
Posts: 1
Joined: Fri Nov 06, 2015 10:23 am
Has thanked: 1 time

Re: Reverse Model Wireframe

Post by behrang » Fri Jan 22, 2021 8:15 am

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?

User avatar
Bigchillghost
double-veteran
double-veteran
Posts: 797
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 27 times
Been thanked: 788 times

Re: Reverse Model Wireframe

Post by Bigchillghost » Sun Jan 24, 2021 12:59 pm

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.
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)

Post Reply