Sparagas

Member

User avatar

Posts: 103

Joined: Feb 17, 2014

Yet another way to export 3D models

Post by Sparagas on Thu Feb 18, 2016 9:49 am

While we a are waiting for Mr. Charles MacDonald's (simply known in the forums as CharlesM) model viewer, I was a little bit impatient and anxious, what we still can't see Silent Hill town's 3D models (except Charles, but he doesn't share his work)

So I said "what the heck - I'll do it myself". In theory it's very simple - I knew that meshes files (3D objects in programming language) are simply made of vertexes and faces coordinates, and UV maps (coordinates for textures to wrap meshes)

No mater what format file is - the basics are all the same. It's that it's written a little bit different. So what we have to do, is just understand how Silent Hill meshes files ar written and translate thous coordinates to more readable format like .obj or make a model viewer like Mr. Charles MacDonald is doing.

So we need:
1) pure uncompressed and extracted Silent Hill meshes files
2) Hex editor
3) ????
4) profit

Fortunately Silent Hill extractor is already made, so you can extract your game files (I sugest to download SH1 Modding Pack witch includes already extracted files, an Hex editor and programs to view .TIM files (PSX default textures))

Now let's look at your extracted file list:
Image

    1ST - all pictures and info, when your game loads (hence "the first" name)
    ANIM - all animations is here
    BG - all background's (like town, doors, walls, cars, trees) textures are meshes
    CHARA - all characters, enemies, boses etc. textures and meshes
    ITEM - all items like guns, ammo, keys textures and meshes

    MISC - miscellaneous - don't know whats inside
    SND - sounds, but don't know more about it
    TEST - all textures and meshes from the very beginning and creating this game. It should not be used in the final game. (you can call it Alpha stuff). I don't know why they leave it, but it's interesting too see how it all began.
    TIM - all pictures from "close up" when you look at something, like bird cage, dog house "go to school" on the ground etc.
    VIN - don't know, but it seems it is related to maps? If you look in file with hex editor or wordpad you can see text used in game
    XA - I have no idea that this is

So our target is BG, CHARA and ITEM folders
Every object have texture file (.TIM) and mesh file

Lets look at example:
Image

This is Kaufman's texture and mesh file. You can open texture file with your favorite tim viewer program and edit export etc. (I have successfully edited textures and put them back in the game, but that's for another time)

Image

But the problem is mesh files, because they are in house format, so no program can open it, because it don't understand where vertex, faces and UV coordinates are held.
So we have to manually detect where it is held with your favorite hex editor. And when we do - to write a code, that can show, or export to other known formats like .obj

That's the hard part... fortunately after extensive hours searching on the web, I have found a shortcut, so called "3) ????"

Itroducing:

Universal 3D models extraction program!

Image

an hex2obj program made by M-M-M-Monster veteran from xentax forums!

Now hold your horses - it's still not one miracle button extraction. You still need to locate coordinates info with hex editor and put required info in the program. So you still need to know hex wizardry and other 3D programming stuff.

Unfortunately this stuff is a little bit too complicated for me, so I wrote this post, so anyone who can understand this stuff, could carry on with this amazing program.

I suggest everyone to download the program. It comes with tutorial and example file. If you make through tutorial, and understand what you did - congrats! Silent Hill community needs you solder!

It is very hard to locate where coordinates are located in the file, so where will be a lot of try and errors. So the more people will work on it - the bigger chance it is to find it.

I suggest working on more simple object. But what object is the most simple? I think it is FLAUROS from ITEM folder - it's just a simple pyramid shape object

Image

Flauros in hex editor
Image

This is the WHOLE flauros code, and as you can see it's very simple. and in here somewhere is the key to unlocking the code to Silent Hill's 3D models

Flauros is everything!
Let's make SILENT HILL just PLAIN SCREAM
 
 
 
 
 

crewsjp8

User avatar

Posts: 47

Joined: May 02, 2014

Yet another way to export 3D models

Post by crewsjp8 on Sun Feb 21, 2016 5:11 pm

Hey that's a pretty nice find! I'm glad people are still interested in modding silent hill. I would still love to see how to edit textures and successfully run the game with edited textures. Anyways, i'm gonna try and get in touch with some people who know hex editing a bit more.

Also, sorry I haven't been contributing as much to the forum, i'm sure I could find more stuff to help modify the game but iv'e been busy with art and animation. I've also been working on a music track made strictly with instrument samples from silent hill 1 and i'm almost finished.

So, I'll try to see what i can do to help out, until then, have fun cracking the game! :flauros:
 
 
 
 
 
 

