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

Reply
 
Thread Tools Display Modes
Old 11-29-05, 05:00 AM   #1
Marhkimov
Admiral
 
Join Date: May 2005
Location: Bay Area, California, USA
Posts: 2,377
Downloads: 0
Uploads: 0
Default Making Hospital Ships Light Up

Does anyone know how these building windows are lit up at night?



I reason that if we know how these function, then we can also make hospital ships have "lighted" windows and whatnot.

So does anyone think they can give it a shot?
__________________
It takes two to tango
Marhkimov is offline   Reply With Quote
Old 11-29-05, 12:44 PM   #2
oRGy
Crusty
 
Join Date: Apr 2005
Posts: 648
Downloads: 8
Uploads: 0
Default

It's an overlay texture, basically the night time texture is the same as the daylight one except that everything except the lit up windows is an alpha (transparent) layer and the texture is then unlit.

I don't know how to apply this to ships, or if its hardcoded.

The overlay textures are in some dat or other, maybe harbor_kit or something.
__________________

oRGy is offline   Reply With Quote
Old 11-29-05, 05:22 PM   #3
Type941
Ace of the Deep
 
Join Date: May 2005
Location: U-52
Posts: 1,270
Downloads: 2
Uploads: 0
Default

That would be one beautiful and awesome sight in dark seas - a fully lit up ship... Than watch it sink and lights blink on and off? how evil.

In fact, I believe this was already brought up before, when someone asked if it's possible to have ships travel with their identification lights. And nothing ever came our of that, so I reckon it's impossible at this point.
__________________

Sink the Bismarck SH3 Movie
Type941 is offline   Reply With Quote
Old 11-29-05, 05:42 PM   #4
Marhkimov
Admiral
 
Join Date: May 2005
Location: Bay Area, California, USA
Posts: 2,377
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by Type941
In fact, I believe this was already brought up before, when someone asked if it's possible to have ships travel with their identification lights. And nothing ever came our of that, so I reckon it's impossible at this point.
I saw the old thread, but I don't know if any modders tried to look for results... This time maybe someone might give it a try...
__________________
It takes two to tango
Marhkimov is offline   Reply With Quote
Old 11-29-05, 06:14 PM   #5
iambecomelife
Silent Hunter
 
Join Date: Apr 2005
Posts: 4,706
Downloads: 300
Uploads: 0


Default

That would really be a nice touch. I wanted to do it for the Hospital Ship mod, as well as another mod in the works, but it's beyond my ability .
iambecomelife is offline   Reply With Quote
Old 12-01-05, 04:39 PM   #6
oRGy
Crusty
 
Join Date: Apr 2005
Posts: 648
Downloads: 8
Uploads: 0
Default

The key would be to look in harbor_kit.dat or wherever these textures are stored, comparing to another land object dat and see if there's some sort of value that defines the night skin.

If there is, some advanced modder might be able to hack into a ship .dat, somehow - it could also be in the model material settings.

Not my area of expertise however.
__________________

oRGy is offline   Reply With Quote
Old 12-01-05, 04:41 PM   #7
Marhkimov
Admiral
 
Join Date: May 2005
Location: Bay Area, California, USA
Posts: 2,377
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by oRGy
Not my area of expertise however.
Not mine either...
__________________
It takes two to tango
Marhkimov is offline   Reply With Quote
Old 12-01-05, 07:44 PM   #8
timetraveller
Beach Leaf
 
Join Date: Dec 2004
Location: Atlantic Shipping Lanes
Posts: 287
Downloads: 1
Uploads: 0
Default

I had a look.

Some of the building textures in the Harbor_kit.dat come with a night overlay, like Orgy mentioned. Each night overlay file is also referenced in the Harbor_kit.dat file.

