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 > SHIII Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 11-25-18, 07:12 PM   #1
Jeff-Groves
GLOBAL MODDING TERRORIST
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 4,242
Downloads: 149
Uploads: 0


Default

Dynamic Shadows.
The very first patch for SH3 removed this failed controller.
What was NOT removed is all the SHD_whatever 3D meshes from the dats nor the controller embedded in the dats.
Waste of space and processor time to read and ignore.

Water Reflections in most cases is the same.
No need for a separate 3D mesh.
Just assign the controller to the main mesh.
Very rare cases you may need the original way.

Some may say "If it's not being used what's the harm?"
How much processor time is wasted to read and refuse the ID's in those controllers and does it reject those ID's if assigned elsewhere?
Remember, Names in dat's don't really mean a thing. (Open most clones and see for yourself) It's that ID number that is the most important thing.
Jeff-Groves is offline   Reply With Quote
Old 11-25-18, 07:39 PM   #2
Jeff-Groves
GLOBAL MODDING TERRORIST
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 4,242
Downloads: 149
Uploads: 0


Default

Quick example of the wasted SHD_ objects.
The NAFT in stock SH3, Node 74, SHD_NATF_B
The 3D model is 848 verts never used in game and uses 2 ID's
There are 13 not use dynamicshadowcast controllers, 13 3D meshes not used.

That is one small Unit! add 100 more ships and do the math.
I can hit 4 MILLION verts very easily that are not used but are read on load.
Jeff-Groves is offline   Reply With Quote
Old 11-25-18, 07:53 PM   #3
Jeff-Groves
GLOBAL MODDING TERRORIST
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 4,242
Downloads: 149
Uploads: 0


Default

So removing such things is an advantage to any mod.
Hans pointed out it is a large amount of work IF done the old way by hand and editing every file one by one.

What if we run a program to scan the complete Sea folder and do all the work for us?
Would that be of interest?
Jeff-Groves is offline   Reply With Quote
Old 11-25-18, 10:14 PM   #4
propbeanie
CTD - it's not just a job
 
propbeanie's Avatar
 
Join Date: May 2016
Location: One hour from Music City USA!
Posts: 10,246
Downloads: 466
Uploads: 4


Default

Yes.
__________________

"...and bollocks to the naysayers" - Jimbuna
propbeanie is offline   Reply With Quote
Old 11-25-18, 11:06 PM   #5
Jeff-Groves
GLOBAL MODDING TERRORIST
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 4,242
Downloads: 149
Uploads: 0


Default

A few minutes scripting for 010 I was able to scan the sea folder of major mods for dynamicshadows.
All Mods were extracted but not installed to a game folder so it's the actual count of that Mod's Sea units.

I'll list from low to high.
Note that the mods might be over writing stock units along with adding units or some units from MFM may already be included in Major mods.
This count ONLY looks at dats.

Stock SH3 - 48 units
NYGM - 32 units
MFM - 125 units
WAC - 162 units
GWX - 181 units (Knocked on the back door to extract)
LSH - 320 units (Provided a base SH3 folder with SH3 files and no other folders to extract)

I could scan for reflection stuff but the count would be the same I suspect.
Reflections are needed but many times the added 3D mesh may not be needed. I've 2 thoughts on that not proven.

So it's a massive amount of work to edit by hand!
Not to mention Units converted to SH4 and possibly slipped into SH5!

Last edited by Jeff-Groves; 11-25-18 at 11:25 PM.
Jeff-Groves is offline   Reply With Quote
Old 11-25-18, 11:40 PM   #6
Jeff-Groves
GLOBAL MODDING TERRORIST
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 4,242
Downloads: 149
Uploads: 0


Default

Re-using 3D meshes in a file.
I'll provide the example.
http://www.mediafire.com/file/4afldw...sell2.dat/file

