Page 1 of 1

Entity 1.3; Proper Model Injection Revision

Posted: Thu Nov 06, 2008 11:13 am
by xzodia
Entity 1.3; Proper Model Injection Revision
Same old Entity 1.3, great new feature!

This release is Entity 1.3.3 using revised code created/modified from the original code and taken from numerous other places. The most obvious changes to the code include; but may not be limited to:
  • Improved triangle strip generation:
    Rewrote the code involved with the OBJ file processing before it is handed off to Directx for processing. This results in a better compression, but you may run into trouble with models being improperly injected: such are the woes of making things more proper.

    UV and Vertex compression:
    Fixed the way the bounding box was generated for compression. Not sure if there is any particular noticeable improvement due to this, but higher accuracy of UV and vertex locations could possibly be achieved now.

    Normal, Tangent, and Bitangent vector compression:
    Code was rewritten to be more understandable (for me at least), as well as to fix an apparent bug in the original code. Decompression and re-compression of model raw results in a change of the values stored: this is due in part to rounding errors, and to a greater extent, due to an anomalous value at 0.

    Shader Groups:
    Support for this was removed during the testing stages of the new code, but I plan on releasing a version further down the road with enhanced features. All mesh is by default set to shader group 0.
Image

Download:
http://files.remnantmods.com/jacksoncougar/utilities/entity-pmi-build/

Posted: Thu Nov 06, 2008 11:24 am
by Battery
hahahahahahaha the cake is a lie, great job on this man, i never really worked with models, but would be helpful if i did haha.

Posted: Thu Nov 06, 2008 12:35 pm
by Eaton
Chocolate cake... I'm lactose intolerant... :evil:

Posted: Thu Nov 06, 2008 2:54 pm
by ScottyGEE
Well, I was going to join Remnant mods to congratulate Jackson on such a thing, but of course, I'm not allowed to register. So you'll have to pass it on, nice work Jackson. Achieving something like this is great work - even if silly people like me don't really mod anymore. The models look good and its nice to see a goal like perfect models was achieved.

Posted: Thu Nov 06, 2008 3:00 pm
by DemonicSandwich
ScottyGEE wrote:Well, I was going to join Remnant mods to congratulate Jackson on such a thing, but of course, I'm not allowed to register. So you'll have to pass it on, nice work Jackson. Achieving something like this is great work - even if silly people like me don't really mod anymore. The models look good and its nice to see a goal like perfect models was achieved.
Registrations are open, I only added a delay period to the Terms and Registration page to screw with spambots.
And I believe you already made an account anyway.

And Jackson says "hai".

Posted: Thu Nov 06, 2008 3:02 pm
by Eaton
Also, why was this placed in the Downloads section and not Utilities? :?

Posted: Thu Nov 06, 2008 3:03 pm
by NotZachary82
Eaton wrote:Also, why was this placed in the Downloads section and not Utilities? :?
More views I suppose.

Posted: Thu Nov 06, 2008 4:51 pm
by OwnZ joO
NotZachary82 wrote:
Eaton wrote:Also, why was this placed in the Downloads section and not Utilities? :?
More views I suppose.
That's how most apps were released back in the day, then they get moved to Utils after a while.

Posted: Thu Nov 06, 2008 6:36 pm
by DarkShallFall
Original:
Image
Re-injected:
Image

All was need is those groups and nodes and we will be all set.
Good job Jackson.

Posted: Mon Nov 10, 2008 11:08 pm
by xlRainlx
JESUS CHRIST!!! CAN IT BE??!!!1one

Thank you! Finally my dream of perfect H2 Injected models is a reality!!! I love you xzodia*kisses cheeks*

As soon as I can find out where I put my cables for my Xbox I will resume modding H2 again!!! That's right kiddies Rain's back! Hide you mothers!

