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-02-14, 12:23 PM   #2296
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by gap View Post
I could clone the current AO meshes, and UV map them again for diffuse channel usage. Their UV map is much simpler, and re-arranging it wouldn't take too long.

What do you think, it can work?
Quote:
Originally Posted by TheDarkWraith View Post
Try it and see.

What you are striving for is the non-AO and the AO .obj files to be identical in regards to vertices defined (v), normals defined (vn), and face definitions defined (f) - except the UVs for the face definitions in the AO .obj file will be different.

When the app maps AO to non-AO the only thing it's 'bringing over' are the UVs defined in the AO .obj file. Thus it's critical the above matches between the two files.
It worked!
This is a GR2 Editor render of the bunker model, with diffuse and self illumination textures correctly mapped on it



The dark shadow on the bottom left corner is from the rocks in front of the bunker, not yet imported .
I have met two new problems though:

1 - When I check the 'render bounding box' and 'render bounding sphere' checkboxes in the mesh tab, neither of them is rendered for the newly imported mesh (they do for stock meshes still in place though). What are these sphere/boxes meant for, and why is my mesh missing them? I didn't receive any error message during the import process, and the generated file is not reported as "possibly corript"

2 - This is possibly related to the file I am currently working on (pantelleria.GR2): when I try importing a new mesh into 'Object1057' (the mesh with nine subsets), the import process is aborted, and I get instead the following message:

"Exception while deleting Primary Topology Group. The error is: Index beyond matrix limits."

followed by:

"Unable to delete subset 1"

I can delete the named subset, along with the other unnecessary subsets, and at this point GR2 Editor lets me to import new meshes, but when I try to save the file broken chains are reported.
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 03-02-14, 02:29 PM   #2297
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
I have met two new problems though:

1 - When I check the 'render bounding box' and 'render bounding sphere' checkboxes in the mesh tab, neither of them is rendered for the newly imported mesh (they do for stock meshes still in place though). What are these sphere/boxes meant for, and why is my mesh missing them? I didn't receive any error message during the import process, and the generated file is not reported as "possibly corript"

2 - This is possibly related to the file I am currently working on (pantelleria.GR2): when I try importing a new mesh into 'Object1057' (the mesh with nine subsets), the import process is aborted, and I get instead the following message:

"Exception while deleting Primary Topology Group. The error is: Index beyond matrix limits."

followed by:

"Unable to delete subset 1"

I can delete the named subset, along with the other unnecessary subsets, and at this point GR2 Editor lets me to import new meshes, but when I try to save the file broken chains are reported.
Any exception shown is very bad. Give me a link to the files you were using and the one you were trying to import into. Also give me a step by step procedure of what you did so I can imitate the exception in the Debugger to see why the exception was being thrown.
TheDarkWraith is offline   Reply With Quote
Old 03-02-14, 04:02 PM   #2298
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
Give me a link to the files you were using...
obj meshes + textures:
https://www.mediafire.com/?w32i1anvm02eyw8

WIP GR2 file + dds textures:
https://www.mediafire.com/?2bnvu6y3i4iuzch

Quote:
Originally Posted by TheDarkWraith View Post
...and the one you were trying to import into.
stock GR2 file:
data\Terrain\Locations\CustomAreas\pantelleria\pan telleria.GR2

Quote:
Originally Posted by TheDarkWraith View Post
Also give me a step by step procedure of what you did so I can imitate the exception in the Debugger to see why the exception was being thrown.
Missing bounding boxes\spheres:
I don't really know when the problem started. I have imported two meshes so far (turret and radio), and both apparently miss their bounding geometries. Import options (loose import): everything checked but material properties (for both files) and AO coordinates (for radio mesh).

Subset deletion exception:
see my first post for details. Any omitted detail not relevant. Tried importing various obj files with different import options, and I even tried importing in a fresh file, but the oucome was always as per my previous report.


On an unrelated note, I had another of my ideas on an feature that would ease our work on GR2 files:

-select a bone/mesh/material
-right click on it
-select 'copy ExtendedData'
-select a second bone/mesh/material (in the same file or in another file)
-right click
-select 'paste ExtendedData'

possible?
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 03-02-14, 06:10 PM   #2299
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

@ TdW Re. GR2 Exception

I forgot to mention that the GR2 file that I am currently working on, is reported as having 'fillers' in section 0. I wonder if that is relevant to the problem I am experiencing


@ tonschk

sorry for the late reply mate

Quote:
Originally Posted by tonschk View Post
may be a way to sort out this awfully different shadowing behaviour is to tweak and change "ALL" the model's links to either the main bone or to the child bone, in this case (I guess) I need to change the links of the UZO binoculars to the main bone like they are already now for the UZO pedestal
That is not going to work (never seen a bone with two meshes linked to it). An hypothetical workaround (if GR2 Editor opened UBoot_Sensors.GR2) could have been combining pedestal and binoculars mehes into one mesh, and replacing the pedestal mesh linked to the main bone with the new pedestal + binoculars combined mesh. At this point, the VisibleUnderWater controllers linked to binoculars' bone would have no effect though.

