Forum Index
SUBSIM Forum Search

The Web's #1 BBS for all submarine and naval simulations!
[ SUBSIM Review ] [ SUBSIM STORE ]
Current Forum | Archives 2002-2003 |

Making Hospital Ships Light Up
Goto page 1, 2  Next
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Forum Index -> SH3 Mods Workshop
View previous topic :: View next topic  
Author Message
Marhkimov



Joined: 22 May 2005
Posts: 2392
Location: Bay Area, California, USA

PostPosted: Tue Nov 29, 2005 5:00 am    Post subject: Making Hospital Ships Light Up Reply with quote

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?
Back to top
View user's profile Send private message
oRGy



Joined: 21 Apr 2005
Posts: 644

PostPosted: Tue Nov 29, 2005 12:44 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Send e-mail
Type941



Joined: 17 May 2005
Posts: 1311
Location: U-52

PostPosted: Tue Nov 29, 2005 5:22 pm    Post subject: Reply with quote

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. :huh: Argh :nope:

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.
Back to top
View user's profile Send private message
Marhkimov



Joined: 22 May 2005
Posts: 2392
Location: Bay Area, California, USA

PostPosted: Tue Nov 29, 2005 5:42 pm    Post subject: Reply with quote

Type941 wrote:
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...
Back to top
View user's profile Send private message
iambecomelife



Joined: 11 Apr 2005
Posts: 1047

PostPosted: Tue Nov 29, 2005 6:14 pm    Post subject: Reply with quote

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 :nope: .
Back to top
View user's profile Send private message Send e-mail
oRGy



Joined: 21 Apr 2005
Posts: 644

PostPosted: Thu Dec 01, 2005 4:39 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Send e-mail
Marhkimov



Joined: 22 May 2005
Posts: 2392
Location: Bay Area, California, USA

PostPosted: Thu Dec 01, 2005 4:41 pm    Post subject: Reply with quote

oRGy wrote:
Not my area of expertise however.


Not mine either...
Back to top
View user's profile Send private message
timetraveller



Joined: 23 Dec 2004
Posts: 967
Location: Atlantic Shipping Lanes

PostPosted: Thu Dec 01, 2005 7:44 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail Visit poster's website
coronas



Joined: 27 May 2005
Posts: 65
Location: Oviedo, España

PostPosted: Thu Dec 01, 2005 8:25 pm    Post subject: Reply with quote

could be putting the light of the lighthouses in ships?
Back to top
View user's profile Send private message
Marhkimov



Joined: 22 May 2005
Posts: 2392
Location: Bay Area, California, USA

PostPosted: Thu Dec 01, 2005 8:28 pm    Post subject: Reply with quote

coronas wrote:
could be putting the light of the lighthouses in ships?


Yeah, isn't this possible?

I thought I saw Sergbuto do this?
Back to top
View user's profile Send private message
Cdre Gibs



Joined: 27 Apr 2005
Posts: 742

PostPosted: Thu Dec 01, 2005 8:40 pm    Post subject: Reply with quote

Only problem is any light source (ie: Light house, search light) tends to cut right on threw any object. There for IF you place the light house light inside a ship or indeed even a search light, that light source will show up right threw the side of the ship steel structure. Not good.

Ship lights coming threw open hatch's, port holes an what not can be done via the ALPHA CHANNEL that each ship texture has. ATM the alpha channel is not realy being used for very much, thats where I'd apply lights.
Back to top
View user's profile Send private message
coronas



Joined: 27 May 2005
Posts: 65
Location: Oviedo, España

PostPosted: Thu Dec 01, 2005 9:01 pm    Post subject: Reply with quote

....Another sugestion: On top of some structure (a mast, funnel, bridge)
Back to top
View user's profile Send private message
Marhkimov



Joined: 22 May 2005
Posts: 2392
Location: Bay Area, California, USA

PostPosted: Thu Dec 01, 2005 9:05 pm    Post subject: Reply with quote

coronas wrote:
....Another sugestion: On top of some structure (a mast, funnel, bridge)


bow, stern, etc... any light is better than no light.
Back to top
View user's profile Send private message
iambecomelife



Joined: 11 Apr 2005
Posts: 1047

PostPosted: Fri Dec 02, 2005 10:05 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Send e-mail
timetraveller



Joined: 23 Dec 2004
Posts: 967
Location: Atlantic Shipping Lanes

PostPosted: Sun Dec 04, 2005 10:11 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Forum Index -> SH3 Mods Workshop All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group