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

Reply
 
Thread Tools Display Modes
Old 09-11-07, 08:45 AM   #1
DeepIron
Sea Lord
 
Join Date: Aug 2007
Location: Too far from the Pacific right now...
Posts: 1,634
Downloads: 0
Uploads: 0
Default "O" files...

Hi folks... Ok, I'm banging my head on this one...
Does anyone know what the "O" prefixed texture files are for? For example: NDD_Akizuki_O01.dds, NDD_Akizuki_O02.dds ... :hmm:

I'm working on new content for SH4 http://www.subsim.com/radioroom/showthread.php?t=111177
and having a problem figuring out what they do and how they were made. My assumption is that they are used as lighting maps but I'm not sure. Can anyone who may have messed about modding SH4 textures shed some light on these? Thx!
DeepIron is offline   Reply With Quote
Old 09-11-07, 08:55 AM   #2
tater
Navy Seal
 
Join Date: Mar 2007
Location: New Mexico, USA
Posts: 9,023
Downloads: 8
Uploads: 2
Default

http://www.subsim.com/radioroom/showthread.php?t=120918

The O files actually map the SHAPES on the object, unlike the T file which seems to be the texture, but parts of it are borrowed by different areas.

tater
tater is offline   Reply With Quote
Old 09-11-07, 09:16 AM   #3
skwasjer
The Old Man
 
Join Date: Apr 2007
Location: Netherlands
Posts: 1,549
Downloads: 26
Uploads: 3
Default

Let me explain:

The Oxx textures are a combination of 2 textures. The RGB channel is an ambient occlusion map (prerendered details/shades/scratches/rust), and is mapped onto the model using a secondary UV-set (from TMAP). It gives large surfaces more diversity (which would look very plain with only 1 texture, see ship hulls in SH3) and the prerendered shadows can emphasize dark areas.

The alpha channel is a height map, and is used for bumpmapping (as are Nxx textures) which is a way to 'fake' depth on a flat surface (for instance door handles, window frames, rivets).

Here's a screenshot of the Txx texture and Oxx texture (RGB-channel!) mapped onto the Yamato:

http://www.subsim.com/radioroom/show...7&postcount=26
skwasjer is offline   Reply With Quote
Old 09-11-07, 09:29 AM   #4
tater
Navy Seal
 
Join Date: Mar 2007
Location: New Mexico, USA
Posts: 9,023
Downloads: 8
Uploads: 2
Default

The O layers actually show various hull form shapes, though. It seems like the only wat to put a specific pattern on a ship, for example. The T layer reuses the textures all over the ship. I am totally baffled by them
tater is offline   Reply With Quote
Old 09-11-07, 09:44 AM   #5
DeepIron
Sea Lord
 
Join Date: Aug 2007
Location: Too far from the Pacific right now...
Posts: 1,634
Downloads: 0
Uploads: 0
Default

Thx guys... after I posted I did an experiment and got pretty much the same results as skwasjer did... then I opened the .cfg in data/Roster/Japan/Sea and lo and behold! :

[Texture 1]
TextureName=data/Sea/JPGunBoat02/JPGunBoat02_T01.tga
LightmapTextureName=data/Sea/JPGunBoat02/JPGunBoat02_O01.tga
NormalmapTextureName=data/Sea/JPGunBoat02/JPGunBoat02_N01.tga
StartDate=19380101
EndDate=19451231
Frequency=1

Helps to have your Wheaties early in the morning... BEFORE posting...


Quote:
The O layers actually show various hull form shapes, though.
After reading the above threads and taters comment, I'm thinking that the easiest way to generate these beasts is to use the UV map I create and work in the 2D space component... (I'd have to show you, trust me...) applying a little creative gradient/blending function... It's going to be time consuming but perhaps I can write a procedure in the Gimp to automate it.

Will keep you posted...
DeepIron is offline   Reply With Quote
Old 09-11-07, 09:46 AM   #6
skwasjer
The Old Man
 
Join Date: Apr 2007
Location: Netherlands
Posts: 1,549
Downloads: 26
Uploads: 3
Default

Why baffled?

A single texture is too small to contain details for an entire (big) ship. That's why it mostly contains 'material' type sections (metal/wood/some doors/some windows/etc), and is applied to entire areas. It will not give alot of details, see it as an overall paint job.

The Oxx texture comes into play here. Big areas (like the hull) can be given more detail now. See this as the finishing paint brush job. 20 doors that would otherwise look the same or a hull with repeating metal look, can now be touched up by blending different scratches, rust and shades over it.
skwasjer is offline   Reply With Quote
Old 09-11-07, 09:55 AM   #7
tater
Navy Seal
 
Join Date: Mar 2007
Location: New Mexico, USA
Posts: 9,023
Downloads: 8
Uploads: 2
Default

