XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Tue Oct 23, 2018 8:45 am

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 27 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Reverse Model Wireframe
PostPosted: Sat Apr 28, 2018 12:07 pm 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Tue Jul 05, 2016 9:37 am
Posts: 369
Has thanked: 16 times
Have thanks: 206 times














You can make the ads go away by registering

A local compare on the face:
Image

_________________
"No investigation means no right to speak."
- An Imitable Workflow for Reverse Engineering a Game Model
- Reverse Model Wireframe


Say it with action: click the Image when you get helped.


Last edited by Bigchillghost on Fri Oct 05, 2018 7:04 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Reverse Model Wireframe
PostPosted: Sun Apr 29, 2018 1:34 am 
Offline
mega-veteran
mega-veteran

Joined: Sat Nov 06, 2010 12:27 am
Posts: 229
Has thanked: 83 times
Have thanks: 20 times
Bigchillghost wrote:
Same usage as the one I posted in that thread at the same page

Thank you for your example tool for that game only, but, it seems they both have same result:
No matter how I run: GSTDQuadifyer.exe it has same result as: GSTDConv.exe
And that is just extraction of rendermesh_0 / rendermesh_1. Nothing else.


Top
 Profile  
 
 Post subject: Re: Reverse Model Wireframe
PostPosted: Sun Apr 29, 2018 2:00 am 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Tue Jul 05, 2016 9:37 am
Posts: 369
Has thanked: 16 times
Have thanks: 206 times
mono24 wrote:
Thank you for your example tool for that game only

Yeah, I also want to present more.
mono24 wrote:
No matter how I run: GSTDQuadifyer.exe it has same result as: GSTDConv.exe
And that is just extraction of rendermesh_0 / rendermesh_1. Nothing else.

What do you mean by "same result"? Did you get the obj files?

_________________
"No investigation means no right to speak."
- An Imitable Workflow for Reverse Engineering a Game Model
- Reverse Model Wireframe


Say it with action: click the Image when you get helped.


Last edited by Bigchillghost on Thu Sep 20, 2018 6:06 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Reverse Model Wireframe
PostPosted: Sun Apr 29, 2018 5:22 am 
Offline
mega-veteran
mega-veteran

Joined: Sat Nov 06, 2010 12:27 am
Posts: 229
Has thanked: 83 times
Have thanks: 20 times
Bigchillghost wrote:
Did you get the obj files?

That's what they both seem to do identically, that's what I meant, it only export obj files, nothing is quadifyed by the tool, unless I am missing something? Everything is presented in triangles.


Top
 Profile  
 
 Post subject: Re: Reverse Model Wireframe
PostPosted: Sun Apr 29, 2018 6:05 am 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Tue Jul 05, 2016 9:37 am
Posts: 369
Has thanked: 16 times
Have thanks: 206 times
mono24 wrote:
it only export obj files

Good. Then the tool worked without issues.
mono24 wrote:
unless I am missing something? Everything is presented in triangles.

Have you imported the files into 3Ds Max? Or you're using other 3D softwares that doesn't support quads(like Noesis and the 3D Builder for Win10)?

The quadified meshes will be stored in the same obj file as the triangulate ones, but with the "_quadify" suffix. You'll need to filter and separate them from the original game meshes mamually in Max.

_________________
"No investigation means no right to speak."
- An Imitable Workflow for Reverse Engineering a Game Model
- Reverse Model Wireframe


Say it with action: click the Image when you get helped.


Top
 Profile  
 
 Post subject: Re: Reverse Model Wireframe
PostPosted: Mon Apr 30, 2018 2:56 am 
Offline
mega-veteran
mega-veteran

Joined: Sat Nov 06, 2010 12:27 am
Posts: 229
Has thanked: 83 times
Have thanks: 20 times
Ah, got it now.
Amazing results, I hope you will consider in maybe making a universal 3dsMax Quadify selectable option same way as the built in one.
I've always wanted an accurate option as yours, if I can support this project let me know, I am very serious about it, I hope more can get on board, the results are stunning, period.

