XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Thu May 24, 2018 9:13 am

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



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

Joined: Tue Jul 05, 2016 9:37 am
Posts: 217
Has thanked: 14 times
Have thanks: 80 times














You can make the ads go away by registering

A local compare on the face:

Image

_________________
An Imitable Workflow for Reverse Engineering a Game Model

"No investigation means no right to speak."
Remember to thank people when you get helped. That's the minimum respect to their efforts.


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: 175
Has thanked: 74 times
Have thanks: 11 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
mega-veteran
mega-veteran
User avatar

Joined: Tue Jul 05, 2016 9:37 am
Posts: 217
Has thanked: 14 times
Have thanks: 80 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?

_________________
An Imitable Workflow for Reverse Engineering a Game Model

"No investigation means no right to speak."
Remember to thank people when you get helped. That's the minimum respect to their efforts.


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: 175
Has thanked: 74 times
Have thanks: 11 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
mega-veteran
mega-veteran
User avatar

Joined: Tue Jul 05, 2016 9:37 am
Posts: 217
Has thanked: 14 times
Have thanks: 80 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.

_________________
An Imitable Workflow for Reverse Engineering a Game Model

"No investigation means no right to speak."
Remember to thank people when you get helped. That's the minimum respect to their efforts.


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: 175
Has thanked: 74 times
Have thanks: 11 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
mega-veteran
mega-veteran
User avatar

Joined: Tue Jul 05, 2016 9:37 am
Posts: 217
Has thanked: 14 times
Have thanks: 80 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.

_________________
An Imitable Workflow for Reverse Engineering a Game Model

"No investigation means no right to speak."
Remember to thank people when you get helped. That's the minimum respect to their efforts.


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

Joined: Tue Jul 05, 2016 9:37 am
Posts: 217
Has thanked: 14 times
Have thanks: 80 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

_________________
An Imitable Workflow for Reverse Engineering a Game Model

"No investigation means no right to speak."
Remember to thank people when you get helped. That's the minimum respect to their efforts.


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

Joined: Tue Jul 05, 2016 9:37 am
Posts: 217
Has thanked: 14 times
Have thanks: 80 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?

In the above image, the triangle ABC is surrounded by another 3 triangles: △ADB, △BFC and △ACE.
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:
Code:
|a b c|      or      |a b c|      or      |a b c|
|a c e|              |c e a|              |e a c|

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 condition that you don't need to change the face buffer.

Luckily a model of quadrilateral polygons uses only a few of the above rules to split 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 3 6

its triangle face indices could be
Code:
f 1 2 3
f 3 4 1
f 2 5 3
f 3 6 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 7 2      -->      f 1 7 2
f 2 5 3
f 3 6 2      -->      f 2 5 3 6


Attachments:


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


_________________
An Imitable Workflow for Reverse Engineering a Game Model

"No investigation means no right to speak."
Remember to thank people when you get helped. That's the minimum respect to their efforts.


Last edited by Bigchillghost on Sat May 19, 2018 12:17 pm, edited 1 time in total.

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

Joined: Tue Jul 05, 2016 9:37 am
Posts: 217
Has thanked: 14 times
Have thanks: 80 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

_________________
An Imitable Workflow for Reverse Engineering a Game Model

"No investigation means no right to speak."
Remember to thank people when you get helped. That's the minimum respect to their efforts.


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

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

Also a screenshot for details of some inner parts:
Image

_________________
An Imitable Workflow for Reverse Engineering a Game Model

"No investigation means no right to speak."
Remember to thank people when you get helped. That's the minimum respect to their efforts.


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: 175
Has thanked: 74 times
Have thanks: 11 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  
 
 Post subject: Re: Reverse Model Wireframe
PostPosted: Sat May 19, 2018 5:02 am 
Offline
mega-veteran
mega-veteran
User avatar

Joined: Tue Jul 05, 2016 9:37 am
Posts: 217
Has thanked: 14 times
Have thanks: 80 times
mono24 wrote:
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

Well, I havn't seen anybody asking about it, even though the main idea of this method is given already. So either people are not interested in it, or they don't want to understand at all.
mono24 wrote:
So I hope you have thought about something as to make it work for all of us, if your really serious about it.

It's just another area of reverse engineering I discovered to have fun with, so don't be so "serious".
mono24 wrote:
I honestly hope you consider it

It's not the kind of things that can be easily done by fiddling with your fingers. Even if such tool is made, you have to take into account the consequences of releasing it. The last thing I want to see is that noobs and leechers abusing the tools and some malicious people exploiting it to realize their illegal purposes. So instead, I prefer to make it investigative, and leave the implementation to those who's interested in it.

_________________
An Imitable Workflow for Reverse Engineering a Game Model

"No investigation means no right to speak."
Remember to thank people when you get helped. That's the minimum respect to their efforts.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 28 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