PaulSilentin

Member

User avatar

Posts: 154

Joined: May 01, 2014

Yet another way to export 3D models

Post by PaulSilentin on Tue Feb 23, 2016 12:18 am

Not so easy. They were trying to research it here without results.: http://forum.xentax.com/viewtopic.php?f=16&t=10812
 
 
 
 
 

roocker666

Member

Posts: 50

Joined: Aug 19, 2017

Yet another way to export 3D models

Post by roocker666 on Sun Sep 24, 2017 2:52 am

I was looking inside Cybil model(SYBIL.ILM) with an Hex editor and I found something interesting:

**The red area is the key to solve this shit. Now, as you can see, on the right are the names of the body parts:
"01CHEST_.66.¼..."
"02HEAD1.....Ü..."
"02NECK...;;.H..."
"03LSHOUL.&&....."
Image


**Lets go to part number "06LGUN......¬0.." This is the "left gun" object for Cybil. Copy Hex values AC 30( this is "¬0" on the right body parts list)
REVEAL SPOILER
Image



**Now press Ctrl + F to make a search, In the option: "Search for:" paste copied values AC 30, in "Datatype:" select Hex-values and click "OK"
REVEAL SPOILER
Image


**Press F3 to find the next AC 30, now you are in Offset 00002E90, scroll down a little and you will see Offset 000030C0, look to the right and you will find "X3.." That is the next body part! "10RHAND..66.X3.."(Cybil's Right hand)
Image

The Blue area is all the code for a gun(left gun in this case), the green area is the next body part(Right Hand). You can identify all body parts with this method, maybe this helps in using hex2obj. I did not find the chest part: 01CHEST_.66.¼... I don't know why. I think it's at the end of the file but I'm not sure.

Check this list that I made(This is only for Cybil model ".SYBIL.ILM"):
REVEAL SPOILER
Image
 
 
 
 
 
 

Sparagas

Member

User avatar

Posts: 103

Joined: Feb 17, 2014

Yet another way to export 3D models

Post by Sparagas on Sun Sep 24, 2017 6:17 am

Nice find! unfortunately not everything what you said is correct.
I opened SYBIL.ILM ant played with it a little.
First lets see the namings:
as I mentioned in my other post SYBIL is the link to texture file. I replaced it with HERO, and it changed textures to Harry's (unfortunately, not cleanly)
Then comes mesh info:

REVEAL SPOILER
DDNNNNNN01XX01YY00

DD is some kind of digit, like 01, 07 11 etc. Don't know what that means
NNNNNN is the name of the model, like HEAD__, CHEST_ (They are always made from 6 letters)
when always comes 01
after that comes uknown XX (rotation?)
when always 01 again
when YY (we think this is link to mesh it self?)
and at the end it is always 00, to seperate one name from another
in total we have 16 symbols - very logical for HEX system

First I tried to change YY values (that roocker666 mentioned). When I changed values in it to random thing or lets say everything to HEAD value, the changed mesh just dissapeard:

REVEAL SPOILER
changed every mesh YY value - she is invisible:
Image
Image

changed only HEAD YY value - head invisible
Image

So it doesn't look like a link to a model.
When my attention went to XX values. Originally I thought it is rotation values, so I changed every XX value to 36 36 (66):

REVEAL SPOILER
Image
Image

The model got distorted, and it's a little bit funny to see that it got attached to HARRY. But the main question. Why? Why it got attached to Harry?

Also I checked YY values in file deeper, because I don't think they are links to models. And the main reason - sequence.
You see in the beginning it is written:

REVEAL SPOILER
Code: Select all
,...¤... SIBYL...
........ ........
01CHEST_ .66.¼...
02HEAD1. ....Ü...
02NECK.. .;;.H...
03LSHOUL .&&.....
04LJOU.. ....Ü...
05LZEN.. ."".(...
07RSHOUL .00.¼...
08RJOU.. ........
09RZEN.. .,,.Ō...
11HIP2_T ....h...
11HIP_TC ....č...
11HOLDER ....x"..
12LMOMO. .... $..
13LSUNE. .....%..
14LFOOT. .  .t'..
15RMOMO. ....P)..
16RSUNE. ....Č*..
17RFOOT. .  .¤,..
06LHAND. .66.€...
06LGUN.. ....¬0..
10RHAND. .66.X3..
10RGUN.. .66.„5..

So logically thinking we would assume that the first model inside file should be CHEST_, but when we try to find Ü. - a teoretical link to HEAD1 model by roocker666, we see that it's actually the very first:

Image

Shouldn't it be CHEST model first? Somethings not right. So I decided to just delete a bunch of data to see what part disappeared - head or chest

Image

This is the result:

REVEAL SPOILER
Image
Image

As we can see CHEST began to disapear and not HEAD, so unfortunately YY values are not links to models, and have nothing to do with it.

When I tried to change every name to 02HEAD1 to see if will repalce every part with HEAD model. This is the result:
REVEAL SPOILER
Image
Sure Cybil... You look alright...

Image

Unfortunately it doesn't replaced everything with HEAD model, but everything got out of a place.
When I tried to change everything to only HEAD, and leave original digits intact:

REVEAL SPOILER
Image
Image


It looks completely normal. so 6 symbol name doesn't do anything. How about 2 digits in front? I changed every one to 01 (CHEST)

REVEAL SPOILER
Image
Image

It looks very similar to 02 (HEAD), but lower... Wait, do you mean? Lets find out - now I used 11 (HIP)

REVEAL SPOILER
Image
Image


Yes! As you can see in HEAD modification, every mesh part went to top, on CHEST went in middle, and in HIP it went lowest, so that means that two DD digits are location of particular mesh to the global model. First every Cybil part got located to HEAD location, when to Chest location, when to Hip location

EDIT: It seems that XX are always the same symbol. Also maybe XX and YY are not the links to the models, but they still got something to do with it, because if you change it - it got's distorted
Let's make SILENT HILL just PLAIN SCREAM
 
 
 
 
 

roocker666

Member

Posts: 50

Joined: Aug 19, 2017

Yet another way to export 3D models

Post by roocker666 on Sun Sep 24, 2017 2:34 pm

That is right, first digits are for locations on global model(01,02,03), the name part(CHEST, BODY, HEAD), 01XX01(I don't know what is that), YY(link to the object) and separators (..)

You can't put random values in YY because that is the link to the objects. If you look the object code, you will find YY at the beginning of the object code. For example: 16RSUNE.....È*..

Object code:
È*..+dÀ."O..+O.....ÿ.....AÀ."A...O"O.........AÀ..O...D.O.........OÀ..O...g.g.........KÀ..D...O.O.........OÀ..g...O.f.........OÀ."O...f+d........"AÀ.+D.."O+O.........OÀ..f...O.g........+DÀ.7J..+O7O........+OÀ.7O..+d7b.........OÀ..O...D.K..........P...Y.õÿS.ðÿX.þÿX.............íÿ..ðÿ .......ûÿ..÷ÿóÿíÿñÿ..ñÿ......‘ë8.¥î«.hòD.öï|.Wð§.•ì@.ˆöÝ.ûí|.fóG.Xó§.Áñ”.....à*...,..H,..h,..

REVEAL SPOILER
Image
 
 
 
 
 
 

Sparagas

Member

User avatar

Posts: 103

Joined: Feb 17, 2014

Yet another way to export 3D models

Post by Sparagas on Sun Sep 24, 2017 3:40 pm

You can't put random values in YY because that is the link to the objects. If you look the object code, you will find YY at the beginning of the object code.


I didn't put random values, I put value from HEAD (Ü.) on every YY value on the beginning. But Cybil in game was invisible. (If I remember correctly). Shouldn't it be all models replaced with head mesh?

Also as you have seen in my earlier post, I deleted code after Ü. sign (witch links to HEAD in the beginning), but CHEST mesh was effected.

I will play a little bit more...
Let's make SILENT HILL just PLAIN SCREAM
 
 
 
 
 

roocker666

Member

Posts: 50

Joined: Aug 19, 2017

Yet another way to export 3D models

Post by roocker666 on Sun Sep 24, 2017 4:00 pm

Oh sorry, I did not notice that. Maybe you only can use one model once, if you repeat a model they disappear or cause more glitches.
 
 
 
 
 
 

Sparagas

Member

User avatar

Posts: 103

Joined: Feb 17, 2014

Yet another way to export 3D models

Post by Sparagas on Sun Sep 24, 2017 4:49 pm

OK I tired to replace YY value INSIDE.

This is original:
Image

This is replaced:
Image

I replaced HEAD YY value with CHEST YY value, and... It did nothing. Cybil still looks normal.
I don't think this is a link to a model. I think this is just a coincident.
I think models should go in sequence from first to last. Because CHEST is mentioned first, the chest model should go first
Let's make SILENT HILL just PLAIN SCREAM
 
 
 
 
 

roocker666

Member

Posts: 50

Joined: Aug 19, 2017

Yet another way to export 3D models

Post by roocker666 on Sun Sep 24, 2017 5:41 pm

I did this: HEAD and LFOOT with same value DC 05(Ü.), The result: HEAD and LFOOT invisible.
REVEAL SPOILER
Image



Now this: HEAD with 00 00 (empty) values and LFOOT with DC 05(Ü.)
REVEAL SPOILER
Image


The result: Head is in her left foot
REVEAL SPOILER
Image
 
 
 
 
 
 

Sparagas

Member

User avatar

Posts: 103

Joined: Feb 17, 2014

Yet another way to export 3D models

Post by Sparagas on Sun Sep 24, 2017 5:56 pm

Maybe you only can use one model once

Hmm... maybe... let's find out:

Swiched HEAD and CHEST places:

REVEAL SPOILER
Original:
Image

Switched places:
Image

Result:
REVEAL SPOILER
Image

Image

it's messed up (and attached to Harry again), but if you look closely, you can see that CHEST is top, and Face is in the chest area.
So yeah - maybe somehow they are links to models
Let's make SILENT HILL just PLAIN SCREAM
 
 
 
 
 

roocker666

Member

Posts: 50

Joined: Aug 19, 2017

Yet another way to export 3D models

Post by roocker666 on Sun Sep 24, 2017 6:20 pm

Well, We could say that. Now, what is 01XX01? it's curious to see same value in XX, for example: 01""""01, 01%%01, 016601, 01;;01
 
 
 
 
 
 

Sparagas

Member

User avatar

Posts: 103

Joined: Feb 17, 2014

Yet another way to export 3D models

Post by Sparagas on Sun Sep 24, 2017 6:22 pm

Ok, I did the same, but this time switched not only YY values, but also XX values:

REVEAL SPOILER
Image

Image

Still messed up, but A LOT better! Now you can see clearly the HEAD part and CHEST part. And we can confirm that they switched places.
So looks like XX and YY should be used together, and in fact they are links to models

UPDATE:

Ok, just to be clear, I quickly changed XX values ONLY:

REVEAL SPOILER
Image

Image

Messed up, but at least, not attached to Harry

UPDATE 2:

What if I also switch DD values? In theory Cybil should be normal, because we switched places not only models, but coordinates also. so I switched DD XX and YY values:

REVEAL SPOILER
Image

Image

Close enough! HEAD is normal, but CHEST is still attached to Harry. But... If you look closely, you can see that it is attached exactly on Harry's Chest! And You said you didn't find link to CHEST part, so maybe it is linked directly to Harry's Chest?

UPDATE 3:

Ok, I tried to switch HEAD and RHAND, to see if we can avoid sticking to Harry (XX and YY values only)

REVEAL SPOILER
Image

Image

Nope - hand is still stretched to Harry, but Head is normally sitting in her hand place (CHEST got a little distorted too - I guess from trying to connect with head)

UPDATE 4:

Ok, now I switched XX YY AND DD values for HEAD, and RHAND. In theory They should go to old places and be normal:

REVEAL SPOILER
Image

Image

They are back to old places, but with artifacts,,, Interesting...
Let's make SILENT HILL just PLAIN SCREAM
 
 
 
 
 

roocker666

Member

Posts: 50

Joined: Aug 19, 2017

Yet another way to export 3D models

Post by roocker666 on Sun Sep 24, 2017 7:01 pm

I see, XX and YY need to be together. I did not find CHEST code but that is not the strange thing... I opened Kaufman ILM and the first object is: Left Hand(06LHAND). I searched for 06LHAND YY code(Ì.) but is missing like CHEST in Cybil and I think that happens with all characters, the first object code is always missing, Why??, I don't know...

I wonder if We can switch heads, for example Cybil's head to Harry's head, but you need to replace the head code, XX and YY, the problem will be the textures but I will do that later to see what happens hahahaha. Thanks for your research and comments!
 
 
 
 
 
 

Sparagas

Member

User avatar

Posts: 103

Joined: Feb 17, 2014

Yet another way to export 3D models

Post by Sparagas on Sun Sep 24, 2017 7:22 pm

I see, XX and YY need to be together. I did not find CHEST code but that is not the strange thing... I opened Kaufman ILM and the first object is: Left Hand(06LHAND). I searched for 06LHAND YY code(Ì.) but is missing like CHEST in Cybil and I think that happens with all characters, the first object code is always missing, Why??, I don't know...


I just looked at old photos of SH Model Viewer by CharlieM (unfortunately dead project, and he never published his work)

Found Cybil model and looked closely at mesh order. It actually corresponds to sequence in file: chest first, head second, neck third... left gun, right hand, and lastly right gun. 22 Objects, and all in right sequence. So this photo is actually .ILM files visualization

Kaufmans first mesh is LHAND? Well in this photo it certainly looks like first mesh also.

Theory confirmed
Let's make SILENT HILL just PLAIN SCREAM
 
 
 
 
 

Sparagas

Member

User avatar

Posts: 103

Joined: Feb 17, 2014

Yet another way to export 3D models

Post by Sparagas on Sun Sep 24, 2017 7:59 pm

Sorry for spamming - this is my last post, going to bed :)

REVEAL SPOILER
Code: Select all
,...¤... SIBYL...
........ ........
01CHEST_ .66.¼...
02HEAD1. ....Ü...
02NECK.. .;;.H...
03LSHOUL .&&.....
04LJOU.. ....Ü...
05LZEN.. ."".(...
07RSHOUL .00.¼...
08RJOU.. ........
09RZEN.. .,,.Ō...
11HIP2_T ....h...
11HIP_TC ....č...
11HOLDER ....x"..
12LMOMO. .... $..
13LSUNE. .....%..
14LFOOT. .  .t'..
15RMOMO. ....P)..
16RSUNE. ....Č*..
17RFOOT. .  .¤,..
06LHAND. .66.€...
06LGUN.. ....¬0..
10RHAND. .66.X3..
10RGUN.. .66.„5..


Remember when I wrote, that when I removed some part of code after DC 05 (Ü.) in code, witch should link to HEAD, but CHEST parts were removed?
After seeing the CralieM old photos, I had one idea, and tried it with next mesh. Found 48 11 (H.), witch should link to NECK but... HEAD parts were removed!

Image

Image

Image

So it looks like You roocker666 are correct, and YY are links (and maybe XX), but weirdly, all the links are skewed by one name!

So CHEST model is DC 05 (Ü.)
HEAD1 is 48 11 (H.) etc...
WEIRD!
Let's make SILENT HILL just PLAIN SCREAM
 
 
 
 
 

belek666

Posts: 22

Joined: Feb 18, 2012

Yet another way to export 3D models

Post by belek666 on Thu Sep 28, 2017 11:02 am

Hi
As for numbers DDNNNNNN01XX01YY00 - YY00 looks like data offset in little endian format, e.g. (SIBYL.ILM)

Code: Select all
30 31 43 48 45 53 54 5F 01 36 36 01 BC 01 00 00    01CHEST_.66.Ľ...

data offset for 01CHEST will be 000001BC and data starts at:

Image

Tested it by editing but sill no success in changing with parts from other files.
 
 
 
 
 
 

MajiBN

Posts: 2

Joined: Sep 28, 2017

Yet another way to export 3D models

Post by MajiBN on Thu Sep 28, 2017 7:37 pm

:shrug
Last edited by MajiBN on Sun Oct 29, 2017 5:27 pm.
 
 
 
 
 
 

roocker666

Member

Posts: 50

Joined: Aug 19, 2017

Yet another way to export 3D models

Post by roocker666 on Thu Sep 28, 2017 8:30 pm

MajiBN wrote:Awesome guys great found.
I try to do the same with some effort
then here my result, transfer harry to cybil but still not correcte

Image

Image


That is great!, hahahaha, How did you change the heads?
 
 
 
 
 
 

Sparagas

Member

User avatar

Posts: 103

Joined: Feb 17, 2014

Yet another way to export 3D models

Post by Sparagas on Fri Sep 29, 2017 8:05 am

belek666 wrote:Hi
As for numbers DDNNNNNN01XX01YY00 - YY00 looks like data offset in little endian format, e.g. (SIBYL.ILM)

Code: Select all
30 31 43 48 45 53 54 5F 01 36 36 01 BC 01 00 00     01CHEST_.66.Ľ...

data offset for 01CHEST will be 000001BC and data starts at:

Image

Tested it by editing but sill no success in changing with parts from other files.


Interesting idea, but it's not true. If we pick 10RHAND, by you the offset should be 58 33. But there is no 58 33 offset in SIBYL.ILM

Code: Select all
31 30 52 48 41 4E 44 00 01 36 36 01 58 33 00 00      10RHAND..66.X3..

Oh sorry, for some reason you used only the first Y value and not both YY values, so it should be 58. here it's location:

Image

definatelly not correct
Let's make SILENT HILL just PLAIN SCREAM
 
 
 
Next


Return to Silent Hill1 Modding



Who is online

Users browsing this forum: No registered users and 1 guest

cron