Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Extracting simple models

Read or post any tutorial related to file format analysis for modding purposes.
User avatar
Bigchillghost
double-veteran
double-veteran
Posts: 1023
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 31 times
Been thanked: 1210 times

Re: Extracting simple models

Post by Bigchillghost »

Tosyk wrote:but why you used 'long' for boneCount and boneID (?) — it's 4 bytes each so it should be float, no?
You really need to get familiar with different data types before you write any programs/scripts. A LONG is a type for storing interger like 1000 while a float is used to store floating point numbers like 3.1415926 etc.. They're encoded differently.
Tosyk wrote:alos, how should I call this line of symbols related to single vertex? Vertex block? vertex size long?
It's just a structure for vertex so any proper terms will be fine.
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)
User avatar
Tosyk
double-veteran
double-veteran
Posts: 1027
Joined: Thu Oct 22, 2009 10:24 am
Location: Russia, Siberia
Has thanked: 269 times
Been thanked: 154 times
Contact:

Re: Extracting simple models

Post by Tosyk »

in noesis, how to skip junk data like texture path at the beginning of If the length of this path is before it?

path is: player\texture\eye\eye_brown_d.dds and before is 24 00 00 00 - it's a length of the path, how can I use this length to skip this amount of bytes for now?
Thank you for all you do here
my blog | my forum
User avatar
Bigchillghost
double-veteran
double-veteran
Posts: 1023
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 31 times
Been thanked: 1210 times

Re: Extracting simple models

Post by Bigchillghost »

shakotay2 wrote:
or you just search for a certain byte sequence which I don't really recommend unless there's no other way.
It's the most recommended way for beginners, imho.
Maybe. But you cannot be 100% certain that it works for all meshes and all files.
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: 1023
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 31 times
Been thanked: 1210 times

Re: Extracting simple models

Post by Bigchillghost »

Tosyk wrote:in noesis, how to skip junk data like texture path at the beginning of If the length of this path is before it?

path is: player\texture\eye\eye_brown_d.dds and before is 24 00 00 00 - it's a length of the path, how can I use this length to skip this amount of bytes for now?
For absolute position use

Code: Select all

bs.seek(OFFSET, NOESEEK_ABS)
or

Code: Select all

bs.seek(OFFSET, NOESEEK_REL)
for relative position.
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4283
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1146 times
Been thanked: 2242 times

Re: Extracting simple models

Post by shakotay2 »

Tosyk wrote:in noesis, how to skip junk data like texture path at the beginning of If the length of this path is before it?

path is: player\texture\eye\eye_brown_d.dds and before is 24 00 00 00 - it's a length of the path, how can I use this length to skip this amount of bytes for now?
You need to use relative position, see my answer here:
http://forum.xentax.com/viewtopic.php?f ... 18#p142418


