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 03-03-13, 02:51 PM   #1891
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Targor Avelany View Post
The main hull texture is correct. The rest are very replaced; it seems like the textures/maps are assigned to wrong subsets. If you look close at the pics from GR2 Editor and Goblin you will see that the floor, the benches, the mid-section and the board/railing of the boat are messed up.
Can you post a link to the GR2 file the app made with all the materials and such set the way you wanted them (viewed correctly in app)? This way I can see what Granny Viewer and Goblin Editor are doing different and maybe I'm not understanding something correctly in regards to this.

The material file for those lifeboat parts exposed a flaw in my mtllib reader. The map_Ka and map_Kd had some entries that it didn't recognize: -s x y z where x,y, and z were float values. The -s means there are 3 floats after it that describe the texture scaling. I'm not quite sure how to utilize these values. I modified the app so that it can handle these (but no others) by reading them in but other than that it does nothing with them. You might be seeing strange renderings because of these texture scale values present in the mtllib file. Try editing the mtllib file and removing these -s entries from map_Ka and map_kd and see if you don't see the same thing you were seeing (same problem).

Last edited by TheDarkWraith; 03-03-13 at 03:07 PM.
TheDarkWraith is offline   Reply With Quote
Old 03-03-13, 03:01 PM   #1892
Wurmonkel
Nub
 
Join Date: Jul 2012
Posts: 4
Downloads: 6
Uploads: 0
Default

Hello TheDarkWraith,

can You send me the current Version of your GR2 Tool?
Thank you very much

P.S. Your PO box is full

Regards,
Wurmi
Wurmonkel is offline   Reply With Quote
Old 03-03-13, 03:09 PM   #1893
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Wurmonkel View Post
Hello TheDarkWraith,

can You send me the current Version of your GR2 Tool?
Thank you very much

P.S. Your PO box is full

Regards,
Wurmi
You can find it at post #1 of this thread. I'll be releasing a new version here shortly that will allow files with animations and trackgroups again.
TheDarkWraith is offline   Reply With Quote
Old 03-03-13, 03:18 PM   #1894
Wurmonkel
Nub
 
Join Date: Jul 2012
Posts: 4
Downloads: 6
Uploads: 0
Default

Thanks
Wurmonkel is offline   Reply With Quote
Old 03-03-13, 04:46 PM   #1895
Targor Avelany
Ace of the Deep
 
Join Date: Jan 2010
Location: Vancouver, BC, Canada
Posts: 1,183
Downloads: 225
Uploads: 0


Default

Quote:
Originally Posted by TheDarkWraith View Post
Can you post a link to the GR2 file the app made with all the materials and such set the way you wanted them (viewed correctly in app)? This way I can see what Granny Viewer and Goblin Editor are doing different and maybe I'm not understanding something correctly in regards to this.

The material file for those lifeboat parts exposed a flaw in my mtllib reader. The map_Ka and map_Kd had some entries that it didn't recognize: -s x y z where x,y, and z were float values. The -s means there are 3 floats after it that describe the texture scaling. I'm not quite sure how to utilize these values. I modified the app so that it can handle these (but no others) by reading them in but other than that it does nothing with them. You might be seeing strange renderings because of these texture scale values present in the mtllib file. Try editing the mtllib file and removing these -s entries from map_Ka and map_kd and see if you don't see the same thing you were seeing (same problem).
got it. Once I get home I'll test it and will let you know. If the problem continues, I'll post the file.
Targor Avelany is offline   Reply With Quote
Old 03-03-13, 04:49 PM   #1896
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Targor Avelany View Post
got it. Once I get home I'll test it and will let you know. If the problem continues, I'll post the file.
I just did a little test to see what's going on. I added subsets to the cmd_small_boat from the OBJ file. Then I defined all the new textures and materials and set the mesh subsets to them:



Saved the new file. Opened in Granny Viewer and all is good (looks just like the app):


Opened in Goblin and not even close:


Now I just have to sit down and analyze all this to figure out what Goblin/SH5 is doing in regards to materials/subsets

Being that it rendered fine in Granny Viewer means the app is working correctly. Goblin/SH5 just does something funny with materials/subsets...
TheDarkWraith is offline   Reply With Quote
Old 03-03-13, 05:41 PM   #1897
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Looks like I finally figured out what's going on with Goblin/SH5. You can only define 2 materials for each mesh. The third material (if defined) is an opacity or something else map (not quite sure but if you define a third material that has a texture Goblin/SH5 crashes). If a third material is defined it has to have no texture and no maps.