I understand what is going on (sort of) but it's damn confusing to make a skin. I wanted to dazzle paint a merchant. Yeesh. In the ships with such paint in the stock game, it is all done in the O layers.

On another add a japanese flag on the side. I found the middle section in the O file, but it's like an alpha channel, you can't paint with white.


tater
tater is offline   Reply With Quote
Old 09-11-07, 10:06 AM   #8
tater
Navy Seal
 
Join Date: Mar 2007
Location: New Mexico, USA
Posts: 9,023
Downloads: 8
Uploads: 2
Default

OK, looked at them a little to remember what confused me.

Take the T file. The stuff is broken into texture areas that get used and reused around the ship. I understand that.

Now open the O file. The shapes of every little part of the ship is on there. Cool, I can paint a section a color, then see where it is on the ship. That is fine, too. What is confusing is this. If I open Levels, and I drop the outputs on R/G/B to zero, I see a version of the T file (different, but everything is in the same place). I understand that base layer, but what confuses me is that the little parts in the other channels---all the various surfaces of the ship---in no way relate to the T or O file in terms of what texture gets used for what part. So I cannot understand how to do dazzle paint, for example. Or even somethign as trivial as a meatball in a white field on the side of a black hull. I spent hours trying.
tater is offline   Reply With Quote
Old 09-11-07, 10:12 AM   #9
DeepIron
Sea Lord
 
Join Date: Aug 2007
Location: Too far from the Pacific right now...
Posts: 1,634
Downloads: 0
Uploads: 0
Default

Quote:
you can't paint with white...
I'm going to make a blanket statement here. Paint programs will handle alpha channels in different ways so YMMV...

True IF you declare 255,255,255 as the color of your alpha. Change your flag background color to 255,255,254 (or similar) and you should be able paint. The user won't notice the difference...

I've been adding and merging layers in my tests on the new vessels for exactly the same purpose... adding 2D details to keep the poly counts down...
DeepIron is offline   Reply With Quote
Old 09-11-07, 10:44 AM   #10
skwasjer
The Old Man
 
Join Date: Apr 2007
Location: Netherlands
Posts: 1,549
Downloads: 26
Uploads: 3
Default

The alpha channel is a height map and represents information (0-255 height), not actual pixels. Don't use it to control opacity, because it's not what it is for...

As far as the RGB channel, again, this uses a different UV-set, which is why it is layout out differently... Pack3D does not export these UV coordinates. Read up on some of my old threads, or ones where I contribute to understand more about models and how the game renders them. It has all been discussed before...
skwasjer is offline   Reply With Quote
Old 09-11-07, 10:51 AM   #11
DeepIron
Sea Lord
 
Join Date: Aug 2007
Location: Too far from the Pacific right now...
Posts: 1,634
Downloads: 0
Uploads: 0
Default

Quote:
The alpha channel is a height map...
<CLICK> Ok, the light is now on.... thx skwasjer...

Quote:
Read up on some of my old threads, or ones where I contribute to understand more about models and how the game renders them. It has all been discussed before...
Yeah but if you had them all linked in one place... I wouldn't have to chase all over the forums looking for them... LOL!

I guess the other aspect is this: How much of the SH3 mods and info are relevant to SH4? I notice a fair number of SH4 mod links refer to SH3. I didn't play SH3 so I'm at a loss in regards to the mods there...

Last edited by DeepIron; 09-11-07 at 11:16 AM.
DeepIron is offline   Reply With Quote
Old 09-17-07, 10:10 AM   #12
Anvart
Admiral
 
Join Date: Jan 2006
Location: Russia ®
Posts: 2,492
Downloads: 122
Uploads: 1
Default

Quote:
Originally Posted by skwasjer
The alpha channel is a height map and represents information (0-255 height), not actual pixels. Don't use it to control opacity, because it's not what it is for...

As far as the RGB channel, again, this uses a different UV-set, which is why it is layout out differently... Pack3D does not export these UV coordinates. Read up on some of my old threads, or ones where I contribute to understand more about models and how the game renders them. It has all been discussed before...

Pack3D exports all Vt coordinates ...
Pack3D does not export Vt (Vn!) indexes sequence from section TMAP, and read all as Vt coord's ...
__________________
Alex ®


Moses said: "Don't create yourself an idol"...

Last edited by Anvart; 11-20-07 at 09:06 AM.
Anvart is offline   Reply With Quote
Old 09-17-07, 10:44 AM   #13
skwasjer
The Old Man
 
Join Date: Apr 2007
Location: Netherlands
Posts: 1,549
Downloads: 26
Uploads: 3
Default

Pack3D is still useless to export the extra UV-sets. I was giving them an easy answer...

skwasjer is offline   Reply With Quote
Reply


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 06:05 PM.


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.