XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Sat May 26, 2018 2:52 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 322 posts ]  Go to page Previous  1 ... 18, 19, 20, 21, 22
Author Message
 Post subject: Re: Extracting simple models
PostPosted: Sun May 13, 2018 4:13 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

shakotay2 wrote:
Problem is that I would have to put it into dozens of function combinations. floats, halffloats, shorts, combined with vertices or uvs functions plus the same set of functions for the listing in the left most listbox, for the test.obj file (mesh button) and for the SaveAs mesh menu entry. (This is indeed the first time I wish I'd coded it object orientated :cry:)

A shitload of work, which I try to avoid.

So you do all the works in every single function combination? Why not just read the vertices/UVs data to a temporary buffer and convert/copy them to the destination buffer? Then you need to process only one buffer if the flipping UVs option is chosen.

BTW I'm still confused about the UI. What are the w/64k / w/8k and the grey CF buttons for?
Also, I noticed that the exported mesh is grouped per 500 triangles, is it because the face buffer is that big, or that it's a designed feature? I wish I don't have to blocked them out every time.

You can make the ads go away by registering


_________________
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: Extracting simple models
PostPosted: Sun May 13, 2018 5:33 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2251
Location: Nexus, searching for Jim Kirk
Has thanked: 501 times
Have thanks: 1163 times
Bigchillghost wrote:
So you do all the works in every single function combination? Why not just read the vertices/UVs data to a temporary buffer and convert/copy them to the destination buffer? Then you need to process only one buffer if the flipping UVs option is chosen.
well, a temporary buffer doesn't help. I use one buffer only and depending on whether there's half float uvs in there or shorts you choose (function) HF_UV or (function) WordUV from the dropdown combobox. The "knowledge" how to treat the values in the buffer is contained in those function. (It was a bad architectural design decision, I know, but it can't be corrected by simple means, imho.)

Quote:
BTW I'm still confused about the UI. What are the w/64k / w/8k and the grey CF buttons for?
CF is combined face indices, not implemented.
The w/x is active for WordUV and ShortAll only as you may have noticed, it's just the divider for word (short) uvs because there were formats where the uv map appeared "zoomed out".

Quote:
Also, I noticed that the exported mesh is grouped per 500 triangles, is it because the face buffer is that big, or that it's a designed feature? I wish I don't have to blocked them out every time.
It's for bigger meshes where the submesh borders are hard to find.
In blender wavefront importer there's the option to load Split by Group.
If you uncheck that feature it's remains for all mehses loaded afterwards still you check it again or restart blender.

(I didn't think about other 3D apps, so sorry for that.)

_________________
"you can't always get things served on a silver tray"
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip

"We are Microsoft. You will be assimilated. Resistance is Futile."


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Mon May 14, 2018 6:06 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
shakotay2 wrote:
The "knowledge" how to treat the values in the buffer is contained in those function. (It was a bad architectural design decision, I know, but it can't be corrected by simple means, imho.)

I'm not sure if I understand correctly, but if the buffer is allocated and freed in these functions, I guess there'd be a lot of work to do. Maybe you should consider rewrite these functions and preserve only the data type convertion parts. It shouldn't be too hard to do though.
Quote:
CF is combined face indices, not implemented.
The w/x is active for WordUV and ShortAll only as you may have noticed, it's just the divider for word (short) uvs because there were formats where the uv map appeared "zoomed out".

Ah, I see. Thanks for the clarification!

Quote:
I didn't think about other 3D apps, so sorry for that.

Actually 3Ds Max has similar option but I usually leave it unchecked incase the order of the grouped submeshes is changed.
Just need 2 steps to solve it in Notepad++ anyway.

_________________
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: Extracting simple models
PostPosted: Mon May 14, 2018 7:46 am 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2251
Location: Nexus, searching for Jim Kirk
Has thanked: 501 times
Have thanks: 1163 times
Bigchillghost wrote:
I'm not sure if I understand correctly, but if the buffer is allocated and freed in these functions, I guess there'd be a lot of work to do. Maybe you should consider rewrite these functions and preserve only the data type convertion parts.
The buffer is static and freed at the end of the application.

"rewrite"?, well, I consider hex2obj as "finished", more or less. I think my coding time is better invested into the Make_obj project (with source, partially from hex2obj) or the "Skeleton to SMD" project which I hopefully get released 'til year's end. :D

_________________
"you can't always get things served on a silver tray"
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip

"We are Microsoft. You will be assimilated. Resistance is Futile."


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Mon May 14, 2018 10:42 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
shakotay2 wrote:
The buffer is static and freed at the end of the application.

I think I know what you mean now. The files test.obj and testUVs.obj are generated in those functions whereas the exported obj file is created from the static buffer after being processed by these functions, am I right? Well then you can flip the UVs for the exported obj file only and I think the users should know what they're doing.
shakotay2 wrote:
"rewrite"?, well, I consider hex2obj as "finished", more or less.

Yeah, I hate to rework on some of my old projects as well but still I wouldn't hesitate to make some improvements if possible.
shakotay2 wrote:
I think my coding time is better invested into the Make_obj project (with source, partially from hex2obj)

Well, about that, I really wonder what this project is for. :D I mean, if you know how to programing, why not write a full-featured obj convertor instead? You can even make full use of the normals data, which is far more accurate than the one auto-generated by the 3D softwares. So with all due respect, maybe you're the only advanced user of this project, while the rest, are those who have little or no experience in programing and reverse engineering a game model.
shakotay2 wrote:
or the "Skeleton to SMD" project which I hopefully get released 'til year's end. :D

Is that something similar to hex2obj? If so it would definitely be the most anticipated tool for reverse engineering skeleton data, and also the first one.:D

I have some basic understanding on the bone stuffs now, including bone names, bone IDs, parent bone IDs, bone indices, bone weights, and bone matrices, which is still the trickiest part to me. I do know there're translations, rotations, scales, maybe even projections in every matrix though. Thing is that I don't know how to organize these data into a usable format. Would you consider writting a tutorial on related stuffs by that time?

_________________
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: Extracting simple models
PostPosted: Mon May 14, 2018 11:21 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2251
Location: Nexus, searching for Jim Kirk
Has thanked: 501 times
Have thanks: 1163 times
Bigchillghost wrote:
Well then you can flip the UVs for the exported obj file only

The buffer itself remains unchanged. Here's the float version for uvs from the Make_obj project. The flipping would have to be applied in any of those functions:
Code:
void logUVs(DWORD addrUV, DWORD Vcnt, BYTE vStride)
{
    char *pFBuf ;
    BYTE i ;
    DWORD k ;
    float *pFloat ;
   float fData = 0.0f;

    pFloat= &fData ;
    pFBuf = (char *) lpFBuf ;
    pFBuf += addrUV ;
   for (k=0;k < Vcnt;k++) {
        fprintf( stream, "vt ") ;
        for (i=0;i<2;i++) {
            pFloat = (float*) pFBuf ; fprintf( stream, "%f ", *pFloat) ; pFBuf += 4 ;
        }
        fprintf( stream, "\n") ;
      pFBuf += vStride-8 ;
   }
}

Quote:
Well, about that, I really wonder what this project is for. :D
It can't be addressed to the majority of forum members, I'm aware of that. It's intended to give a handful of newcomers an idea how to start.
Quote:
I mean, if you know how to programing, why not write a full-featured obj convertor instead?
Why should I do? This is just a hobby of mine and "full-featured" means "time eating". :D

Quote:
Thing is that I don't know how to organize these data into a usable format.
yeah, that's the main problem. And there's so many variations which will lead to confusions of the customers, more than with hex2obj (which is known as the tool where "you have to input random numbers" :D ). In the end I'm not sure whether it's a good idea to release tools which are primary designed as helper tools for my personal use.
Quote:
Would you consider writting a tutorial on related stuffs by that time?
There will be a short tutorial on the use of skel2smd. But I'm not going into details (because of lack of knowledge). Indeed I hope to find some "basic data types" which the user can toggle through.

_________________
"you can't always get things served on a silver tray"
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip

"We are Microsoft. You will be assimilated. Resistance is Futile."


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Tue May 15, 2018 6:20 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
shakotay2 wrote:
The buffer itself remains unchanged.

Oops...
shakotay2 wrote:
Why should I do? This is just a hobby of mine and "full-featured" means "time eating". :D

You know, I was actually talking about the target users. And trust me, it won't save you much time by gathering only the offsets and the counts. But regarding this:
shakotay2 wrote:
It's intended to give a handful of newcomers an idea how to start.

never mind!
shakotay2 wrote:
In the end I'm not sure whether it's a good idea to release tools which are primary designed as helper tools for my personal use.

Well I'm sure such tools are meant for users who actually know what they're doing. For those who don't, they just need some more basic knowledge.


_________________
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  [ 322 posts ]  Go to page Previous  1 ... 18, 19, 20, 21, 22

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


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