edit, not related to the actual discussion, but to hex2obj, here's the actual version, I'm using,
shakotay2 wrote: Sun Mar 07, 2021 3:29 pm
Don't miss to read the tutorial, hex2obj_tut.rtf, or you will be lost. :)
(well, I assume, you'll be lost in any case...)


---------- >>> old version 0.24c <<< ----------
hex2obj_0.24c.zip
link not working/available on some countries
Last edited by shakotay2 on Thu Jun 10, 2021 8:46 pm, edited 5 times in total.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
User avatar
Tosyk
double-veteran
double-veteran
Posts: 1027
Joined: Thu Oct 22, 2009 10:24 am
Location: Russia, Siberia
Has thanked: 269 times
Been thanked: 154 times
Contact:

Re: Extracting simple models

Post by Tosyk »

I'm posting here some progress. I decided to walk away from language that doesn't have any docummented base to the language I familiar with a bit more. I might get back to python later.
I did the basic format research and continue doing it (morphs, skeleton, weights, normals are on the way). My friend from here - zaramot helping me with some maxscript functions and many tips because it's my very first try to build something like that and I'm trying so hard.

Right now I can import all the mesh characters and uv.

Image Image
Bigchillghost wrote:

Code: Select all

Type	Specification

long	boneCount
for i = 1 to boneCount
{
	long	boneID
	float	boneWeight
}
I've just read this one more time and realize that I now understand what that mean and have similar code im ny script :mrgreen:
Last edited by Tosyk on Mon Jul 30, 2018 10:54 am, edited 1 time in total.
Thank you for all you do here
my blog | my forum
User avatar
Tosyk
double-veteran
double-veteran
Posts: 1027
Joined: Thu Oct 22, 2009 10:24 am
Location: Russia, Siberia
Has thanked: 269 times
Been thanked: 154 times
Contact:

Re: Extracting simple models

Post by Tosyk »

some week ago I manage to do the maxscript for this game.

I did the most part and since I have no expirience in bone/weight I got huge help from
zaramot - a local 3ds max guru.

So here's the script: https://forum.xentax.com/viewtopic.php?f=16&t=18517
Thank you for all you do here
my blog | my forum
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4283
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1146 times
Been thanked: 2242 times

Re: Extracting simple models

Post by shakotay2 »

Tosyk wrote:its ui is confussing shit out off me. I always thought that it can be simplier but then 'Model researcher' came up. I don't claim that "MR" is a super-tool but it is a lot more organized in terms of interface,
hex2obj was the first tool of it's kind, imho, and it's simple, yes. I always considered it as a first-steps-helpertool.
and you don't have to learn tool
That may be your opinion, but I have very strong doubts about that. In my opinion you're simply wrong: there's the different paddings for example and "you don't have to learn tool"?
(Not to speak about this error message "Faces error!" which leaves you lost.)
for hex2obj you need the startaddress of face indices (and the length of that block to get the face indices count). The later seems to be the hurdle for newbies.
You then need the start of vertices, to get it you need an understanding of your 3D format, that's correct.
— you just need to understand the format you want.
Yes, but that's not a matter of ui's design.
Main problem is to distinguish the FVF size which again is a matter of understanding formats.
From what I can see in forum posts there's not too many people that solve format requests using MR.
So if you want bring the begginers through your tool to their desired models you may consider to re-touch h2o's ui :)
nope, I don't. I consider it as finished. (And why should I put any efforts on it now that you have MR? :D )

In the end I'd agree that MR is a very good tool and I encourage people to use it.
Nevertheless hex2obj is the tool of my first choice because it's quick (and dirty).

As I wrote somewhere: you can't expect to get a more complex format solved unless you don't have tried out a dozen of simple formats.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
User avatar
Tosyk
double-veteran
double-veteran
Posts: 1027
Joined: Thu Oct 22, 2009 10:24 am
Location: Russia, Siberia
Has thanked: 269 times
Been thanked: 154 times
Contact:

Re: Extracting simple models

Post by Tosyk »

thanks for the reply :)

I only speak for myself as a 0-expirience user of this kind of tools thus I think that you can't judge it the same way because of your 100500-expirience. Also I can judge as ui developer.
Thank you for all you do here
my blog | my forum
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4283
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1146 times
Been thanked: 2242 times

Re: Extracting simple models

Post by shakotay2 »

yes, I see. But in the end (at least for me) it's rather unimportant which tool to use, hex2obj, MR, or Model Inspector from Herbert 3000: viewtopic.php?f=33&t=14648

The point of my post you were replying to was
"I was always thinking about the best way to give beginners a startup with coding or scripting,"
because you normally start with getting the first submesh but don't want to get the others manually, too.

Afaik none of the above mentioned tools will help you find all submeshes automatically by simply entering "numbers".
This is the reason why I mentioned Noesis' python scripting to find patterns indicating the start of the next submesh.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
wordhg
advanced
Posts: 49
Joined: Tue Oct 15, 2013 1:21 am
Has thanked: 23 times
Been thanked: 1 time

Re: Extracting simple models

Post by wordhg »

I use both, but I think hex2obj is simpler.
Getting used to hex2obj and then operating MR is always not smooth.

Personal feelings, refer to
User avatar
Bigchillghost
double-veteran
double-veteran
Posts: 1023
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 31 times
Been thanked: 1210 times

Re: Extracting simple models

Post by Bigchillghost »