Now that's not all. The material bindings need to be defined in the order you will be using the materials. A subset can use the same material as another subset.

Materials added to a mesh's material bindings need to have maps defined (no textures). The material can have only 1 map defined - Diffuse.

Obviously the SH5 devs didn't understand the Granny system or they imposed their own set of rules
TheDarkWraith is offline   Reply With Quote
Old 03-03-13, 06:02 PM   #1898
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

v1.1.355.1 released. See post #1

Lifted restriction on GR2 files that contain trackgroups and/or animations (so yes you can now load any air unit now)
Fixed bugs reported/found few posts up

I'm working on adding the TrackGroups and Animations tabs to the app so the end-user can edit the data in them. Should be available in next version.

I have tested modifying/saving GR2 files that contain animations and/or trackgroups and didn't encounter any problems. That is not to say it is 100% perfect. Always save, exit the app, and reload the GR2 file to ensure it doesn't have any problems if it contains any of these. Also view in Granny Viewer to ensure the animations work correctly. You have been warned

TheDarkWraith is offline   Reply With Quote
Old 03-03-13, 09:50 PM   #1899
Targor Avelany
Ace of the Deep
 
Join Date: Jan 2010
Location: Vancouver, BC, Canada
Posts: 1,183
Downloads: 225
Uploads: 0


Default

So, from what you said, if I understand correctly, each mesh cannot contain more than 2 materials with maps of textures defined? No matter how many subsets there is.

Hmm, that is workable. Annoying, but workable.
Targor Avelany is offline   Reply With Quote
Old 03-03-13, 09:55 PM   #1900
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Targor Avelany View Post
So, from what you said, if I understand correctly, each mesh cannot contain more than 2 materials with maps of textures defined? No matter how many subsets there is.

Hmm, that is workable. Annoying, but workable.
That is correct. No matter how many subsets are defined each mesh can only contain 2 materials (that have maps defined). Not exactly limiting but not exactly freedom either.

I've been working on something that will fix this problem. Still working on it though
TheDarkWraith is offline   Reply With Quote
Old 03-04-13, 12:22 AM   #1901
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

v1.1.356.1 released. See post #1

This version fixes a bug I found. The bug only appeared if you made multiple changes to the file and saved the file multiple times during your 'session' with the app (like after every change) OR you were deleting items from the GR2 file or the app was reducing the size of the GR2 file for whatever reason. The bug would corrupt the GR2 file.

TheDarkWraith is offline   Reply With Quote
Old 03-04-13, 01:53 AM   #1902
Targor Avelany
Ace of the Deep
 
Join Date: Jan 2010
Location: Vancouver, BC, Canada
Posts: 1,183
Downloads: 225
Uploads: 0


Default

quick question: if I have 3 maps defined in 1 material (diffuse/AO/bump), I still can have a second material assigned to the mesh, correct? (hopefully?)

I will be testing this all tomorrow - need to re-do all the uvws for the lifeboat.
Targor Avelany is offline   Reply With Quote
Old 03-04-13, 05:57 AM   #1903
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Targor Avelany View Post
quick question: if I have 3 maps defined in 1 material (diffuse/AO/bump), I still can have a second material assigned to the mesh, correct? (hopefully?)

I will be testing this all tomorrow - need to re-do all the uvws for the lifeboat.
By all accounts yes. Each material can have any number of maps but each mesh can only have 2 materials assigned to it (SH5 restriction).
TheDarkWraith is offline   Reply With Quote
Old 03-04-13, 07:34 AM   #1904
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

v1.1.358.1 released. See post #1

While coding in the TrackGroups tab I noticed that the number of trackgroups displayed was doubled This was due to a bug in the animations code that was inadvertantly increasing the reference count of the TrackGroups and thus corrupting the GR2 file. This bug has been fixed in this version.
TheDarkWraith is offline   Reply With Quote
Old 03-04-13, 12:42 PM   #1905
Ekmek
Mate
 
Join Date: Nov 2011
Posts: 53
Downloads: 4
Uploads: 0
Default

Does this still only work with your version on granny? (sorry cant check right now)
Ekmek is offline   Reply With Quote
Reply


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 09:41 AM.


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