Quote:
Originally Posted by tonschk View Post
Can you tell me please how you know that "the pedestal is linked on the model's main bone, and the binoculars are linked to a child bone of the main bone"?
That is easy: open UBoot_Sensors.GR2 in Goblin Editor, and look for the UZO model in GDS Scene Tree (bones are sorted hierarchically there). Select a bone, and the mesh linked to it will be highlighted in green in Goblin's viewport. If nothing gets highlighted, the bone you have selected has no meshes linked to it
__________________
_____________________
|May the Force be with you!|
...\/

Last edited by gap; 03-02-14 at 07:07 PM.
gap is offline   Reply With Quote
Old 03-02-14, 06:53 PM   #2300
tonschk
Admiral
 
Join Date: Mar 2007
Posts: 2,200
Downloads: 172
Uploads: 0
Default

Amazing, I am digesting word by word your answer, I need to start to use the Globin Editor, thank you a lot
__________________
What we do in life echoes in Eternity
tonschk is offline   Reply With Quote
Old 03-02-14, 07:13 PM   #2301
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by tonschk View Post
Amazing, I am digesting word by word your answer, I need to start to use the Globin Editor, thank you a lot
Goblin Editor is only useful for editing controllers, and for previewing how GR2 objects will look in game (more or less). If you want to go deep into GR2 editing, you have no other option but learnig TDW's application
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 03-02-14, 10:26 PM   #2302
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
@ TdW Re. GR2 Exception

I forgot to mention that the GR2 file that I am currently working on, is reported as having 'fillers' in section 0. I wonder if that is relevant to the problem I am experiencing
Nope, those are required due to the type of file (Special GR2 - pointers come before data) and the section's alignment value

I fixed the import problem. Wow, it was messy but it's all sorted now.
The only problem I have left to fix is if you go ahead and delete the material bindings not needed anymore after the import it corrupts the file. If you don't delete them everything is fine. I'll look into it tomorrow

As far as your bounding boxes and spheres remember that the bone that the mesh is tied to determines their 3D position in the world.
TheDarkWraith is offline   Reply With Quote
Old 03-02-14, 10:40 PM   #2303
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
On an unrelated note, I had another of my ideas on an feature that would ease our work on GR2 files:

-select a bone/mesh/material
-right click on it
-select 'copy ExtendedData'
-select a second bone/mesh/material (in the same file or in another file)
-right click
-select 'paste ExtendedData'

possible?
Wish it was that easy! The problem is the ExtendedData is different depending on how the bone/mesh/material is used/defined This is the major obstacle currently as to creating new GR2 files from scratch and for adding new meshes. I don't understand what determines which ExtendedData type is used for what and when.

Take a look in Granny Viewer and you'll see ExtendedData is different for all the same items of a category (mesh, material, bone, etc.)
TheDarkWraith is offline   Reply With Quote
Old 03-02-14, 11:20 PM   #2304
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Still not Universal import for obj files.
  Reply With Quote
Old 03-03-14, 04:20 AM   #2305
tonschk
Admiral
 
Join Date: Mar 2007
Posts: 2,200
Downloads: 172
Uploads: 0
Default

Thank you for the info , the dynamic shadows (and self shadowing) of the SH3 flags were very immersive showing nice "waving goodbye" shadows moving synchronised/simultaneously with the flags. SH5 shadows have a number of problems, for the moment I will try to sort out the UZO (binocular/pedestal) problem

Quote:
Originally Posted by tonschk
...I will try to open the flags GR2 files to enable the flags dynamic shadows and self shadowing, thank you for your help



Quote:
Originally Posted by gap View Post
Unfortunately you can't: the flag models used in SH5 are dat objects, and they are known for casting no shadows in game (this is one of the limitations of imported dat ships).

Unless someone finds a way to tweak the game shaders so that dat objects can cast/receive shadows, or deciphers GR2 animations enabling us to create GR2 flags, ship flags will never have shadows


__________________
What we do in life echoes in Eternity
tonschk is offline   Reply With Quote
Old 03-03-14, 07:50 AM   #2306
tonschk
Admiral
 
Join Date: Mar 2007
Posts: 2,200
Downloads: 172
Uploads: 0
Default

Do you think there must be a reason why the SH5 developers split the UZO in two meshes (pedestal/binoculars) each linked to a different bone ?


Quote:
Originally Posted by tonschk
may be a way to sort out this awfully different shadowing behaviour is to tweak and change "ALL" the model's links to either the main bone or to the child bone, in this case (I guess) I need to change the links of the UZO binoculars to the main bone like they are already now for the UZO pedestal

Quote:
Originally Posted by gap View Post
That is not going to work (never seen a bone with two meshes linked to it). An hypothetical workaround (if GR2 Editor opened UBoot_Sensors.GR2) could have been combining pedestal and binoculars mehes into one mesh, and replacing the pedestal mesh linked to the main bone with the new pedestal + binoculars combined mesh. At this point, the VisibleUnderWater controllers linked to binoculars' bone would have no effect thoug
__________________
What we do in life echoes in Eternity
tonschk is offline   Reply With Quote
Old 03-03-14, 08:45 AM   #2307
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by tonschk View Post
Do you think there must be a reason why the SH5 developers split the UZO in two meshes (pedestal/binoculars) each linked to a different bone ?
Yes, the binoculars bone got at least a VisibleAboveWater controller: when the u-boat submerges, binoculars disappear whereas the pedestal model keeps in its place.
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 03-03-14, 10:00 AM   #2308
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
Nope, those are required due to the type of file (Special GR2 - pointers come before data) and the section's alignment value

