SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
10-01-11, 08:01 PM | #46 | |
Black Magic
|
Quote:
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. |
|
10-01-11, 08:03 PM | #47 | |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
Quote:
And I take it the animations issue was solved about the AirCraft stuff? |
|
10-01-11, 08:04 PM | #48 |
Black Magic
|
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. |
10-01-11, 08:07 PM | #49 |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
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. |
10-01-11, 08:14 PM | #50 |
Black Magic
|
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)....
|
10-01-11, 08:22 PM | #51 |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
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!! |
10-01-11, 08:24 PM | #52 | |
Black Magic
|
Quote:
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. |
|
10-01-11, 09:09 PM | #53 |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
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!! |
10-02-11, 01:19 AM | #54 |
Black Magic
|
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.
|
10-02-11, 04:34 AM | #55 |
Dominant Wolf
Join Date: Nov 2006
Posts: 2,143
Downloads: 30
Uploads: 0
|
@ Privateer :
@ TheDarkWraith : Not hijacking your thread, just making some fun of J, hehe.
__________________
|
10-02-11, 08:49 AM | #56 | |
Silent Hunter
Join Date: Jan 2006
Location: UK
Posts: 3,751
Downloads: 11
Uploads: 0
|
Quote:
|
|
10-02-11, 04:24 PM | #57 |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
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! |
10-10-11, 08:43 PM | #58 |
Black Magic
|
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#. |
10-11-11, 06:59 AM | #59 |
Admiral
Join Date: Mar 2007
Posts: 2,200
Downloads: 172
Uploads: 0
|
__________________
What we do in life echoes in Eternity |
10-11-11, 11:32 AM | #60 | |
Admiral
Join Date: Jan 2006
Location: Russia ®
Posts: 2,492
Downloads: 122
Uploads: 1
|
Quote:
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. |
|
|
|