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)
-   -   [TEC] Adding/Importing new units / SH5 Damage/collision models (https://www.subsim.com/radioroom/showthread.php?t=182667)

Rongel 05-03-11 12:08 PM

I think this start to look pretty good! The wake needs tuning and the watersprouts too, but I'm liking it. This bothers me that light is showing on the wrong side! When I go to the opposite side, it's not illuminated.

http://i1138.photobucket.com/albums/...-03_194739.jpg
Maybe we could add SH 5 guns and objects to the ship, it worked with crew members.

TheDarkWraith 05-03-11 12:09 PM

Quote:

Originally Posted by Rongel (Post 1655803)
I think this start to look pretty good! The wake needs tuning and the watersprouts too, but I'm liking it. This bothers me that light is showing on the wrong side! When I go to the opposite side, it's not illuminated.

try inverting the occulsion map RGB channels.

Zedi 05-03-11 12:12 PM

Quote:

Originally Posted by TheDarkWraith (Post 1655790)
Ok, send me a ship in question that has this problem or tell me which ship it is in the latest archive you sent me. I have an idea...

Any ship. Look at the textures I sent you, then look at the result in the game. Ofc, embed first my textures in you latest DAT files.

There is something that causing everything to look wrong, will fault the shadows, light &dark side, water reflection on hull etc. The old rusty skin should be absolutely invisible.

Rongel 05-03-11 12:30 PM

Quote:

Any ship. Look at the textures I sent you, then look at the result in the game. Ofc, embed first my textures in you latest DAT files.

There is something that causing everything to look wrong, will fault the shadows, light &dark side, water reflection on hull etc. The old rusty skin should be absolutely invisible.
Be sure that the dat file isn't using any other files, I had this problem. Delete all dds files (or move the somewhere safe!) and keep only the three targa textures in your ship folder. They should be exactly same as those that were embedded in your dat file just in case. I can see now in S3d if the ship looks like it should, and it saves some precious time:

http://i1138.photobucket.com/albums/...ognels/s3d.jpg

TheDarkWraith 05-03-11 03:41 PM

Quote:

Originally Posted by Zedi (Post 1655805)
Any ship. Look at the textures I sent you, then look at the result in the game. Ofc, embed first my textures in you latest DAT files.

There is something that causing everything to look wrong, will fault the shadows, light &dark side, water reflection on hull etc. The old rusty skin should be absolutely invisible.

the reason is because the x_Oxx map is being rendered also. It appears that the x_Oyy and x_Tyy maps are being blended together and rendered in game. Maybe we need to fix the alpha channel on the x_Oyy map :hmmm:

Rongel 05-03-11 03:45 PM

Okay, last notes for the day:

I don't think we have to embed anything. Been testing without and no problems for me. So maybe we can use .dds files everywhere??

Managed to import guns and searchlights from SH 4. They have textures and at least the guns are working (currently they are robot guns, no crew needed :D). It seemed that SH 5 objects (other than crew) won't render so this might help.

TheDarkWraith 05-03-11 03:53 PM

Quote:

Originally Posted by Rongel (Post 1655941)
Okay, last notes for the day:

I don't think we have to embed anything. Been testing without and no problems for me. So maybe we can use .dds files everywhere??

Managed to import guns and searchlights from SH 4. They have textures and at least the guns are working (currently they are robot guns, no crew needed :D). It seemed that SH 5 objects (other than crew) won't render so this might help.

will look into the above.

There is something of interest here: take the type 2/0 _Txx node and the type 2/0 _Oxx node and the Type 2/0 _Nxx node and give them names of 'texture', 'occlusion' and 'normal' respectively. Problem that Zedi was having is gone :D Now I'm checking to see if we can leave the _Txx node as cfg#TXR_ or not....

Anothing thing to note is the game reads the x_Oyy map and the x_Nyy map ONLY from the \data\Sea folder of the ship. It does NOT read the x_Tyy file from there. If you want to override the embedded texture then you have to place it in \data\Textures\TNormal\tex. Been doing a LOT of testing/figuring out today :yep:

TheDarkWraith 05-03-11 04:07 PM

@Zedi: how does this look ;)
http://www.subsim.com/radioroom/pict...pictureid=4169

:D:|\\

For the above this is how I made it work:

