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-14, 12:06 PM   #2311
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

v1.1.451.1 released. See post #1

Fixes the problems exposed by gap's bunker
TheDarkWraith is offline   Reply With Quote
Old 03-03-14, 12:09 PM   #2312
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by privateer View Post
Still not Universal import for obj files.
I need to know which files you were using, link to all the files, and a procedure of what you did so that I can watch in Visual Studio debugger and try to see what the problem is.
TheDarkWraith is offline   Reply With Quote
Old 03-03-14, 12:31 PM   #2313
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
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.
Excellent! I need for that version in order to finish the bunker coastal defence unit with all the goodies in

Quote:
Originally Posted by TheDarkWraith View Post
Being able to remove items from the vertex declaration isn't finished yet. I've been working on this for some time.
Roger that

Quote:
Originally Posted by TheDarkWraith View Post
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 had totally forgot about model's trasform data
I have finally set model's TD flag to 0 and said 'no' when I was aked if I wanted mesh position/rotation to be updated, and now bounding spheres/boxes are centered on the meshes I had previously imported.

By the way, are bounding spheres and boxes used along with collision model and collision spheres for collision detection? This could explain why the mine unit that Targor was working on until recently, failed to explode every so often. This is supposing that he had imported his meshes in a GR2 file with similar huge model/bone position offsets, and he didn't reset them to 0

Quote:
Originally Posted by TheDarkWraith View Post
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.
Quote:
Originally Posted by TheDarkWraith View Post
v1.1.451.1 released. See post #1

Fixes the problems exposed by gap's bunker
Awesome! Thank you TDW
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 03-03-14, 12:47 PM   #2314
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
By the way, are bounding spheres and boxes used along with collision model and collision spheres for collision detection? This could explain why the mine unit that Targor was working on until recently, failed to explode every so often. This is supposing that he had imported his meshes in a GR2 file with similar huge model/bone position offsets, and he didn't reset them to 0
The bounding spheres are more for visual reference. The Granny system doesn't use them. The Granny system does use the bounding boxes though so they are very important. Granny stores the mesh's bounding box info in the mesh's BoneBindings. A mesh CAN have more than one bounding box. It all depends on how many BoneBindings are defined.

SH5 uses the bounding boxes for broad collision detection (first pass test). If that test passes then it goes to the Dmg_Col mesh and tests for intersection with it. If that test passes then it checks all the collision spheres defined to see which zones (boxes) were hit.

After you import anything or make drastic changes you should enable the bounding boxes render to ensure they are where they are supposed to be AND are sized correctly.

Last edited by TheDarkWraith; 03-03-14 at 01:30 PM.
TheDarkWraith is offline   Reply With Quote
Old 03-03-14, 01:09 PM   #2315
tonschk
Admiral
 
Join Date: Mar 2007
Posts: 2,200
Downloads: 172
Uploads: 0
Default

Thank you a Lot TDW

Quote:
Originally Posted by TheDarkWraith View Post
v1.1.451.1 released. See post #1

Fixes the problems exposed by gap's bunker
__________________
What we do in life echoes in Eternity
tonschk is offline   Reply With Quote
Old 03-03-14, 08:38 PM   #2316
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Quote:
Originally Posted by TheDarkWraith View Post
I need to know which files you were using, link to all the files, and a procedure of what you did so that I can watch in Visual Studio debugger and try to see what the problem is.
Here's 2 example obj files of my SH4 Life boat.
https://www.mediafire.com/?cmc5rgp7bifvefz
One is an export from 3DConverter 4.8
The other from MeshLab 1.3.2

Both use a slightly different way to write the obj files.
Both open in nearly every 3D Modeling program.

I included the sort program I threw together that sorts the files so GR2 editor can read them.
  Reply With Quote
Old 03-04-14, 01:03 PM   #2317
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by privateer View Post
Here's 2 example obj files of my SH4 Life boat.
https://www.mediafire.com/?cmc5rgp7bifvefz
One is an export from 3DConverter 4.8
The other from MeshLab 1.3.2

Both use a slightly different way to write the obj files.
Both open in nearly every 3D Modeling program.

I included the sort program I threw together that sorts the files so GR2 editor can read them.
Instead of re-inventing the wheel how would you feel about making that sorter app a DLL and exposing a function that I can call that will take a .NET List<String> object that contains the contents of the OBJ file and the function sorts it and then returns a .NET List<String> object that contains the contents of the OBJ file sorted by your app?

That .NET List<String> object that I would pass would be a list of all the lines in the file with all white space removed (so no \r\n at the end of each line). Any 'blank lines' in the file would be removed also and not included in this list.

There are two benefits to this:
1) I don't have to re-invent the wheel
2) you can update the DLL at anytime with new features (able to support more formats) and all I have to do is include it with the app.
TheDarkWraith is offline   Reply With Quote
Old 03-04-14, 01:43 PM   #2318
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default coast defense bunker unit almost finished...

