SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SH5 Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=249)
-   -   [REL] The Little Ships of SH5 - Coaster Pack (https://www.subsim.com/radioroom/showthread.php?t=245817)

Mister_M 01-18-22 05:14 AM

Quote:

Originally Posted by kapuhy (Post 2788470)
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.

gap 01-18-22 07:02 AM

@ 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 :salute:

@ 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 :yep:

Mister_M 01-18-22 07:22 AM

Quote:

Originally Posted by gap (Post 2788489)
@ 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 :yep:

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.

gap 01-18-22 08:30 AM

Quote:

Originally Posted by Mister_M (Post 2788498)
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 (Post 2788498)
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 (Post 2788498)
(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

Mister_M 01-18-22 09:12 AM

Quote:

Originally Posted by gap (Post 2788507)
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 (Post 2788507)
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 :O:

Edit : This solved the issue on the funnel. :yeah:

gap 01-18-22 11:27 AM

Quote:

Originally Posted by Mister_M (Post 2788510)
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 (Post 2788510)
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 :D

Quote:

Originally Posted by Mister_M (Post 2788510)
No, mtllib *-uv2.mtl :O:

Edit : This solved the issue on the funnel. :yeah:

:up:

Mister_M 01-18-22 12:13 PM

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

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 !

:Kaleun_Applaud:

Alex.B 01-28-22 05:25 AM

Quote:

Originally Posted by kapuhy (Post 2788233)

:Kaleun_Thumbs_Up:


We are waiting in SH3

Mister_M 01-28-22 03:41 PM

Quote:

Originally Posted by Alex.B (Post 2790369)
We are waiting in SH3

Coming soon...

https://nsm09.casimages.com/img/2022...9017770492.png

https://nsm09.casimages.com/img/2022...9017770490.png

https://nsm09.casimages.com/img/2022...9017770491.png

kapuhy 01-28-22 05:42 PM

Quote:

Originally Posted by Mister_M (Post 2790491)
Coming soon...

:Kaleun_Applaud: nice progress, it might turn out it will be available for SH3 sooner than SH5 :)

iambecomelife 01-28-22 06:42 PM

Such a beautiful steamer! The pic of it sinking makes me feel bad. :haha:

kapuhy 01-31-22 01:05 PM

Quote:

Originally Posted by gap (Post 2788489)
@ 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 :salute:

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.

https://i.imgur.com/63Nl2Mf.png

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.

gap 02-02-22 01:18 PM

Quote:

Originally Posted by kapuhy (Post 2790997)
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.

https://i.imgur.com/63Nl2Mf.png

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 :hmmm:

kapuhy 02-02-22 03:49 PM

Quote:

Originally Posted by gap (Post 2791388)
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 (Post 2791388)
- 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 (Post 2791388)
- FX bones determine position/orientation of the played effects.

Yes.


Quote:

Originally Posted by gap (Post 2791388)
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 (Post 2791388)
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 :hmmm:

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.

Jeff-Groves 02-03-22 02:45 PM

Very good post on the FX files.
:up:

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

Say a panicked Crew man jumps off the ship at the Bow when torpedoed at the Stern and such.


All times are GMT -5. The time now is 08:46 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.