Look at this dat with S3D. Then look at how the actual 3D meshes were done. Notice there are very few actual meshes used to complete the Sea Forts. The Game engine renders the needed parts as we placed them. No need for extra meshes!
At 2+ MB as is? Doing everything as separate meshes would place it at over 9 or 10 MB!
(Yes. They suffer the dreaded Dynamic shadow stuff! I know better now.)
Jeff-Groves is offline   Reply With Quote
Old 11-26-18, 12:07 AM   #7
Jeff-Groves
GLOBAL MODDING TERRORIST
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 4,242
Downloads: 149
Uploads: 0


Default

One point I failed to mention about the dynamicshadows stuff.
In the early days one could clone a Unit but We did not have S3D to easily remove or add things.
It was mostly done with a hex editor and other very basic tools.

There's very few left here that can work the files with a hex editor.
In most cases you don't need one now. But one can still do things S3D and other Tools can not do!
Jeff-Groves is offline   Reply With Quote
Old 11-28-18, 02:31 AM   #8
areo16
Sonar Guy
 
Join Date: Oct 2013
Posts: 382
Downloads: 64
Uploads: 0
Default

Quote:
Originally Posted by Jeff-Groves View Post
Re-using 3D meshes in a file.
I'll provide the example.
http://www.mediafire.com/file/4afldw...sell2.dat/file

Look at this dat with S3D. Then look at how the actual 3D meshes were done. Notice there are very few actual meshes used to complete the Sea Forts. The Game engine renders the needed parts as we placed them. No need for extra meshes!
At 2+ MB as is? Doing everything as separate meshes would place it at over 9 or 10 MB!
(Yes. They suffer the dreaded Dynamic shadow stuff! I know better now.)

Thanks for the offsets for the .dat file in hex very helpful.


So I understand the optimized approach you are talking about here, you are still copying the same model (obj) over and over again in S3D?


Isn't it possible to just reference the same model in S3D and just go about it that way, wouldn't that save space?


I guess, from a hex point of view, what edits would we want to make to these files to make them more optimized. Looks like looking for duplicate data chunks for models (type 1) is step 1, and then possibly deleting the duplicates and re-reference the deleted duplicate data chunks with the original model reference id?


@EDIT


Yes in S3D it is possible to reference the same model in multiple nodes and this works just fine. It also decreases file space.


Is it possible to reference a model ID that is in another .dat file?

Last edited by areo16; 11-28-18 at 03:50 AM.
areo16 is offline   Reply With Quote
Old 11-30-18, 07:16 PM   #9
s7rikeback
I break things
 
s7rikeback's Avatar
 
Join Date: Jan 2013
Location: Merry Old England
Posts: 770
Downloads: 1179
Uploads: 10


Default

Quote:
Originally Posted by Jeff-Groves View Post
So removing such things is an advantage to any mod.
Hans pointed out it is a large amount of work IF done the old way by hand and editing every file one by one.

What if we run a program to scan the complete Sea folder and do all the work for us?
Would that be of interest?
Hell yeah!!!
__________________
s7rikeback is offline   Reply With Quote
Old 11-27-18, 04:23 AM   #10
JapLance
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Quote:
Originally Posted by Jeff-Groves View Post
Water Reflections in most cases is the same.
No need for a separate 3D mesh.
It's been a long time since I tweaked with SH3/SH4 files, but I have to disagree here.

The water reflections don't need the full poly model to be displayed. A low-poly model can be safely used (not actually noticeable in the game) and lessen the charge on the GPU.

And I eagerly await for that program to convert SH3 models into SH4. I remember it was a painful, time consuming job to do.
  Reply With Quote
Old 11-27-18, 04:26 PM   #11
Jeff-Groves
GLOBAL MODDING TERRORIST
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 4,242
Downloads: 149
Uploads: 0


Default

Quote:
Originally Posted by JapLance View Post
And I eagerly await for that program to convert SH3 models into SH4. I remember it was a painful, time consuming job to do.

Check your PM's.

Your review of the program would be great!
Jeff-Groves is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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 01:43 PM.


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