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)

THE_MASK 10-20-11 05:51 PM

I opened Silent Hunter 5\data\Terrain\Textures_and_Vegetation\0.Taigas and Dry Lands\vegetation the other day ok with an older version . Cannot remember which one . Doesnt work with the latest version though .

TheDarkWraith 10-20-11 06:07 PM

Quote:

Originally Posted by sober (Post 1771716)
I cannot open the GR2 file
Silent Hunter 5\data\Library\undersea

Yes there is still more work to do on the importer. I hope to have that resolved soon :up: Let me know of anything you can't open.

Quote:

Originally Posted by sober (Post 1771718)
I opened Silent Hunter 5\data\Terrain\Textures_and_Vegetation\0.Taigas and Dry Lands\vegetation the other day ok with an older version . Cannot remember which one . Doesnt work with the latest version though .

I'll look at it.


v1.0.147.0 released. See post #1.

No more shredded meshes due to not reading all vertex component data. I wasn't happy with that section of code anyways so it needed a rewrite :up:

Let me know if you find any other shredded meshes. There shouldn't be anymore.

TheDarkWraith 10-20-11 06:14 PM

Quote:

Originally Posted by sober (Post 1771718)
I opened Silent Hunter 5\data\Terrain\Textures_and_Vegetation\0.Taigas and Dry Lands\vegetation the other day ok with an older version . Cannot remember which one . Doesnt work with the latest version though .

Yes a stupid mistake on my part. I coded the app to think that every GR2 file had textures. I'll fix this :up:

EDIT: did the same thing to the materials. Fixing it also.

Just tried opening lifeboat with changes and it failed. Have to figure out why....

Will-Rommel 10-20-11 06:20 PM

One can smell the hate growing ! :haha:

TheDarkWraith 10-20-11 06:21 PM

Quote:

Originally Posted by Will-Rommel (Post 1771736)
One can smell the hate growing ! :haha:

what hate? from whom? :hmmm:

THE_MASK 10-20-11 06:29 PM

I couldnt open
C:\Ubisoft\Silent Hunter 5\data\Env\cloud_models
C:\Ubisoft\Silent Hunter 5\data\Characters\HumanDialogIndicator
C:\Ubisoft\Silent Hunter 5\data\Terrain\Locations\CustomAreas\Port_pieces\P ort_U
(opens but doesnt show anything)

TheDarkWraith 10-20-11 06:32 PM

Quote:

Originally Posted by sober (Post 1771740)
I couldnt open
C:\Ubisoft\Silent Hunter 5\data\Env\cloud_models
C:\Ubisoft\Silent Hunter 5\data\Characters\HumanDialogIndicator
C:\Ubisoft\Silent Hunter 5\data\Terrain\Locations\CustomAreas\Port_pieces\P ort_U
(opens but doesnt show anything)

I'll look into those.

I fixed the problem with the lifeboat. Problem was if number of textures = 1 then I had to dereference the pointer and find the actual pointer to the texture.

I think the same thing has to be done with the materials but not sure. Anyone know any GR2 file that has only 1 material defined? GrannyViewer will tell you how many materials a GR2 file has. I need to test the app on a GR2 file with only 1 material :yep:

Will-Rommel 10-20-11 06:36 PM

Quote:

Originally Posted by TheDarkWraith (Post 1771737)
what hate? from whom? :hmmm:

I meant that i havent seen you in such a frenzy since IRAI's beginning i think. :salute:

TheDarkWraith 10-20-11 06:49 PM

Quote:

Originally Posted by Will-Rommel (Post 1771748)
I meant that i havent seen you in such a frenzy since IRAI's beginning i think. :salute:

Taking something apart and learning from it is fascinating to me. Yes I will devote a lot of time to it :up:


v1.0.153.0 released. See post #1. This will fix the problem of when only 1 texture is defined I had to do something for it.

The problem in previous version probably applies to a GR2 file with only 1 material defined but until we can find a GR2 file with only one material defined I can't test my theory.

@Sober - this fix fixes the problem with the GR2 files you posted that wouldn't open. The last one where it shows no meshes is odd (Port U). I think I know why. I need to open up my camera parameters for clipping :hmmm:

TheDarkWraith 10-20-11 07:05 PM

Quote:

Originally Posted by sober (Post 1771740)
I couldnt open C:\Ubisoft\Silent Hunter 5\data\Terrain\Locations\CustomAreas\Port_pieces\P ort_U
(opens but doesnt show anything)

That was because my camera parameters were WAY too tight. I loosened them way up :up:

v1.0.155.0 released. See post #1.

You can see it now :yep:

Now it's time to render with textures....

THE_MASK 10-20-11 07:12 PM

I can open them now . Couldnt find a GR2 with 1 material defined .

TheDarkWraith 10-20-11 09:31 PM

v1.0.169.0 released. See post #1.

You can now view the 3D model texturized. Select solid in FillMode tab and make sure texture is checked.

Rendering is done still using the fixed-function pipeline so only the "Diffuse Color" is being rendered for the texture. I'll convert to shaders here soon.

THE_MASK 10-20-11 10:01 PM

Cannot open
C:\Ubisoft\Silent Hunter 5\data\Library\undersea

THE_MASK 10-20-11 10:05 PM

This might be interesting > it throws an exception and gives a bug report when trying to open .
C:\Ubisoft\Silent Hunter 5\data\Submarine\NSS_Uboat2a\NSS_Uboat2a

TheDarkWraith 10-20-11 10:09 PM

Quote:

Originally Posted by sober (Post 1771798)
This might be interesting > it throws an exception and gives a bug report when trying to open .
C:\Ubisoft\Silent Hunter 5\data\Submarine\NSS_Uboat2a\NSS_Uboat2a

That GR2 file and undersea.GR2 give my importer problems. I know why it's just that I haven't found a solution to the why yet. The why is because my dumb luck decoding of the pointers isn't perfect and is biting me in the you know what now. Basically it's trying to reference some things past the end of the embedded strings and my app is interpreting those pointers as type str and str_reference and thus giving the problems (they should be type pointer or pointer_data). Once I find a sure fire way of determining the end of the embedded strings then this problem will disappear :yep:


All times are GMT -5. The time now is 07:15 AM.

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.