SUBSIM Radio Room Forums
Mods and files for every subsim!

SUBSIM: The Web's #1 BBS for all submarine and naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH5 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 10-01-2011, 09:01 PM   #46
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,994
Downloads: 146
Uploads: 5


Default

Quote:
Originally Posted by privateer View Post
Anvart has broken the CRC issue by the way.


$150?
Commercial is $129.95 and the Upgrade/Maintenance is $39.95 for commercial.
How did you get a $150.00 figure?
You're right it was $129.95

Ran into a stumbling block with the materials. If a material has no texture but has maps defined I can't find a hack to continue on I can fully read materials with textures and without but these that have maps defined introduce some bytes that I can't figure out.
TheDarkWraith is offline   Reply With Quote
Old 10-01-2011, 09:03 PM   #47
Madox58
Navy Seal
 
Join Date: Dec 2006
Location: Los Angeles
Posts: 9,578
Downloads: 72
Uploads: 12
Default

Quote:
Originally Posted by TheDarkWraith View Post
You're right it was $129.95

Ran into a stumbling block with the materials. If a material has no texture but has maps defined I can't find a hack to continue on
What GR2 are you looking at that causes the issue?
And I take it the animations issue was solved about the AirCraft stuff?
Madox58 is offline   Reply With Quote
Old 10-01-2011, 09:04 PM   #48
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,994
Downloads: 146
Uploads: 5


Default

Quote:
Originally Posted by privateer View Post
What GR2 are you looking at that causes the issue?
Junkers_Ju-88_B. I'll send the revised template so you can see for yourself.

The struct MATERIAL_EXTENDED_DATA_WITH_TEXTURE matextdatawithtexture[2] should actually be struct MATERIAL_EXTENDED_DATA_WITHOUT_TEXTURE matextdatawithtexture[2]. Since that one is screwed up everything following it is messed up.
TheDarkWraith is offline   Reply With Quote
Old 10-01-2011, 09:07 PM   #49
Madox58
Navy Seal
 
Join Date: Dec 2006
Location: Los Angeles
Posts: 9,578
Downloads: 72
Uploads: 12
Default

Stupid AirCraft!!
What section in the GrannyViewer?
Sorry to be so slow today but I'm on some major meds for pain right now.
Brain is not working very well.
Madox58 is offline   Reply With Quote
Old 10-01-2011, 09:14 PM   #50
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,994
Downloads: 146
Uploads: 5


Default

Quote:
Originally Posted by privateer View Post
Stupid AirCraft!!
What section in the GrannyViewer?
Sorry to be so slow today but I'm on some major meds for pain right now.
Brain is not working very well.
I sent you a PM with the info. I haven't added the typedef for map yet (it will be a typedef of the without texture structure just to make it easier to read in editor)....
TheDarkWraith is offline   Reply With Quote
Old 10-01-2011, 09:22 PM   #51
Madox58
Navy Seal
 
Join Date: Dec 2006
Location: Los Angeles
Posts: 9,578
Downloads: 72
Uploads: 12
Default

Got it.
I hope you understand my jest in the return PM.

I'm not a drug user so the pain meds are REALLY giving me a good time right about now.
And Pink Floyd won't turn down the light show!!
Madox58 is offline   Reply With Quote
Old 10-01-2011, 09:24 PM   #52
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,994
Downloads: 146
Uploads: 5


Default

Quote:
Originally Posted by privateer View Post
Got it.
I hope you understand my jest in the return PM.

I'm not a drug user so the pain meds are REALLY giving me a good time right about now.
Sure did. It was the prop not the glass.
We need to update the template with Anvart's findings and anyone else's findings for that matter. We could have a community made gr2 map

You'll see the hack I'm using to get the materials. If we can remove the hack and read the data correctly then it will probably solve the problem.

I'm only 792 bytes away from the bones (in fact I'm closer once this little issue is sorted)

Last edited by TheDarkWraith; 10-01-2011 at 09:46 PM.
TheDarkWraith is offline   Reply With Quote
Old 10-01-2011, 10:09 PM   #53
Madox58
Navy Seal
 
Join Date: Dec 2006
Location: Los Angeles
Posts: 9,578
Downloads: 72
Uploads: 12
Default

I have to go lay down or something.
There's this little goofy guy that keeps bugging me and I'm not sure if it's one of my Cats or a figmnet of my imgination due to the pain meds.

If I've offended anyone today?
At least I can blame it on the drugs this time.

Most of the time it's just me being an arse.


Regards all!
I'm off to the never ending light show for tonight!!
Madox58 is offline   Reply With Quote
Old 10-02-2011, 02:19 AM   #54
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,994
Downloads: 146
Uploads: 5


Default

that revised template file has more issues with the materials. Tried in on a another battleship and it's all hosed. Good thing is I have corrected some of it (had to make some new structs) but now I have to figure out the layout with multiple maps. Those mysterious bytes I figured out what they were.
TheDarkWraith is offline   Reply With Quote
Old 10-02-2011, 05:34 AM   #55
Alex
Dominant Wolf
 
Join Date: Nov 2006
Posts: 2,143
Downloads: 30
Uploads: 0
Default

@ Privateer :




@ TheDarkWraith : Not hijacking your thread, just making some fun of J, hehe.
__________________
Alex is offline   Reply With Quote
Old 10-02-2011, 09:49 AM   #56
JU_88
Ocean Warrior
 