Thank you for allowing me to test, much appreciate it.


Top
 Profile  
 
 Post subject: Re: Reverse Model Wireframe
PostPosted: Tue May 01, 2018 4:54 am 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Tue Jul 05, 2016 9:37 am
Posts: 369
Has thanked: 16 times
Have thanks: 206 times
mono24 wrote:
I hope you will consider in maybe making a universal 3dsMax Quadify selectable option same way as the built in one.

I don't think it will be a practical idea, at least not in a short term, so don't count on me. Yeah the results might look great but don't be deceived. This algorithm relies heavily on an ideal face indices buffer, and the filter rules of determining whether two adjacent triangles should be restructured as a quadrilateral might vary from game to game, or model to model. So usually you need to figure out the proper filter rules for desired medels, and that's why I insist on using it within the extraction process.
mono24 wrote:
if I can support this project let me know, I am very serious about it

The discussion on related algorthms are open so be my guest if you're going to develop your own tool.

_________________
"No investigation means no right to speak."
- An Imitable Workflow for Reverse Engineering a Game Model
- Reverse Model Wireframe


Say it with action: click the Image when you get helped.


Top
 Profile  
 
 Post subject: Re: Reverse Model Wireframe
PostPosted: Tue May 01, 2018 3:11 pm 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Tue Jul 05, 2016 9:37 am
Posts: 369
Has thanked: 16 times
Have thanks: 206 times
A test on a high poly model I downloaded on the web some years ago, don't remember where exactly though:
Image

With 3 filter rules enabled I managed to get a 100% accurate result:
ImageImage

_________________
"No investigation means no right to speak."
- An Imitable Workflow for Reverse Engineering a Game Model
- Reverse Model Wireframe


Say it with action: click the Image when you get helped.


Top
 Profile  
 
 Post subject: Re: Reverse Model Wireframe
PostPosted: Sun May 13, 2018 11:58 am 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Tue Jul 05, 2016 9:37 am
Posts: 369
Has thanked: 16 times
Have thanks: 206 times
Alright, time for introducing some main ideas of the algorithm.

To quadify a model, there could be a lot of potential methods, but a natural and simple one would be focusing on the face buffer.
Hence it comes the problem: how to determine which two triangles should form a new quadrangle? For convenience of explanation, let's discuss the problem with the aid of a simple image.

As you can see, in the following image, the triangle ABC (denoted by ΔABC, the same below) is surrounded by another 3 triangles: ΔADB, ΔBFC and ΔACE. The cyclic arrows represent the orientation of each triangle.

Let's assume that ΔABC and ΔACE should form a quadrangle, and they share the same edge AC. So for a given triangle ΔABC, whose face indices would be "a b c",
its adjacent triangle ΔACE's face indices could be "a c e", "c e a", or "e a c".
Therefore we have 3 combinations of the actual face indices for these two triangles:
Code:
|a b c|      or      |a b c|      or      |a b c|
|a c e|              |c e a|              |e a c|

Say ΔACE's face indices are "a c e" for example, then all you need to do is locate to these two triangles, the combination of who's face indices meets with the form of |a b c|a c e|, and create a new quadrangle by removing the shared edge AC. Taking into account the orientations of both triangles, the indices of the quadrangle would be "a b c e". Actually the indices are the same if ΔACE's face indices are "c e a" or "e a c". These combinations are used only to filter the two trangles ΔABC and ΔACE from the face buffer, and they won't influence the orientation of the quadrangle unless they're not of the same vertex.

But what if ΔABC should form a quadrangle with ΔADB, or ΔBFC? So in total we get 9 combinations, which I call the filter rules:
Code:
|   abc      |   abc      |   abc      |   abc      |   abc      |   abc      |   
|   adb      |   cbd      |   bdc      |   dcb      |   bad      |   cda      |   
-------------------------------------------------------------------------------
|   abc      |   abc      |   abc      |
|   acd      |   dba      |   dac      |

This is based on the conditions that you don't need to modify the face buffer, otherwise some of them can actually be regarded as the same rule, like |abc|adb| and |abc|acd| coz they're symmetric in the horizontal direction.