- class name for this ship is NMFMPC (\data\Sea\NMFMPC)
- all the embedded images are .tgas
- the occlusion (_Oxx) embedded image had the strange alpha channel as found in SH4 occulsion images
- the Type 2/0 Node for the texture map (_Txx) was named texture and it uses an external texture named 'class name_T01.tga' (this map has NO alpha channel)
- the Type 2/0 Node for the occlusion map (_Oxx) was named occlusion and it uses an external texture named 'class name_O01.tga' (this map has an alpha channel - the screwed up looking one common in SH4 style _Oxx maps)
- the Type 2/0 Node for the normal map (_Nxx) was named normal and it uses an external texture named 'class name_N01.tga' (this map has NO alpha channel)
- the 'class name_T01.dds' was located in \data\Textures\TNormal\tex (this was Zedi's texture he provided)
- the 'class name_O01.tga' was located in \data\Sea\class name
- the 'class name_N01.tga' was located in \data\Sea\class name
- all the Type 2/0 nodes are using linear filtering with no in-memory compression
- the Type 2/0 nodes for occlusion and normal maps are 2 sided
- every Type 4/0 node was checked to see how many texture sets were defined. If 3 were defined then the maps in order were:
class name_T01.tga
class name_O01.tga
class name_N01.tga
- the DMG_col node had NO textures defined for it
- the DMG_ nodes had all 3 textures defined for it
- all the Reflect_ nodes had all 3 textures defined for it
- placed Zedi's NMFMPC_T01.dds file in \data\Textures\TNormal\tex

NOTE: setting ANY of the Type 2/0 nodes to names of cfg#TXR_x where x = class name resulted in texture/lighting problems
NOTE2: removing the embedded texture for the 'class name_T01' resulted in texture/lighting problems
NOTE3: sun shines on correct side (normal and occlusion maps are working correctly)
NOTE4: damage/collision model working correctly (no damaged texture problem)
NOTE5: caustic effects are only rendered on sunlight side
NOTE6: Unified render controller settings:
MediumLODDistance: 15.0
LowLODDistance: 80.0
BumpEnable: True
SpecularMaskEnable: True
SelfOccEnable: True
UseSpecularFromDiffuse: False
NOTE7: between far away distance and close distances the 'lighting' of the ship DOES NOT snap from light/dark to dark/light

same ship rendered with it's embedded T01 image (deleted Zedi's .dds file from \data\Textures\TNormal\tex):
http://www.subsim.com/radioroom/pict...pictureid=4170

Rongel 05-03-11 04:39 PM

Too tired to analyze anything but I got too quite good results! Sun shines on correct side! I played around with the unified render controllers:

MediumLODDistance: 0 or below if possible
Bumpenable: False
SpecularMaskEnable: True
SelfOccEnable: True
UseSpecularFromDiffuse: False

http://i1138.photobucket.com/albums/...-04_005046.jpg

http://i1138.photobucket.com/albums/...-04_005135.jpg

Otherwise looks good, but when you go really close to the ship, the sun illumination changes like snap, not sure if this can be disabled.... I'm not sure if this is better or worse than TDW's current setup, have to compare.... But now to sleep...

Zedi 05-03-11 04:53 PM

Looks very good TDW, finally the rust is gone.. but the whole ships is a bit too white. But I think I can fix that.

In the meantime I tested the baby in Mare Nostrum campaign and here is coming out nicely from fog and then being into a generic traffic.

http://i1232.photobucket.com/albums/...g?t=1304459228

http://i1232.photobucket.com/albums/...g?t=1304459228

Inside a convoy is very easy to spot it as is white, instead of gray as the rest of the ships. And there is a small problem with the balance when she is sailing on high waves. The ships is bouncing a bit too much ...

But overall looks good. TDW pls send me an update with the files you got fixed. Im also too tired to read and understand stuff now.

TheDarkWraith 05-03-11 04:58 PM

Quote:

Originally Posted by Zedi (Post 1655994)
Looks very good TDW, finally the rust is gone.. but the whole ships is a bit too white. But I think I can fix that.

In the meantime I tested the baby in Mare Nostrum campaign and here is coming out nicely from fog and then being into a generic traffic.
Inside a convoy is very easy to spot it as is white, instead of gray as the rest of the ships. And there is a small problem with the balance when she is sailing on high waves. The ships is bouncing a bit too much ...

But overall looks good. TDW pls send me an update with the files you got fixed. Im also too tired to read and understand stuff now.

Looking good :yeah: I'll send you the updated NMFMPC ship here very soon. Just have to package it up. It is using the stock normal and occlusion maps (.dds) files so you may want to change them. Your texture is located in \data\Textures\TNormal\tex. Delete it to use embedded T01 texture.

Rongel 05-03-11 05:10 PM

Ok, have to compare my setup with your ship. I have otherwise working ship, except that the lighting snaps when really close. But not today!

TheDarkWraith 05-03-11 05:11 PM

Quote:

Originally Posted by Rongel (Post 1655990)
Too tired to analyze anything but I got too quite good results! Sun shines on correct side! I played around with the unified render controllers:

MediumLODDistance: 0 or below if possible
Bumpenable: False
SpecularMaskEnable: True
SelfOccEnable: True
UseSpecularFromDiffuse: False

Otherwise looks good, but when you go really close to the ship, the sun illumination changes like snap, not sure if this can be disabled.... I'm not sure if this is better or worse than TDW's current setup, have to compare.... But now to sleep...

the rust is showing on yours which means the occlusion (_Oxx) and the texture (_Txx) maps are being blended together during rendering. Check the occlusion map and you'll see it's the one with the rust on it....Shouldn't have to disable bump map either (BumpEnable = False above)

Rongel 05-03-11 05:15 PM

My occlusion map has some rust in it :D On the other side to be correct

http://i1138.photobucket.com/albums/...gnels/rust.jpg

TheDarkWraith 05-03-11 05:17 PM

exactly...that shouldn't be showing up in game. The occlusion map is just for that occlusion testing for lighting...no rendering. That is the problem. You shouldn't see any of that rust unless it's also on the texture (_Txx)


All times are GMT -5. The time now is 07:58 AM.

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