Reverse Engineering Lugaru assets

The place to discuss all things Lugaru.
User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Re: Reverse Engineering Lugaru assets

Post by rudel_ic » Wed Oct 22, 2008 1:43 am

Teaser: Once I find the time to make a proper release, you won't have to scale weapons or invert normals anymore, you'll get a GUI and you will be able to preview your work in the hand of Turner, provided you're working on a weapon. And there will be an update button so you don't have to reload shit every time. And there will be texture mapping. And mirroring the texture won't be necessary anymore. And converting will work in both directions. And you'll have predefined paths for opening stuff if you need that.

After that, I'll implement putting pieces of weapons together, so you can for example model a handle and a blade, import them and export that all together as a .solid. That'll take quite some time though because things like texture merging and UV refitting will have to be implemented. It's nothing magical though.

Eventually, some months down the road, you'll be able to modify Turner / the wolves. But that is really low priority.

After that, I'll make the parsing stuff faster and more robust by generating stuff via JFlex.

And at some point, this will indeed become a SourceForge project. I'm not too sure when that'll happen though. It seems as if there's no other interested developer in this community right now, so there's no hurry.

User avatar
Lotus Wolf
Posts: 2218
Joined: Sun Aug 31, 2008 6:03 pm

Re: Reverse Engineering Lugaru assets

Post by Lotus Wolf » Wed Oct 22, 2008 1:59 am

That sounds really great! and i wish i could help with something, but im not very experienced... still feel free to ask, cause i might be able to help, who knows? still, i am interested in your project, but i fear i would be of little help at the point, as i am not a programmer... :( but anyways, anything i can help with i would be happy to. :)

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Re: Reverse Engineering Lugaru assets

Post by rudel_ic » Wed Oct 22, 2008 2:24 am

You could always do application testing - I'm usually not going beyond basic testing, mostly automatic.
That would require going through all features and trying to break them, then telling me what's not working. That begins at starting the app from command line with faulty parameters and ends at trying to import nonsense.

And you could write documentation. That means getting a rough draft from me, making it pretty with HTML features (colored text, underlining, italic, bolding, text size, tables, pictures and so forth). That documentation would then end up in the application. You wouldn't have to write actual HTML, you could provide an RTF or OpenOffice stuff and I'd be able to convert it then.

So I'll remember your offer. But those tasks are tedious, take time and there's no payment whatsoever.

Therefore, I wouldn't hold it against you if you don't want to do that. If I have to do it by myself, that's totally fine, it then just takes longer until releases spawn (which isn't really an issue because you're the only active modder in the community that uses my stuff right now).

You can decide whether or not you have the time and energy to do such things when I ask for it. No pressure.

User avatar
BunnyWithStick
Gramps, Jr.
Posts: 4297
Joined: Mon Dec 05, 2005 12:14 am
Location: New Zealand

Re: Reverse Engineering Lugaru assets

Post by BunnyWithStick » Wed Oct 22, 2008 10:04 am

rudel_ic wrote:Sure!

After you've imported…
How to make a .solid file work in thirty easy steps! :roll:

User avatar
Lotus Wolf
Posts: 2218
Joined: Sun Aug 31, 2008 6:03 pm

Re: Reverse Engineering Lugaru assets

Post by Lotus Wolf » Wed Oct 22, 2008 1:42 pm

rudel_ic wrote:And you could write documentation. That means getting a rough draft from me, making it pretty with HTML features (colored text, underlining, italic, bolding, text size, tables, pictures and so forth). That documentation would then end up in the application. You wouldn't have to write actual HTML, you could provide an RTF or OpenOffice stuff and I'd be able to convert it then.
Would that be like a Readme, for a Program History? And i would be happy to do either\both of those tasks, Testing and Documentation. Cause i think your stuff is great, its really helpful.

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Re: Reverse Engineering Lugaru assets

Post by rudel_ic » Wed Oct 22, 2008 2:34 pm

BunnyWithStick wrote:
rudel_ic wrote:Sure!

After you've imported…
How to make a .solid file work in thirty easy steps! :roll:
Instead of 20 steps or whatever it was before.

The plot thickens!
Lotus Wolf wrote: Would that be like a Readme, for a Program History? And i would be happy to do either\both of those tasks, Testing and Documentation. Cause i think your stuff is great, its really helpful.
No, just how to use the tool. Keyboard shortcuts, workflows, command line parameters, limitations, that kind of thing.

User avatar
Lotus Wolf
Posts: 2218
Joined: Sun Aug 31, 2008 6:03 pm

Re: Reverse Engineering Lugaru assets

Post by Lotus Wolf » Wed Oct 22, 2008 3:52 pm

Good Deal. 8) I'm In.

User avatar
Lotus Wolf
Posts: 2218
Joined: Sun Aug 31, 2008 6:03 pm

Re: Reverse Engineering Lugaru assets

Post by Lotus Wolf » Wed Oct 22, 2008 6:37 pm