Unpack the Harbor_kit.dat and you can see 5 textures, each having night counterparts. Kit_01.tga + Kit_01_N.tga (that's the night counterpart for Kit_01), through Kit_05.tga/Kit_05_N.tga.

Unfortunately, ships, subs, planes don't have a night version of their texture. The only thing I could come up with was the dynamic lighting and shadows, but not sure how to tweak that stuff, or if it would make any "night" difference anyway. They all use a common reflected light source, even the ocean, and I suspect it doesn't even work at night, or is greatly muted then.

Maybe another way will be discovered.

TT

Kit_01 example Day/Night
timetraveller is offline   Reply With Quote
Old 12-01-05, 08:25 PM   #9
coronas
Ace of the Deep
 
Join Date: May 2005
Location: Asturias, España
Posts: 1,168
Downloads: 39
Uploads: 0
Default

could be putting the light of the lighthouses in ships?
coronas is offline   Reply With Quote
Old 12-01-05, 08:28 PM   #10
Marhkimov
Admiral
 
Join Date: May 2005
Location: Bay Area, California, USA
Posts: 2,377
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by coronas
could be putting the light of the lighthouses in ships?
Yeah, isn't this possible?

I thought I saw Sergbuto do this?
__________________
It takes two to tango
Marhkimov is offline   Reply With Quote
Old 12-01-05, 09:01 PM   #11
coronas
Ace of the Deep
 
Join Date: May 2005
Location: Asturias, España
Posts: 1,168
Downloads: 39
Uploads: 0
Default

....Another sugestion: On top of some structure (a mast, funnel, bridge)
coronas is offline   Reply With Quote
Old 12-01-05, 09:05 PM   #12
Marhkimov
Admiral
 
Join Date: May 2005
Location: Bay Area, California, USA
Posts: 2,377
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by coronas
....Another sugestion: On top of some structure (a mast, funnel, bridge)
bow, stern, etc... any light is better than no light.
__________________
It takes two to tango
Marhkimov is offline   Reply With Quote
Old 12-02-05, 10:05 PM   #13
iambecomelife
Silent Hunter
 
Join Date: Apr 2005
Posts: 4,706
Downloads: 300
Uploads: 0


Default

I have no idea how to work on the alpha channel, but I may look into it. I had a workaround for this planned: having an invisible enemy unit attached to the hospital ship, either sailing parallel or spawning in the same group (if this is possible). This would "alert" its sensors, causing the large number of searchlights to stay on. I put together a mission last night where a German hospital ship encountered a British convoy at night, and the hospital ship looked quite spectacular all lit up - at least until the escorts blew her out of the water.

Can anyone reccomend a tutorial for working with Alpha channels? I think I'd rather do it that way than with the complicated scheme above.
iambecomelife is offline   Reply With Quote
Old 12-04-05, 10:11 AM   #14
timetraveller
Beach Leaf
 
Join Date: Dec 2004
Location: Atlantic Shipping Lanes
Posts: 287
Downloads: 1
Uploads: 0
Default

iambecomelife,

There is a great freeware program out there called dxtBMP which makes working on images with alpha channels a snap. It was originally written for the flight sim community, but works with any DDS or TGA graphic as a front end program for editing them.

Get it at:

http://www.mnwright.btinternet.co.uk/

Click on the dxtBMP button at the bottom of the page to take you to the right page.

The idea behind this program is you open the DDS or TGA file into it, and then you can send the graphic itself or its alpha channel to your existing graphic editing program. The graphic or alpha sent is in bitmap (BMP) form, so almost any graphic editing program will work.

After modifying the graphic or alpha channel, you 'save' the BMP (it goes to a temp file - don't use 'save as'), go back to dxtBMP, and retrieve it. From dxtBMP, you can then easily resave the DDS or TGA.

I've used dxtBMP for several years now, using it on many different game's graphics. It works magic with a simple companion image editing program. It avoids the weirdness and complexity of working with alphas in Photoshop or PaintShopPro which are guaranteed to confuse.

Good luck.

TT
timetraveller is offline   Reply With Quote
Old 12-05-05, 03:06 PM   #15
coronas
Ace of the Deep
 
Join Date: May 2005
Location: Asturias, España
Posts: 1,168
Downloads: 39
Uploads: 0
Default

Same problem in CFS 3.This treat is interesting, Wish can help!
http://www.sim-outhouse.com/sohforum...ead.php?t=9590
coronas 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 04:26 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.