SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & 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-11, 08:01 PM   #46
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
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-11, 08:03 PM   #47
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
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?
  Reply With Quote
Old 10-01-11, 08:04 PM   #48
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
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-11, 08:07 PM   #49
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
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.
  Reply With Quote
Old 10-01-11, 08:14 PM   #50
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
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-11, 08:22 PM   #51
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
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!!
  Reply With Quote
Old 10-01-11, 08:24 PM   #52
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
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-11 at 08:46 PM.
TheDarkWraith is offline   Reply With Quote
Old 10-01-11, 09:09 PM   #53
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
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!!
  Reply With Quote
Old 10-02-11, 01:19 AM   #54
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
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-11, 04: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-11, 08:49 AM   #56
JU_88
Silent Hunter
 
Join Date: Jan 2006
Location: UK
Posts: 3,727
Downloads: 10
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,
JU_88 is offline   Reply With Quote
Old 10-02-11, 04:24 PM   #57
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
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!
  Reply With Quote
Old 10-10-11, 08:43 PM   #58
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
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-11, 06:59 AM   #59
tonschk
Admiral
 
Join Date: Mar 2007
Posts: 2,200
Downloads: 172
Uploads: 0
Default

Quote:
Originally Posted by Echolot View Post
TheDarkWraith

Privateer

Subsim community

Great.


__________________
What we do in life echoes in Eternity
tonschk is offline   Reply With Quote
Old 10-11-11, 11:32 AM   #60
Anvart
Admiral
 
Join Date: Jan 2006
Location: Russia ®
Posts: 2,492
Downloads: 122
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 ®


Moses said: "Don't create yourself an idol"...

Last edited by Anvart; 10-11-11 at 12: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 05:59 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 1995- 2024 Subsim®
"Subsim" is a registered trademark, all rights reserved.