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 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)

TheDarkWraith 05-03-11 05:20 PM

NKMCS_Akita looks excellent now :D
http://www.subsim.com/radioroom/pict...pictureid=4171

NMFMSSS_Kasagisan looking good now also:
http://www.subsim.com/radioroom/pict...pictureid=4172

and the PT boat is looking killer!
http://www.subsim.com/radioroom/pict...pictureid=4173

Rongel 05-03-11 05:47 PM

Quote:

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)
Are you sure about this? Because the rust is visible in SH 4. I've tried to mimic Sh 4 .dat files and my ship is basically the same, no images embedded. I can modify my occlusion map and the rust can be painted off. I managed to get rid of the lighting change too. We should compare our ships to see that which is the best and easiest way to go. I can send you my ship tomorrow and it would be great to have a look what you have done :yeah: Okay, good night all!

EDIT: Thanks for the files, tdw!

TheDarkWraith 05-03-11 06:02 PM

Quote:

Originally Posted by Rongel (Post 1656040)
Are you sure about this? Because the rust is visible in SH 4. I've tried to mimic Sh 4 .dat files and my ship is basically the same, no images embedded. I can modify my occlusion map and the rust can be painted off. I managed to get rid of the lighting change too. We should compare our ships to see that which is the best and easiest way to go. I can send you my ship tomorrow and it would be great to have a look what you have done :yeah: Okay, good night all!

EDIT: Thanks for the files, tdw!

No I'm not sure at all. I played SH4 for maybe a whole 10mins then it became a dust collector. From the little I know about 3D modelling/imaging (from books) occlusion maps should be just for light occlusion - they should do nothing for rendered images (it's for a game engine's lighting calculations for objects). All the image rendering should come from the texture(s) defined for the 3D model.

The one thing you have to look for to see whether what you're doing is looking right or not is view the object at an angle to the light source. You shouldn't see any 'artifacts' on the rendered image. Let the sun be low on the horizon and don't look at the object broadside but rather almost parallel (looking front or back) with the camera very close to the object and see if you see any 'artifacts' or not.

THE_MASK 05-03-11 06:32 PM

I can alter them in photo shop to show diffrent colors on the object . For example i can add rust to Uboat7A_O01 dds to give a rust look to parts of the conning tower .. I admit this isnt the right way to do it .

Zedi 05-04-11 12:49 AM

A lot of data here, but a bit confusing. So where is the right _T and _N is stored now? Embedded in DAT, externally stored in Sea or in Tex ? Because I see the same texture in all of these locations and I wanna clean up a bit. Also, what type of tex we use now, tga or dds?

There is a small problem with Elco. She is listed as.. escort ship in the roster. And that will make the game to use her as generic escort for convoys. Now having this guys to cross the Atlantic as escort.. is a bit too much to ask. And to change every single traffic/convoy in all the campaign files just to customize the escorts.. is too much for me. So what can we do with this guys to assign him only to coast patrol? Create a new type entry in the roster?

Later edit: Is impossible to make screenshost in campaign with the ships. Played almost 3 hours and used max TC, but all ive got was light fog, heavy fog, ridiculous fog and so on. If someone can remove the fog from the game, he will be my hero. Anyway, in TDW version the skined ships finally lost their rust and transparency on the hull, but they are almost white.. like some hospital ships. I presume this si also related to the occlusion map or something. I will add skin to the new ship and make some more test later.

Rongel 05-04-11 02:57 AM

Hi again! I tested TDW's ship, and it I found too that the occlusion map had wanished. It took away the rust, but also lighting effects and made the ship look somewhat crude in my opinion. I have those effects but I have other small problems that need fixing.

I think the rust should be visible if it's visible in the occlusion map. I made a test with SH 4 with Zedi's white ship. Still using stock occlusion map with rust:

http://i1138.photobucket.com/albums/..._92848_899.jpg

As you can see, the rust is visible. Nice looking ship in sh 4 too!

Zedi 05-04-11 03:11 AM

I think the rust part is stored in the alpha channel of the occ map. If I could manage to add the new texture as an alpha channel to this map, problem could be solved. But that alpha channel is made in a way that is beyond my understanding. Somehow its stored only a transparency layer of the original texture map and I have absolutely no clue how is this done.

Im a noob in working with game texture files and found no tutorial that explain how to set up a similar alpha channel that stores only transparency, actually I saw no game doing this. Usually the alpha channel is used to show/hide parts of the texture or elements in the graphic file, not only the transparency level. I dont even understand why is needed to store the transparency of a texture. So im a complete noob, or those who did this are because was the only way to hide a bug.

Rongel 05-04-11 03:32 AM

Quote:

I think the rust part is stored in the alpha channel of the occ map. If I could manage to add the new texture as an alpha channel to this map, problem could be solved. But that alpha channel is made in a way that is beyond my understanding. Somehow its stored only a transparency layer of the original texture map and I have absolutely no clue how is this done.
I believe that the rust is just showing in the occlusion texture, not alpha channel. You can paint it off, and we could probably use also SH 5 occlusion map (wonder what that would look like)? Yes, the alpha channel looks weird, but I think it's just adding effects to some areas, like details, pieces of metal that shine in the sun... The rust is showing simply because we use occlusion map with rust. And the rust won't show if we don't use occlusion map at all. If I would use occlusion map completely without rust (I haven't done this yet) there wouldn't be rust. I think rust is not the issue! :D Of course I might be completely wrong too!

I could Zedi send my ship to you and see what you think of it, but I try to fix the small problem first.

Zedi 05-04-11 04:34 AM

Quote:

Originally Posted by Rongel (Post 1656252)
...
I could Zedi send my ship to you and see what you think of it, but I try to fix the small problem first.

Please do. As I said, TDW version is oke regarding the texture transparency, but now is all white like a hospital ship. I can make the textures more darker, but Im not sure this is the right direction to go.

Rongel 05-04-11 05:19 AM

Quote:

Please do. As I said, TDW version is oke regarding the texture transparency, but now is all white like a hospital ship. I can make the textures more darker, but Im not sure this is the right direction to go.
Little delay, I'm pretty sure I had it working, but then changed something and can't seem to get it back.... :damn:


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