I fixed the import problem. Wow, it was messy but it's all sorted now.
The only problem I have left to fix is if you go ahead and delete the material bindings not needed anymore after the import it corrupts the file. If you don't delete them everything is fine. I'll look into it tomorrow


Since you are at it, can you tell me what is wrong with the "billboard" meshes linked below? (for use as simple shrub models)

http://www.mediafire.com/download/hs..._obj_files.rar

The first of them was created by me from scratch, and the second one is exported from one of the vegetation.GR2 files in the terrain folder, with little custmizatons by me. I can import the two of them into vegetation.GR2 with no problems, but when I do a loose inport of them in the GR2 file I am currently working on (pantelleria.GR2, 'far' mesh), I get the following message on saving:

Quote:
********* There are broken chains in Section 1! File is more than likely corrupt. Unable to save *********
The same happens with other files/meshes. Import options seem not relevant either (even the mere importing of vertex data is enough to break chains), but I have noticed something else: if I combine one of the billboard meshes with other meshes, and then import them all as a single mesh (you can do the same with the other model parts I sent you yesterday), broken chains are no longer reported, and I can save the file normally. Is it possible that the number of vertices/edges/faces is relevant in this case?

I have another question: I find the "view vertex declaration" function very useful, but is there a way to remove some of those declarations from a mesh, if not needed? Though not used, Normal, Tangent, Binormal, Diffuse, and Self-Illuminations UV coordinate declarations are always there (provided that the original mesh had them), no matter if I choose not to import them from obj file and not to use existing vertex data instead. I hope I made myself clear

Quote:
Originally Posted by TheDarkWraith View Post
As far as your bounding boxes and spheres remember that the bone that the mesh is tied to determines their 3D position in the world.
Have you seen my GR2 file? I have set the flags all of its mesh-linked bones to 0 (no position data, no rotation data). Shouldn't that involve that bounding boxes/spheres are centered on the geometrical center of each mesh?

Quote:
Originally Posted by TheDarkWraith View Post
Wish it was that easy! The problem is the ExtendedData is different depending on how the bone/mesh/material is used/defined This is the major obstacle currently as to creating new GR2 files from scratch and for adding new meshes. I don't understand what determines which ExtendedData type is used for what and when.

Take a look in Granny Viewer and you'll see ExtendedData is different for all the same items of a category (mesh, material, bone, etc.)
Yep, I had noticed that

Quote:
Originally Posted by privateer View Post
Still not Universal import for obj files.
Not yet, but TDW has greatly improved the tool during the last few weeks. You should try it again
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 03-03-14, 10:10 AM   #2309
ReallyDedPoet
Canadian Wolf
 
ReallyDedPoet's Avatar
 
Join Date: Jul 2006
Location: The one and only East Coast
Posts: 10,775
Downloads: 946
Uploads: 5


Default

Excellent work continues to be done here

Looking forward to getting back to SH5 when I
upgrade my computer.
__________________

Back in the Day



ReallyDedPoet is offline   Reply With Quote
Old 03-03-14, 11:11 AM   #2310
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
The same happens with other files/meshes. Import options seem not relevant either (even the mere importing of vertex data is enough to break chains), but I have noticed something else: if I combine one of the billboard meshes with other meshes, and then import them all as a single mesh (you can do the same with the other model parts I sent you yesterday), broken chains are no longer reported, and I can save the file normally. Is it possible that the number of vertices/edges/faces is relevant in this case?

I have another question: I find the "view vertex declaration" function very useful, but is there a way to remove some of those declarations from a mesh, if not needed? Though not used, Normal, Tangent, Binormal, Diffuse, and Self-Illuminations UV coordinate declarations are always there (provided that the original mesh had them), no matter if I choose not to import them from obj file and not to use existing vertex data instead. I hope I made myself clear

Have you seen my GR2 file? I have set the flags all of its mesh-linked bones to 0 (no position data, no rotation data). Shouldn't that involve that bounding boxes/spheres are centered on the geometrical center of each mesh?
The problem with broken chains when importing a mesh with different number of subsets and/or vertices and/or indices is fixed in upcoming version.

Being able to remove items from the vertex declaration isn't finished yet. I've been working on this for some time.

Even though you set all the flags of all it's bones to 0 you're forgetting one important one: the model! It has influence on everything You need to adjust the model's position as it has some HUGE offsets for X and Z. With these HUGE offsets all bones are offset by this same amount.

I got all the problems fixed that your bunker exposed. I rendered everything just to ensure the app did everything it was supposed to do on import. I had to manually adjust the bone to the correct position:
TheDarkWraith 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 03:23 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.