Ok, i made this kunai, to use as the knife, and it works, its pointed the right direction, and everything, except for one thing: Turner holds it just above the crossguard on the blade. I've tried going back into blender and moving it around, but he always holds it in the same place. and it looks kinda dumb. I'll upload the .X file. What happened?

EDIT: I've tried everything i could think of, i even re-did the whole thing from an early save, its always the same, he holds it by the blade and not the handle. its not turned the wrong way either, at least i dont think so...
Attachments
Kunai.x.blend.zip
Both .X file, and .blend file, What happened?
(34.97 KiB) Downloaded 202 times

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Re: Reverse Engineering Lugaru assets

Post by rudel_ic » Wed Oct 22, 2008 7:02 pm

What you're doing is you're moving the object in Object Mode. That's just relative translation - if you don't apply that to the vertices, the exported model won't reflect the translation, it'll just discard the relative offset.

So the easiest way around this is to move the object to the global center in Object Mode (SHIFT-S, "Selection -> Center"), then go into Edit Mode (TAB), select all vertices (A) and translate them all together (G).

The difference is that you're then making an absolute per-vertex translation, which is immediately applied to all the vertices, of course. In Object Mode, you're just giving the object an offset relative to zero, which is a common way to describe translations, but if the offset isn't applied to all vertices, which amounts to a simple Matrix+Vector operation, the vectors themselves don't reflect the translation, but the metadata (relative offset) does. It's a significant difference.

That's also why you have to apply scale and rotation after changing them in Object Mode. In Edit Mode, that wouldn't be necessary, but scaling and rotation behave differently. Translation doesn't, it's exactly the same operation, but just absolute in Edit Mode and relative in Object Mode.

I hope that clears it up.

Relative translation isn't interesting for what you want to do, but when you want to do stuff like inherited translations, rotations and scale operations, it's an essential trick.

Imagine you had a car consisting of the chassis and the tires. Now you want to enlarge the whole car.
If you simply let the tires and the chassis inherit the scale of a meta-object, you don't have to select all vertices themselves, scale them up independently etc. - you're doing less work that way.
If you wouldn't do it that way, you'd have to scale them all up and then translate them, that's a lot more operations, essentially, and harder to do for the artist.

User avatar
Lotus Wolf
Posts: 2218
Joined: Sun Aug 31, 2008 6:03 pm

Re: Reverse Engineering Lugaru assets

Post by Lotus Wolf » Wed Oct 22, 2008 7:13 pm

Ok, i get it now, Thank you :) And the fade out was hilarious. :lol:

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Re: Reverse Engineering Lugaru assets

Post by rudel_ic » Sat Jan 10, 2009 1:18 am

Maybe I'll write a .solid manipulation tool somewhen in which you can select and manipulate vertices and save that.I already figured out that this is possible here with the help of Stromboli and there seems to be some interest in having the opportunity to at least modify characters in Lugaru.

Features needed for such a tool:
- Loading multiple .solids in separate windows (you know, because of the LoD thing so that it's easy to model them all in one go)
- Selecting vertices with marquee select
- Moving vertices
- Rotating multiple vertices
- Changing cam angles and zooming in / out
- Switching between different view styles (flat shading, wireframe, textured for example)

So that's a minimal modeling tool that doesn't need Blender or something and eclusively is for the purpose of changing vertex locations in .solid files. Is there demand for such a thing?

A valid alternative would be automatically merging changed character .solids with existing ones. But the issue there is that I'd have to check whether or not number of faces and number of vertices match and the modeler would have to modify all the LoD models separately, which I find counter-intuitive.

UV map coordinates manipulation _could_ be possible as well, not tested yet though. The coordinates themselves, as opposed to the indices, are fairly easy to spot, understand and manipulate. The indices are the only mystical thing in characters.

To retell an old tale, the way my tool treats face indices is that it assumes the following pattern:
A,B,B,C,C,0
Assuming of course that a face has 3 vertices and is defined counter-clockwise.

I think that the repeat pattern isn't valid for characters, and I haven't checked whether characters hold additional info after the index+UV part.

My guess at this point is that the TRUE pattern is
A,B,Bs,C,Cs,As
Where As, Bs, Cs are indices that refer to skeleton vertices.
It should be possible to confirm this by looking at As, Bs and Cs and check whether the skeletons actually include these indices. But without having cracked skeletal data, it's pointless to try to confirm this.

User avatar
Lotus Wolf
Posts: 2218
Joined: Sun Aug 31, 2008 6:03 pm

Re: Reverse Engineering Lugaru assets

Post by Lotus Wolf » Sat Jan 10, 2009 6:15 am

rudel... you're a GOD! i was actually able to follow that very well, but i would have no idea what to do with any of it. i think it would be cool to get a tool in here for characters, but its all you, so i won't press for anything, but i'll do testing again if you go for it! :D
i hope you can crack skeletons, and animations sometime in the semi-near future, it would be awesome to do stuff with characters and animations. good luck, and you have my support with anything i can help with (and my support with stuff i can't help with, moral support that is). :wink:

Post Reply