SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SH5 Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=249)
-   -   GR2 Editor/Viewer/Extractor/Importer (https://www.subsim.com/radioroom/showthread.php?t=188290)

Will-Rommel 10-19-11 04:51 PM

Keep going TDW! Indeed too few people are participating along in this project, but i'm quite positive it's by lack of a solid technnical base rather than lack of interest (number of views this thread has says so)

I have really basics knowledges in programming languages so i follow this analysis with appetite, but i must confess i can't quite follow along with all the hex references. I'm just not there yet.

You guys rock! :rock:

TheDarkWraith 10-19-11 05:32 PM

well the Undine shot every assumption of the GR2 file out of the water that I had made. I had to basically do a total rewrite of the importer (and I still have more work to do on it - I have to recode the reading of the exporter info and additional strings and extended data) :damn: It's ok, everything works great now. I learned alot from 'reading' the pointers of the Undine's GR2 model. If pointers come before data then everything changes, and I mean everything. There are more pointers referencing other pointers which made it cumbersome to decode. There is more work to do on it but coming along nicely.

This new version will read the undine and the subs no problem now :up:

http://www.gamefront.com/files/20905...v1_0_103_0_zip

If you want to see what's going on under the hood run the DbgView app before starting this app (you can find DbgView in my UIs mod in \data\Applications). When I say under the hood I mean basically a complete file map of the file. It will tell you every address it reads and where it's reading it from the file.

There is a folder made in app path\ called GR2Testing that will contain the pointers decoded in a text file for each GR2 file read. The pointers are currently only for section 0. For those interested it can make for some interesting reading.

Let me know of any problems :yeah:

:|\\

Kaicokid 10-19-11 06:07 PM

In a nutshell TDW,does this mean that modding harbours ,subs, introducing the missing larger German subs etc.will now be possible?

TheDarkWraith 10-19-11 08:29 PM

Quote:

Originally Posted by Kaicokid (Post 1771146)
In a nutshell TDW,does this mean that modding harbours ,subs, introducing the missing larger German subs etc.will now be possible?

I'm nowhere close to having an exporter done. Still getting the importer to work properly. There are still some GR2 files it can't read yet. Have to open them up in Visual Studio so I can step through the app and see what's going on.

Kaicokid 10-19-11 09:22 PM

OK, very good.Keep up the GREAT work.Thanks.

TheDarkWraith 10-20-11 01:37 AM

new verison released. You can find at bottom of post #1.

Fixed problem with Bones treeview checkboxes
App can now handle GR2 files with multiple models
Re-coded the exporter info section
Finished the ArtToolInfo:ExtendedData names
Added DiffuseColor0 to known names
Still isn't able to open all GR2 files. Still working out the bugs :up:
Still haven't coded the textures or materials yet.

PL_Andrev 10-20-11 10:27 AM

It will be possible to add crew to all AI submarines when submerged?

TheDarkWraith 10-20-11 11:46 AM

Quote:

Originally Posted by Antar (Post 1771480)
It will be possible to add crew to all AI submarines when submerged?

Not following what you're asking :06:

TheDarkWraith 10-20-11 01:40 PM

new version released. v1.0.125.0 available at post #1. This version fixes some minor errors I noticed. It also now reads the textures and builds them.

Still can't display the 3D model with textures until I finish the materials. Working on that now.

EDIT: forgot to test that version on the Undine. As expected it had problems. Pointers coming before data doesn't matter that much with textures. v1.0.127.0 released to fix this.

tonschk 10-20-11 02:49 PM

:yeah: great work :sunny: TDW :DL Well Done :salute:

Madox58 10-20-11 04:07 PM

Nice work.
Check the Bunker.gr2
Your getting a mess on the lipituri mesh for some reason.
:03:

TheDarkWraith 10-20-11 04:23 PM

Quote:

Originally Posted by privateer (Post 1771662)
Nice work.
Check the Bunker.gr2
Your getting a mess on the lipituri mesh for some reason.
:03:

I'll look into it.

Just finished coding the reading of the materials. Now I just have to adjust the mesh's render function for this new way of materials.

Version 1.0.136.0 released. Let me know if it's not reading any textures/materials/or maps of materials correctly :yep:


Where is the bunker GR2 file located?

EDIT: nevermind. Found it. Also just spotted a problem with new version. download on hold....

TheDarkWraith 10-20-11 05:15 PM

v1.0.142.0 released. The problem with v1.0.136.0 was I thought that the materials were laid out sequentially in the file (along with their map references). Turns out to not be the case. Thus I had to add a flag to the map reference class. This flag denotes whether it's map reference was found or not. After the app loads all the materials it goes back and verifies those with maps have all their map references defined. If not, it searches for them to define them. Saw this problem using the bunker.GR2.

Now I'll look into this bunker problem Privateer spoke about :up:

TheDarkWraith 10-20-11 05:33 PM

ok I see the problem with the bunker item. Once again another assumption I made is blown out of the water :damn: I assumed that the vertex component names I've found so far apply to a certain item - position, normal, tangent, etc. Turns out those names can be applied to anything. This causes problems with my app and thus you get the shredded mesh.

I'll have to fix :up:

THE_MASK 10-20-11 05:48 PM

I cannot open the GR2 file
Silent Hunter 5\data\Library\undersea


All times are GMT -5. The time now is 05:12 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.