Luckily the game engines usually use only a few rules listed above to break a quadrangle into two triangles, which usually are stored adjacently.
For example, say there're two quadrangles:
Code:
f 1 2 3 4
f 2 5 6 3

its triangle face indices could be
Code:
f 1 2 3
f 3 4 1
f 2 5 6
f 6 3 2

That's what 3Ds Max usually do when you export to obj as triangles. Recreate the original quadrangles simply by dividing them into groups per two triangles in the order of how they're stored.
If the original model contains also triangles, so long as they're not inserted between the two triangles generated from a quadrangle, usually you can ignore the side effects.
Code:
f 1 2 3
f 3 4 1      -->      f 1 2 3 4
f 1 4 5      -->      f 1 4 5
f 7 5 6
f 6 8 7      -->      f 7 5 6 8


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.


_________________
"No investigation means no right to speak."
- An Imitable Workflow for Reverse Engineering a Game Model
- Reverse Model Wireframe


Say it with action: click the Image when you get helped.


Last edited by Bigchillghost on Mon Sep 24, 2018 2:28 pm, edited 3 times in total.

Top
 Profile  
 
 Post subject: Re: Reverse Model Wireframe
PostPosted: Sun May 13, 2018 12:52 pm 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Tue Jul 05, 2016 9:37 am
Posts: 369
Has thanked: 16 times
Have thanks: 206 times
Things get more complicated when two triangles adjacent in 3D space are not stored adjacently in the face buffer.
But it isn't the dead end as long as the quadrangles are broken into triangles in strict accordance with filter rules. The less rules it uses, the more accurate the results would be, of course.
A good example would be The Witcher 3: Wild Hunt, which uses only 1 filter rule although most of the triangles were not adjacent in the buffer.

ImageImageImage

However it is not so lucky for Rise of the Tomb Raider, which uses 2 filter rules(for the most common cases). I tried 4 variant methods but still havn't got a satisfied result yet.
ImageImageImage

ImageImageImage

Quick compare:
Image

_________________
"No investigation means no right to speak."
- An Imitable Workflow for Reverse Engineering a Game Model
- Reverse Model Wireframe


Say it with action: click the Image when you get helped.


Top
 Profile  
 
 Post subject: Re: Reverse Model Wireframe
PostPosted: Thu May 17, 2018 4:46 pm 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Tue Jul 05, 2016 9:37 am
Posts: 369
Has thanked: 16 times
Have thanks: 206 times
Seems I found the ultimate solution :wink: :
Image

Also a screenshot for details of some inner parts:
Image

_________________
"No investigation means no right to speak."
- An Imitable Workflow for Reverse Engineering a Game Model
- Reverse Model Wireframe


Say it with action: click the Image when you get helped.


Top
 Profile  
 
 Post subject: Re: Reverse Model Wireframe
PostPosted: Fri May 18, 2018 1:19 am 
Offline
mega-veteran
mega-veteran

Joined: Sat Nov 06, 2010 12:27 am
Posts: 229
Has thanked: 83 times
Have thanks: 20 times
Bigchillghost wrote:
Seems I found the ultimate solution :wink:

Your being such a bad tease, I always dreamed of something like this to be done and be takes seriously, now your just making it worse, in a good way obviously.
Hundreds of people that wonder around forums like this are simply clueless as to what developers like yourself are doing, we do not understand, myself included, nor know code/programming/scripting languages etc etc etc, we simply use amazing tools that others, like yourself, are good at it and create for use.
So I hope you have thought about something as to make it work for all of us, if your really serious about it.
For example a scenario would be, you import your desired skinned mesh in 3dsMax, you know with bones/weights and all, and you just quadrangulate it as it was initially created, because from an artistic perspective quads are desired and far superior to triangles, since triangles is only needed in-game by the GPU.

I honestly hope you consider it, I hope more join in to express they're opinion, because this thing your doing is simply fantastic and I personally dream about it for a few years now, since I discovered this world of 3D possibilities.

My honest and humble opinion, thank you.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 27 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group