Well, my opinions:
Tosyk wrote:for me h2o always something like "every time from scratch" because when I want to use it I always start from tutorial for it to then proceed with the format I want.
If you'd never thought about what you were doing with your tool, you're never about to truely understand how everything works.
Tosyk wrote:its ui is confussing shit out off me. I always thought that it can be simplier but then 'Model researcher' came up.
People always get confused about things they don't really understand. So do I when I first came to Hex2obj. But that's how a learning process begins. As for the UI, it totaly depends on personal taste. For example, I'm more fond of the simple and clean UI of Hex2obj.
However, simplicity sometimes causes inconvenience to the researching process, like cases when extra data was inserted in the face buffer, handling which becomes an advantage of MR, as it makes every part independent. But it all depends on how complex the formats are. For example, if different geo data were stored in separate files, none of the existen tools will work directly. So please keep in mind that when things get complicated, it possibly won't be that simple tool for beginners any more.
Tosyk wrote:but it is a lot more organized in terms of interface, and you don't have to learn tool — you just need to understand the format you want.
Actually you do have to LEARN a tool, simple or advanced one. Would you ever know the difference between "Pad Inter" and "Padding" if you hadn't read the specifications of MR? You feel MR to be simplier probably because you have contacted with Hex2obj before and you just got a better understanding when you met the former.

I don't think either of these tools are supposed to be the final solution of extracting models, especially when there're lots of submeshes or when the data is compressed, but merely a quick approach to help you varify your guesses on the format. Still, it's not a proper step to learn things by skipping the most basic part, if you really wish to understand it. That's why I wrote a step by step tutorial, hopefully to help beginners avoid making detours. But I havn't seen anyone pose questions under these topics, which is really disappointing.
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4283
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1146 times
Been thanked: 2242 times

Re: Extracting simple models

Post by shakotay2 »

Bigchillghost wrote:But I havn't seen anyone pose questions under these topics, which is really disappointing.
The audience is getting smaller; many people seem to use Ninja Ripper, for example.
But I'm pretty sure that interested beginners will profit from your tutorial.

(I've updated my sig to link to it.)
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
User avatar
Tosyk
double-veteran
double-veteran
Posts: 1027
Joined: Thu Oct 22, 2009 10:24 am
Location: Russia, Siberia
Has thanked: 269 times
Been thanked: 154 times
Contact:

Re: Extracting simple models

Post by Tosyk »

My only point was: better UI can give better understanding for the beginners, simple as that. This claim is not from nowhere — because of my professional expirience.

p.s.: the fact that you "can" and "have to" learn ANY tool to get what you want is something beyond "usability" terms and doubtlessly but with the approach like this you can also say "draw models yourself".
p.s.: once again: I'm not trying to argue, guys, I'm just saying that ui of h2o could be much more better :]
Thank you for all you do here
my blog | my forum
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4283
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1146 times
Been thanked: 2242 times

Re: Extracting simple models

Post by shakotay2 »

Tosyk wrote:p.s.: once again: I'm not trying to argue, guys, I'm just saying that ui of h2o could be much more better :]
Any program can be improved, there's no doubt.
>>> But you need to tell the details, please :) . <<<

I sum up some ui deficits here:
  • the 'noStr' and 'std' button should have been integrated into one drop down combo box
  • The special features presented by the 5 checkboxes and the editbox for faces padding should be hidden from beginners;
    I'd agree with that, you generally don't need it for simple models.
  • in the latest version I've changed the 'seq' (sequential) button to start with 'VB' (vertex block).
    (I really should update the tut(orial) in this point. :roll: )
which I consider being minor problems.

- editboxes for start / size UVB
Matter of understanding, not of good/bad ui, imho.

There's is a basic concept with 3 steps to keep it simple:
1) get the faces
2) defining the vertex block
3) get vertices

You can do this different but I doubt, you can make it "better" (always remember, I'm talking about SIMPLE models).

There's the drop down combo box in step 3 for choosing the data format (for mesh and uvs).
So HF_UV means: mesh: float, uvs: half floats
You may find it confusing, but it's simple and fulfills it's needs.

Best feature of all is the automatic calculation of the vertex count, once you got the correct face indices count.
So the idea was to keep things simple for my personal use.

Usability was not a primary goal, hence.
(You need to learn how it works, of course, by reading tutorials.)
Last edited by shakotay2 on Tue Jul 31, 2018 7:57 pm, edited 1 time in total.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
Post Reply