guyz , ken hair & body needs fixing !!!
Hi, I just realized I was posting about my SF4 Assets Explorer in the wrong thread (the custom skin mega-thread) my post were pretty easy to miss in this crowded area… I’ll try post here from now on
So, I’m glad the tool is usefull but I see 3DS export might help.
I really have no clue why 3DS messes with the original vertex order/count (forthermore I dont have it as I’m just a coder)
I skipped the chinese tool tex coord problem by just… skipping them :rolleyes:
It will allow textcoord& normal edition in a near future.
I’ll study the 3DS file format as it is probably the best modeler around. but it may not be enough as I should allow full model export/import, including skeleton&bone weights, milkshape ms3D or half life smd formats handle theses but, again, it may not be 3DS compliant…
By the way, I’m really looking forward a Crimson viper fix for her hips, flat chest and top hair mess :wgrin:
One more thing, I’m posting my updates in 3 different boards :
[LIST]
[]game vixen zone ( a little too boobies oriented ),
[]xentax (a little to dev. oriented, I like users feedback)
[*] here (forum a little too restrictive, i cannot create thread and it cannot host files/images)[/LIST]
do you have any advice on this?
We could start an IRC channel for SF modding?
Also, is there any reason in particular that number of verts has to match? Is it a technical restriction, or something you can just fix in the tool?
Could someone here make this hair model useful for Sakura’s SKR_02.cos.emz ? T^T it won’t be injected well and i can’t make a good long hair model by myself (it doesn’t look as good -_-’)
Actually, unless any skeleton/bone weight management, any new vertex will be screwed from the start. I could perhaps allow lesser verts but I think it’s not worth the assle… weight adress are known but i am still fiddling with the skeletton (see red lines on v0.17).
I also need to allow asset resizing in the EMB blocks for skeleton/bone weight injection to work… (this should be too hard)
And even with skeleton/bone weight management in place, you will be contrained to keep meshes/group names so I can put back the right data headers in place.
Furthermore changing the skeleton will certainly kill the animations like when we swap characters cos files… until animation is figured out too:wasted:
I’m sure you were hoping the second option was the good one…:shake:
Here is a model i edited =D that one was easy and funny! lol
I actually bookmarked them all (and many more threads on Xentax and GameVixen).
GameVixen is my main for most SF4 stuff, because there’s a very big crowd with an interest in SF4 modding.
Xentax is awesome, don’t get me wrong, but I usually just read stuff instead of discussing any findings or mods, just because I have this feeling that everything I would post on Xentax is easy and/or basic stuff for most users.
I mean, just look at the regular posters on Xentax: creator of Dragon Unpacker, creators of MultiEx Commander + MEXScript/BMS, creator of Game Extractor, creator of QuickBMS/OffZip.
Look at what their main members actually accomplished, it’s applause worthy: http://wiki.xentax.com/index.php/XeNTaX#Members_CV
Here (SRK) is definitely not the way to go, I only see this thread as some misc news thread or something, don’t get me wrong, SRK is great in many aspects.
Xentax has poor file hosting IMHO, allowed filesize was kind of low IIRC. Xentax is also slow a lot of times (at least for me it is).
About GameVixen, I agree on the boobies/nude-skins, there’s like a horde of nude-skin enthusiasts around there, but I also think that their loosened policy on nude stuff is a good thing, it’s just there when you need it, for a lot of games.
skeleton
Some porgress on the skeleton front in the SF4 viewer:
http://www.gamevixenzone.com/gvz/download/file.php?id=10650&mode=view
credits goes to magnum@Xentax board for the skeleton EMO offsets!
Textures in piecemontee viewer
I switched from fixed pipeline to a shader driven one, allowing texturing progress.
Still… now I must find a way to trigger automatically the right texture stage for each model :crybaby:
http://www.gamevixenzone.com/gvz/download/file.php?id=10666&mode=view
http://www.gamevixenzone.com/gvz/download/file.php?id=10667&mode=view
Finally found out how to change the filesize of the EMZ files.
dissecting the google translation of this. I managed to add bigger DDS files to the EMZ, without sf4 crashing.
Everything is reversed.
RL= relative location
so here is the basic outline of the EMZ
#EMB (EMM’s RL, length and EMB2’s RL, length)(XXX_0x_0x.obj.emm absolute address) (xxx_0x_0x.col.emb absolute address)
?#EMM (rendering offset, OBJ RL to rendering offset)
?#EMB2 (DDS1’ RL, length, DDS2’s RL, length, DDS3’s RL, length, DDS4’s RL, length
??DDS1
??DDS2
??DDS3
??DDS4
? XXX_0x_0x.obj.emm + xxx_0x_0x.col.emb
ill try to come up with a short explanation in a bit.
updated left out an important part about changing the EMM file…
Ok, so I’ll try to make this as simple as possible, it could get a little complicated if you add a lot of things.
RL= relative location
Lenth= absolute ending - absolute beginning
relative location= absolute beginning - current location
I’m using KEN_01_01.col.emz as an example.
First take a look at the beginning of the file. at offset 0x00000020 is where we will start (all files start the same way)
http://img199.imageshack.us/img199/135/ken1e.jpg
The first 4 blocks refer to EMM’s RL, the next for blocks refer to the length of EMM.
next for is emb2 RL, and the next 4, its length.
after that you have the absolute locations of XXX_0X_0X.obj.emm and XXX_0X_0X.col.emb respectively.
So, to test how this works first, we’ll go to beginning of emb2.
All the data located in the EMB’s are in reverse
At offset 0x00000028 is the location of EMB2.
69870000 becomes 00008769 (8769)
From offset 0x00000028 (the 68 in the pic above) jump to 8768,
relative to the current location, which should bring you to the next picture.:d:
http://img132.imageshack.us/img132/9027/ken2f.jpg
Now this is the second emb, which gives the locations and lengths of the 4 DDS files (some col files may have less)
now go back to the top and take a look at the XXX_0X_0X absolute locations.
these always start from the beginning, instead of current location.
So if we jump to 15DFC0, you’ll come to the pic below:d:
http://img132.imageshack.us/img132/4906/ken3.jpg
#EMM also holds the information of every objects RL to the rendering offset:d:
18 is the rendering offset (0x00000050)
64000000 is the RL of teeth to offset 0x00000050
00000530 would be the RL of tongue to offset 0x00000050
so on and so on…
http://img39.imageshack.us/img39/4609/ken8q.jpg
So finally lets add something. search for obi. We’re going to add alphatest to the end of obi’s settings.
http://img132.imageshack.us/img132/3179/ken4.jpg
The last setting of obi is TextureFilter0, so i’ll insert the hex for alphatest after that.
http://img132.imageshack.us/img132/5509/ken5.jpg
So now that we added alphatest to obi, everything below has been shifted. But there are only 5 things we need to changed:
[LIST=1]
[]Emm’s length
[]obj RL location to rendering offset
[]EMB2’s RL
[]XXX_0X_0X.obj.emm’s absolute location
[*]XXX_0X_0X.col.emb’s absolute location
[/LIST]
So we go back to the top:d:
http://img132.imageshack.us/img132/9738/ken6j.jpg
(all new values highlight in red)
Emm’s new length is 876C.
since we have to reverse it, we enter this as 6C 87
We also have to edit the obj RL to the rendering offset 0x00000050(all the the objects located past obi)
http://img39.imageshack.us/img39/6601/ken9d.jpg
If you use a program like winhex, you can select all the offsets that need to be change and press ctrl-t and enter the size you added to the emm file, in this example 28, (hexadec box checked, 32bit unsigned) and be done with it.
but if not, you have calculate and edit the new RL of every 4 blocks by yourself.
here are the changes listed below:d:
2F28+28=2F50
341C+28=3444
etc
http://img39.imageshack.us/img39/7712/ken10l.jpg
Since EMM’s length changed, EMB2’s RL has changed:
the new absolute location is 87b8
87B8-28= 8790, which is EMB2’s new relative location. Entered as 90 87
and last the absolute location for the absolute locations for obj.emm, and col.emb
which are just at the end of the file.
Note: in this tutorial, the DDS files remain untouched, because they are within the EMB2 and are relative to that only. If your were to edit one of the DDS files and infuse them, then you would have to edit the DDS’s RL and length accordingly.
Note2: Infuser will cut dds files if they are bigger than the original, the only way so far to put larger files back into the emz is to copy and paste them in (in your hex editor)
note3: The cos file is structure the same way also, if thats any help to modeling…
Nice explanation sn00pee, filesize changes seems very easy now after reading your guide.
I got pretty close to figuring out all the header info before, but I guess I was looking at it the wrong way.
I suppose this is something that piecemontee could use, so his tool could import models with more verts (= adding stuff, more detailed models, higher textures).
for the sake of making the game models more easily skinnable (less protruding objects = more possibilities, more ‘skin’ = mod friendly) I experimented with c viper.
b/c we cant add/delete vertices I thought taking a cluster of vertices that i didnt want (e.g. jacket back) and flattening them into a single ‘point’ by flattening their x,y and z axis. I thought it would work but as you can see in the picture it responds to movement and waves around like it does in the game. Then i tried moving this ‘point’ of all smooshed vertices i didnt want and moving them offscreen, but that didnt work either (rotates around vipers core, flys around screen, and is huge.
http://dl.getdropbox.com/u/377246/c%20viper%20modelinha%20mod.png
another thing i want to fix before release is the ‘darkness’ area thats already on the 3d models. i thought it was the alpha in the cos file making those ‘dirty’ areas dark, but i cleaned them up and i still get darkness (on vipers chest and forearm its an issue)
I try not to resort to making a cos file that breaks other skins, but im not sure how to solve my first problem without doing the alphachannel method.
anyone got any ideas?
Verts have to be deleted for the jacket to be invisible, or the animations must be disabled (i nearly got it done this way, moving the jacket up and disabling it’s animations)
Why not use the Alpha method in a COL file?
Simple tryout:
http://thumbnails9.imagebam.com/4493/1a304044925890.gif http://thumbnails2.imagebam.com/4493/28681144925892.gif
This was done by editing the COL file only.
I hex-edited AlphaTest into the jackedUnder block and added a simple alpha channel in the DDS file.
Semi-trans alpha channel is not possible for jackedUnder, because that DDS file is DXT1 (1-bit alpha channel only).
An ambiant (occlusion) term is embeded in the vertex stream, actually this is what gives the model some volume in my viewer as i added no lighting.
It would be possible to extract/inject this along with textcoords/normals but wavefront .obj format does not support this so I must switch to another, perhaps 3DS
ok, I’ve exported a model from a cos file using piecemontee’s tool. I added “.obj” and moved some vertices around in Misfit. I went to import the model back in and the ‘inject’ option is grayed out. I’m using piecemonteeSF4explorerV0.1.exe. Is there a newer version that I should be using? If so, could someone mirror it in a location other than gamevixen (I don’t have an account there)
yes there is a newer version on gamevixen
http://www.gamevixenzone.com/gvz/viewtopic.php?p=27298#p27298
alt download
thanks sn00pee. I appreciate that alt download!
edited the tutorial for larger emz files, left out some important info pertaining to editting the EMM…