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 01-18-22, 05:14 AM   #136
Mister_M
Grey Wolf
 
Join Date: Feb 2021
Posts: 778
Downloads: 26
Uploads: 0


Default

Quote:
Originally Posted by kapuhy View Post
Could you send me your exported .obj files? If I can take a look at them maybe I'll see why this happens.
PM sent.
Mister_M is offline   Reply With Quote
Old 01-18-22, 07:02 AM   #137
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

@ kapuhy

thank you for your answers!

Some points in your account of FX bones and damage boxes don't quite match my recollections, but unfortunately I have not the files in front of me. I will be back to you on this topic as soon as I re-install the game

@ Mister_M

You importing/exporting kapuhy's files to/from Wings3D before importing them in S3d, is the likely reason for the AO map corruption you are experiencing
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-18-22, 07:22 AM   #138
Mister_M
Grey Wolf
 
Join Date: Feb 2021
Posts: 778
Downloads: 26
Uploads: 0


Default

Quote:
Originally Posted by gap View Post
@ Mister_M

You importing/exporting kapuhy's files to/from Wings3D before importing them in S3d, is the likely reason for the AO map corruption you are experiencing
Can these files be cured ? I need to modify some sub-objects.

Also, all the AO objects have been imported/exported with Wings3D, and I see no problem for them... (I did that because I had to rename them with -uv2 at the end, in order S3D can import both diffuse and AO obj at the same time ; If I rename directly the files, it doesn't work).

And rudder and propeller have been imported/exported as well, because I needed to change their rotation axis.
Mister_M is offline   Reply With Quote
Old 01-18-22, 08:30 AM   #139
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Mister_M View Post
Can these files be cured ? I need to modify some sub-objects.
Yes, in most cases they can, though at some point it might be more convenient making the changes directly in Blender.

Before I go into details on how a simple Wings3D import/export cycle can mess up a pair of UV1/UV2 obj files, and how we can fix the mismatches, I recommend you to get some theory on obj file architecture. Please read carefully the following post by me and report back if any point is not perfectly clear to you:

https://www.subsim.com/radioroom/sho...75#post2786275

Quote:
Originally Posted by Mister_M View Post
Also, all the AO objects have been imported/exported with Wings3D, and I see no problem for them...
For relatively simple objects Wings might do a good job, but the higher the number of vertices, texture coordinates and faces, the more likely is that it will mess up things for us.

Quote:
Originally Posted by Mister_M View Post
(I did that because I had to rename them with -uv2 at the end, in order S3D can import both diffuse and AO obj at the same time ; If I rename directly the files, it doesn't work).
Maybe this is happening because S3d expects an .mtl file with the same name as the .obj file to be available in the same folder, but the *_AO.obj file (renamed by you *_UV2.obj) still points to a .mtl file with the _AO suffix. To fix this issue open the obj file in notepad and change manually the following line:

mtllib *_AO.mtl

to:

mtllib *_UV2.mtl
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-18-22, 09:12 AM   #140
Mister_M
Grey Wolf
 
Join Date: Feb 2021
Posts: 778
Downloads: 26
Uploads: 0


Default

Quote:
Originally Posted by gap View Post
Before I go into details on how a simple Wings3D import/export cycle can mess up a pair of UV1/UV2 obj files, and how we can fix the mismatches, I recommend you to get some theory on obj file architecture. Please read carefully the following post by me and report back if any point is not perfectly clear to you:

https://www.subsim.com/radioroom/sho...75#post2786275
Quite hard for me to understand. Vertice, vertex, what's the difference ? What's that ? Else, I know what a face is, and what a normal is (or I think). So, my problem would come from the second number in each triplet ?

Quote:
Originally Posted by gap View Post
Maybe this is happening because S3d expects an .mtl file with the same name as the .obj file to be available in the same folder, but the *_AO.obj file (renamed by you *_UV2.obj) still points to a .mtl file with the _AO suffix. To fix this issue open the obj file in notepad and change manually the following line:

mtllib *_AO.mtl

to:

mtllib *_UV2.mtl
No, mtllib *-uv2.mtl

Edit : This solved the issue on the funnel.

Last edited by Mister_M; 01-18-22 at 09:25 AM.
Mister_M is offline   Reply With Quote
Old 01-18-22, 11:27 AM   #141
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Mister_M View Post
Quite hard for me to understand. Vertice, vertex, what's the difference ? What's that ?
Isn't vertices the plural form of vertex? I.e. the points which, being connected by edges, compose faces. In a triangulated model, three vertices (or vertexes using an alternative spelling of the same word) delimit a single face.

Quote:
Originally Posted by Mister_M View Post
Else, I know what a face is, and what a normal is (or I think). So, my problem would come from the second number in each triplet ?
Hard to say as I don't know how the information contained in obj files is read by S3d and how it is stored in a dat file, nonetheless, the most likely causes of wrong secondary UV map import are:

- different number/order of texture vertices (vt lines) in the UV2 model compared to the main model.

- different order of face definitions (f lines) in the UV2 model compared to the main model.

What I can tell you for sure is that if the main and the UV2 model are identical in all the respects except vt coordinate values, there is a 100% probability of success. With this idea in mind I have created an Excel spreadsheet which sorts vt coordinates for us. It is a rather crude tool, it requires a lot of manual data filtering, cutting and pasting; any mistake will cause wrong results, but if used correctly it does its job just fine.

If you are interested into testing it, I can upload it somewhere and post its link in the Almagest thread where it belongs more than here. Sorry kapuhy for kidnapping one of your threads again

Quote:
Originally Posted by Mister_M View Post
No, mtllib *-uv2.mtl

Edit : This solved the issue on the funnel.
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-18-22, 12:13 PM   #142
Mister_M
Grey Wolf
 
Join Date: Feb 2021
Posts: 778
Downloads: 26
Uploads: 0


Default

EDIT. I've posted this into the Almagest thread. Sorry Kapuhy for hijaking your thread.

By the way, I love your small tramp steamer "Armora", both for 3D model and texture. It's very clean without being too heavy. Great work !

Mister_M is offline   Reply With Quote
Old 01-28-22, 05:25 AM   #143
Alex.B
Frogman
 
Join Date: Nov 2020
Posts: 303
Downloads: 15
Uploads: 0
Default

Quote:
Originally Posted by kapuhy View Post




We are waiting in SH3
Alex.B is offline   Reply With Quote
Old 01-28-22, 03:41 PM   #144
Mister_M
Grey Wolf
 
Join Date: Feb 2021
Posts: 778
Downloads: 26
Uploads: 0


Default

Quote:
Originally Posted by Alex.B View Post
We are waiting in SH3
Coming soon...





Mister_M is offline   Reply With Quote
Old 01-28-22, 05:42 PM   #145
kapuhy
Grey Wolf
 
Join Date: Oct 2010
Location: Poland
Posts: 873
Downloads: 72
Uploads: 3
Default

Quote:
Originally Posted by Mister_M View Post
Coming soon...
nice progress, it might turn out it will be available for SH3 sooner than SH5
kapuhy is offline   Reply With Quote
Old 01-28-22, 06:42 PM   #146
iambecomelife
Silent Hunter
 
Join Date: Apr 2005
Posts: 4,569
Downloads: 297
Uploads: 0


Default

Such a beautiful steamer! The pic of it sinking makes me feel bad.
iambecomelife is offline   Reply With Quote
Old 01-31-22, 01:05 PM   #147
kapuhy
Grey Wolf
 
Join Date: Oct 2010
Location: Poland
Posts: 873
Downloads: 72
Uploads: 3
Default

Quote:
Originally Posted by gap View Post
@ kapuhy

thank you for your answers!

Some points in your account of FX bones and damage boxes don't quite match my recollections, but unfortunately I have not the files in front of me. I will be back to you on this topic as soon as I re-install the game
Since I got to the phase where I do FX for new ships I was able to do a little test. I cleared all effects from all FX bones except for two "low tier" aka "L1" bones (lets call them B1 and B2), both sharing the same parent bone (PB). I then created two boxes for PB bone, one of which covered position of bone B1 and other, position of bone B2. I loaded up the game and put a bunch of shells into ships bow aiming at box Z2.



If game checked positions of bones against damaged box, I expected only effect B2 to play, but instead both played out as soon as damage to Z2 box exceeded 40% requied for L1 effects to play.

So no, it appears game only uses positions of fx bones to anchor their effects in 3d space, not to decide which ones to play out. Also, making multiple boxes for single parent fx bone does not make game "divide" effects between boxes - all effects will play out as soon as one box sustains enough damage to trigger them.
kapuhy is offline   Reply With Quote
Old 02-02-22, 01:18 PM   #148
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by kapuhy View Post
Since I got to the phase where I do FX for new ships I was able to do a little test. I cleared all effects from all FX bones except for two "low tier" aka "L1" bones (lets call them B1 and B2), both sharing the same parent bone (PB). I then created two boxes for PB bone, one of which covered position of bone B1 and other, position of bone B2. I loaded up the game and put a bunch of shells into ships bow aiming at box Z2.



If game checked positions of bones against damaged box, I expected only effect B2 to play, but instead both played out as soon as damage to Z2 box exceeded 40% requied for L1 effects to play.

So no, it appears game only uses positions of fx bones to anchor their effects in 3d space, not to decide which ones to play out. Also, making multiple boxes for single parent fx bone does not make game "divide" effects between boxes - all effects will play out as soon as one box sustains enough damage to trigger them.
Okay, thank you for testing and reporting your findings here.

If I got you correctly:

- damage boxes tell the game where to hit for triggering certain damage effects;

- damage zones (assigned to various boxes) decide which effects should be played and at which level of damage;

- FX bones determine position/orientation of the played effects.


In other words (correct me if I am wrong):

- if a box located let's say near the bow gets assigned a zone with a fire effect among its effects;

- if that box is damaged beyond the level which triggers the fire effect;

- if "fire bones" are equally distributed along the ship:

the whole ship will be set on fire, not only her bow.


On a side note, I think it is legitimate assuming that if no fx bones are found for a given effect, the effect will originate (only) from the center of the damaged box triggering it. E.g. in stock games aircraft have no FX file assigned; if an engine nacelle is damaged, we can expect a black smoke trail to originate from there and only from there
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 02-02-22, 03:49 PM   #149
kapuhy
Grey Wolf
 
Join Date: Oct 2010
Location: Poland
Posts: 873
Downloads: 72
Uploads: 3
Default

Quote:
Originally Posted by gap View Post
If I got you correctly:

- damage boxes tell the game where to hit for triggering certain damage effects;
Yes, damage boxes assigned to FX bones work exactly like standard SH3 style damage boxes. You hit part of DMG_col model within boundaries of the box, zone that is assigned to this box gets damaged.

Quote:
Originally Posted by gap View Post
- damage zones (assigned to various boxes) decide which effects should be played and at which level of damage;
All boxes that are defined for FX "parent" bones have been assigned only one type of damage zone - the New_FX_Zone1, only zone in Zones.cfg file that does use FX gr2 file's bones at all.

Here's how this zone is defined:

Quote:
[New_FX_Zone1]
Multiplier=1.000000
Flotability=0.000000
HitPoints=180
Destructible=No
Effect1=FX_L1, 40
Effect2=FX_L1, 60
Effect2=FX_L2, 60
Effect4=FX_L1, 85
Effect5=FX_L2, 85
Effect3=FX_L3, 95
Armor Level=20
Critic Flotation=0.300000
Critical=No
FloodingTime=60
CargoType=None
Crash Depth=0.01
It doesn't care at all about which type of effect is assigned through controllers to an FX bone. Only thing it pays attention to is how the FX bone is named. All these "child" fx bones that fx controllers are assigned to are named like this:

FX_LX_Dummy_Y

where X is either 1,2 or 3 and Y is I guess like bone's index number. So the zone definition basically says: "play all effects that are assigned to L1 bones at 40% damage", then "play all effects assigned to L1 and L2 bones at 60% damage" and so on.

You can asssign any FX effect to any "child" bone so nothing stops you from having fire, explosion, and lets say water splash all assigned to different "FX_L1" bones in FX file - and they will all play when damage reaches 40%, as long as their bones have "FX_L1" in their name

Quote:
Originally Posted by gap View Post
- FX bones determine position/orientation of the played effects.
Yes.


Quote:
Originally Posted by gap View Post
In other words (correct me if I am wrong):

- if a box located let's say near the bow gets assigned a zone with a fire effect among its effects;

- if that box is damaged beyond the level which triggers the fire effect;

- if "fire bones" are equally distributed along the ship:

the whole ship will be set on fire, not only her bow.
You can distribute bones wherever you wish and assign any type of effect to any of them, as long as their names match what's defined in New_FX_Zone1 shown above - they will all trigger.


Quote:
Originally Posted by gap View Post
On a side note, I think it is legitimate assuming that if no fx bones are found for a given effect, the effect will originate (only) from the center of the damaged box triggering it. E.g. in stock games aircraft have no FX file assigned; if an engine nacelle is damaged, we can expect a black smoke trail to originate from there and only from there
Only zone that makes any use of fx bones is New_FX_Zone1. All other types of damage zones that you can assign to damage boxes work like they worked in SH3/4 - they have effects specified in their zone definition and these effects will indeed originate from center of the box. In fact even stock SH5 ships use SH3 style zones for a lot of things. On the other hand - nothing stops you from assigning engine smoke to one of fx bones as well and if you do that, you'll have it trigger (at location of fx bone you assigned it to) the way I described above - when damage to New_FX_Zone1 reaches 40%.

Overall - I think the FX files in SH5 are very under-utilized at the moment, and with some creativity you could do basically any combination of effects trigger whenever and wherever you wish, it would just require creating more zones that use FX file and more variations of FX bone names. At its heart though, entire FX file is just a fancy way to have effects trigger in different places than center of the box.
kapuhy is offline   Reply With Quote
Old 02-03-22, 02:45 PM   #150
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,300
Downloads: 130
Uploads: 0


Default

Very good post on the FX files.


Now that people can understand how they work?
Think of the crazy stuff one could possibly do!


Say a panicked Crew man jumps off the ship at the Bow when torpedoed at the Stern and such.
__________________
I don't do Stupid. So don't ask.
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:19 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.