...in GR2 Editor:



and in Goblin:



Well done TheDarkWraith!

things still to do:
  • general file clean-up (there are a lot of unused materials, leftover from the previous meshes);
  • material properties fine tuning;
  • sim and zon files (respectively with unit cmdr controller, and collision/damage/radio controllers);
  • customized visual and "loop" sensors for usage on the unit (the latter optional: I hope to create a better suited model for usage as loop station unit);
  • last touch-ups to the character I have assembled (for usafe as lookout inside the bunker).

stay tuned
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 03-04-14, 01:45 PM   #2319
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
all I have to do is include it with the app.
That would be great
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 03-04-14, 01:58 PM   #2320
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
things still to do:
  • general file clean-up (there are a lot of unused materials, leftover from the previous meshes);
  • material properties fine tuning;
  • sim and zon files (respectively with unit cmdr controller, and collision/damage/radio controllers);
  • customized visual and "loop" sensors for usage on the unit (the latter optional: I hope to create a better suited model for usage as loop station unit);
  • last touch-ups to the character I have assembled (for usafe as lookout inside the bunker).

stay tuned
Looks good
Glad someone is putting the app to use and through it's paces
TheDarkWraith is offline   Reply With Quote
Old 03-04-14, 02:24 PM   #2321
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
Looks good
Glad someone is putting the app to use and through it's paces
That's nothing compared to the work you are doing

On a slightly unrelated note, I am a bit worried about how the billboarded shrub will look in game. Have you noticed how (the reason is obvious) in the Goblin render one of the shrub faces is much darker than the other?. I had a look into stock tree meshes, and they have only position, texture and normal coordinates defined (no binormls/tangents). I am waiting to see if you can implement the 'delete vertex declaration' thing

On a different note, deleting materials is still problematic (i.e. materials still being listed in the materials tree after being deleted, or exceptions being called during the deletion process).
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 03-04-14, 02:50 PM   #2322
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
On a slightly unrelated note, I am a bit worried about how the billboarded shrub will look in game. Have you noticed how (the reason is obvious) in the Goblin render one of the shrub faces is much darker than the other?. I had a look into stock tree meshes, and they have only position, texture and normal coordinates defined (no binormls/tangents). I am waiting to see if you can implement the 'delete vertex declaration' thing

The reason one side is darker is probably because the ExtendedData for the mesh and/or bone is not correct. Compare it to the ExtendedData of the mesh/bone you extracted it from.

On a different note, deleting materials is still problematic (i.e. materials still being listed in the materials tree after being deleted, or exceptions being called during the deletion process).
Give me link to files and what you did so I can try and reproduce and figure out why


Also don't forget to render your new creation with lighting in the app to ensure all your material properties are correct.
TheDarkWraith is offline   Reply With Quote
Old 03-04-14, 02:55 PM   #2323
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

I'm assuming you're adding a character to the bunker no? In case it hasn't hit you you can take one of the existing character waypoint GR2 files (\data\Library\Patch_1x1_V02 for example) and make a new one out of it. Add some new bones to it and you can create a custom 'path' that your character will follow in and/or around the bunker
TheDarkWraith is offline   Reply With Quote
Old 03-04-14, 02:57 PM   #2324
tonschk
Admiral
 
Join Date: Mar 2007
Posts: 2,200
Downloads: 172
Uploads: 0
Default



Quote:
Originally Posted by TheDarkWraith View Post
Looks good
__________________
What we do in life echoes in Eternity
tonschk is offline   Reply With Quote
Old 03-04-14, 05:11 PM   #2325
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 link to files and what you did so I can try and reproduce and figure out why
I will. I am now seeing if I can reproduce the problem

Quote:
Originally Posted by TheDarkWraith View Post
Also don't forget to render your new creation with lighting in the app to ensure all your material properties are correct.
I did it. Everything looks fine except maybe for the radio: it currently looks a bit too bright for being located inside the bunker, but I hope that once in game it will receive the shadow cast by bunker's roof and walls.

Quote:
Originally Posted by TheDarkWraith View Post
I'm assuming you're adding a character to the bunker no? In case it hasn't hit you you can take one of the existing character waypoint GR2 files (\data\Library\Patch_1x1_V02 for example) and make a new one out of it. Add some new bones to it and you can create a custom 'path' that your character will follow in and/or around the bunker
yep, this is exactly what I had planned. I want the character to go back and forth from the loophole to the radio station, acting appropriately to each station. I also want him to use different objects while at the radio than he is using while on watch. Do you know if the SetBodyPartVisibility command used in u-boat crew scripts also works with secondary characters?
__________________
_____________________
|May the Force be with you!|
...\/
gap 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:28 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.