Posted: Tue Nov 11, 2008 10:17 am
by Shock120
Eaton wrote:Chocolate cake... I'm lactose intolerant... :evil:
...more cake for me then. :lol:
Edit: It doesn't work.
At execution this happens
Entity 1.3.3.C has stopped working
also I'm on Vista 32bit

Posted: Tue Nov 11, 2008 12:11 pm
by Themandyou
Shock120 wrote:
Entity 1.3.3.C has stopped working
also I'm on Vista 32bit
Me too. This also happens with some other programs that are said to run fine on XP.

Posted: Tue Nov 11, 2008 12:35 pm
by Eaton
Download Entity 1.3.3, and replace the original exe with this one.

Posted: Tue Nov 11, 2008 2:17 pm
by NotZachary82
xlRainlx wrote:I love you xzodia*kisses cheeks*
It was JacksonCougar, actually.
Shock120 wrote:Edit: It doesn't work.
You're supposed to replace Entity 1.3 Beta's original .exe with this one.
*Bold so people can see it.

Posted: Fri Nov 14, 2008 4:40 pm
by xlRainlx
Jackson cougar then. I thank your face.

Posted: Thu Jan 22, 2009 2:55 am
by Win
Recently began testing this application during the use in a mod involving many custom models and ran across a few bugs I thought you should all be made aware of if you plan, or have, used this application.

First off there is a bounding box error that occurs when vertex's rest on the z, and I can only guess y and x, axis. If a vertex has a value of 0 on the z (and perhaps y and x) then the bounding box values become invalidated and the vertex's are either incorrectly compressed or something else happens that I am not aware of. What results is that the vertex's that had the 0 value are offset relative to the bounding values and become substantially displaced. So when your saving you models make sure they do have have any 0 in the vertex placements coordinates.

Second off, and this one is really strange, is once a model gets injected with this injector its UV mapping is changed in a way that is not compliant with the game itself: basically the Diffuse bitmap will become inverted in the 'v' uv coordinate. Vertically flipped basically. To fix this you can simply go into the shader and fin the reflexive that has the u tiling and v tiling values in it. Find the first chunk (usually) that has 1 and 1 for both of these values and change the second one to -1. If you cannot find it just randomly try changing every value that looks like its using UV tiling (sometimes that reflexive has multiple uses) until you bitmaps look properly on your model. If this is not working you can simply inject the bitmap flipped.

Thirdly Shader Groups:
Not really a bug I suppose but more of an oversight, I would guess however that it would be possible to simply change the shader that a particular mesh uses by changing its value in hex. For example if a model has more than one mesh in it (not a group) the PMI will correctly inject into each mesh, however it defaults to assigning a 0 to the shader index for that mesh. Since all that is needed to make the mesh use a different shader is to change the shader index in the mesh resource block in the raw data you could feasibly do this with a hex editor and a bit of luck.
(PM me if you need a tutorial on this...)

Enjoy and happy modding.

Posted: Thu Jan 22, 2009 3:05 am
by grimdoomer
We also need bone injection. Would any one happen you know how to write 3dsMax exporter scripts?

Posted: Fri Jan 23, 2009 12:48 pm
by Win
MicroTutorialiage: Changing Shader Index's using Hex Editors

Step one: Find a model that has multiple meshes (Commonly labeled as "Parts" in meta plugins). Or I suppose you could just create you own new meshes by chunk-cloning the Parts reflexive chunks and the LOD reflexive chunks....

Step two: Extract all the meshes to a new folder.

Step three: For each piece of your model that you want to have a new shader, detach it from your main mesh in a 3d-modeling program and save it over one of the extracted OBJ files.

Step four: copy the raw offset of the mesh you want a new shader index for and goto that offset in the map file using a hex editor. you should have your cursor before a string like this: "hklb".

Step five: Move your cursor after the first string that looks like this: "crsr". Then move it 4 more bytes further. so you should be at this position past the first string: .......crsr1234.... With your cursor after the 4.

Step size: Select the next two bytes and change their value to any index (int) that you want it to use the shader. The index refers to the shader chunks index in the model meta