Join Date: Jan 2006
Location: UK
Posts: 3,144
Downloads: 6
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith View Post
Junkers_Ju-88_B. I'll send the revised template so you can see for yourself.

The struct MATERIAL_EXTENDED_DATA_WITH_TEXTURE matextdatawithtexture[2] should actually be struct MATERIAL_EXTENDED_DATA_WITHOUT_TEXTURE matextdatawithtexture[2]. Since that one is screwed up everything following it is messed up.
If later down the line you would like proper JU-88A and JU-188 models rather than that stock JU88/188 mashup, just drop me a PM as I have them ready to go, no pressure or anything though,
__________________
"Derpy Derp Derpity Derp.... I like cheese."
JU_88 is offline   Reply With Quote
Old 10-02-2011, 05:24 PM   #57
Madox58
Navy Seal
 
Join Date: Dec 2006
Location: Los Angeles
Posts: 9,578
Downloads: 72
Uploads: 12
Default

Feeling a bit better today so I looked at the problem.
I see what's going on but I'll wait for an upgraded template from you as you seem to see the problem also.

I did add Anvarts fixes to the last copy you sent me.
It's some fixes to the crap I had, changed floats and such to UINT.
Also a better check on if it's a valid GR2 loaded.


To stay in safe areas with RAD, it's better that we keep the Templates between the 3 of us for now.
I'd hate to see a release that would allow just anyone to work just any GR2 files out there!
That's not my goal by any means.
And to do so will most probably get a demand to stop from RAD.

If we reach a level where a Hard coded Tool can be created?
We can add a check that searchs out the paths used for textures as one way to contain it to SH5 GR2 files only.

We have a temporary OK to mess with the GR2 files at this time.
If We screw up and don't work in good faith with RAD?
That can and probably would be withdrawn!
Madox58 is offline   Reply With Quote
Old 10-10-2011, 09:43 PM   #58
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,994
Downloads: 146
Uploads: 5


Default

started recoding the app so as to not use the granny2.dll. It can currently read the fileheader, infoheader, sections, and art tool info. It can also successfully write them back to the file along with all the pointers needed for them (major accomplishment). I just started decoding how the skeleton(s), bone(s), and model(s) sections are laid out in the GR2 files. I figured out all the pointers and how they work for those items now I just have to code it.
All in all the GR2 file is not overly difficult to 'read'. If you remember that everything is laid out in sections and pointers are used to access those sections (and more pointers are used for items in the section) then you can successfully 'read' it. It just gets very confusing when you have a pointer referencing another pointer that can possibly reference another pointer.
~95% of the pointers are located at the end of the file.

Those pointers have the following configuration (from what I've seen so far):
first 4 bytes: offset in section (from start of section). This usually points to a value, a place for a pointer to go, or start of something (bone, model, skeleton, etc.)
second 4 bytes: seems to be some kind of description/identifier/accessor. Usually this value is 0x0. Have seen it be 0x6 but don't know what that value means
third 4 bytes: offset in section (from start of section). This usually points to text (Strings). Can point to start of something (bone, model, skeleton, etc.)

If you use privateer's template file for 010 editor you can get the start of the pointers from SectionInfo[0] Long Another_Pointer (has comment of 'Will explain at a later date').

If you don't use the 010 editor then the pointer address (start of the pointers) can be found at 0x84 in almost all of SH5's GR2 files.

I recommend using the 1X1_version01.GR2 file located in \data\Library\Patch_1x1 for investigating/mapping out the GR2 format. It's a 'simple' GR2 file to read. If you use that file then the start of the pointers is at 0x2EC0.

I was updating the GR2 template file for 010 editor with this information but it became too complicated to do. Even if I were to successfully update the template file I would have to turn around and take that 'code' and recode it for C#. In the end it was easier to just write everything in C#.
TheDarkWraith is offline   Reply With Quote
Old 10-11-2011, 07:59 AM   #59
tonschk
Sea Lord
 
Join Date: Mar 2007
Location: London
Posts: 1,814
Downloads: 171
Uploads: 0
Default

Quote:
Originally Posted by Echolot View Post
TheDarkWraith

Privateer

Subsim community

Great.


tonschk is offline   Reply With Quote
Old 10-11-2011, 12:32 PM   #60
Anvart
Admiral
 
Join Date: Jan 2006
Location: Russia ®
Posts: 2,354
Downloads: 65
Uploads: 1
Quote:
Originally Posted by TheDarkWraith View Post
...
~95% of the pointers are located at the end of the file.

Those pointers have the following configuration...
first 4 bytes: offset in section (from start of section). This usually points to a value, a place for a pointer to go, or start of something (bone, model, skeleton, etc.)
second 4 bytes: seems to be some kind of description/identifier/accessor. Usually this value is 0x0. Have seen it be 0x6 but don't know what that value means
third 4 bytes: offset in section (from start of section). This usually points to text (Strings). Can point to start of something (bone, model, skeleton, etc.)
...

You did not write anything new ...
Where full template of parsing?
...
I agree, it's easier at once to write code in C ... C#...
but the template will help to other modders (programmers) to write better code... may be...
__________________
Alex ®

Last edited by Anvart; 10-11-2011 at 01:00 PM.
Anvart is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 07:39 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © 1997- 2017 Subsim