| View previous topic :: View next topic |
| Author |
Message |
Marhkimov
Joined: 22 May 2005 Posts: 2392 Location: Bay Area, California, USA
|
Posted: Tue Nov 29, 2005 5:00 am Post subject: 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? |
|
| Back to top |
|
 |
oRGy
Joined: 21 Apr 2005 Posts: 644
|
Posted: Tue Nov 29, 2005 12:44 pm Post subject: |
|
|
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 |
|
 |
Type941
Joined: 17 May 2005 Posts: 1311 Location: U-52
|
Posted: Tue Nov 29, 2005 5:22 pm Post subject: |
|
|
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: :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 |
|
 |
Marhkimov
Joined: 22 May 2005 Posts: 2392 Location: Bay Area, California, USA
|
Posted: Tue Nov 29, 2005 5:42 pm Post subject: |
|
|
| 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 |
|
 |
iambecomelife
Joined: 11 Apr 2005 Posts: 1047
|
Posted: Tue Nov 29, 2005 6:14 pm Post subject: |
|
|
| 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 |
|
 |
oRGy
Joined: 21 Apr 2005 Posts: 644
|
Posted: Thu Dec 01, 2005 4:39 pm Post subject: |
|
|
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 |
|
 |
Marhkimov
Joined: 22 May 2005 Posts: 2392 Location: Bay Area, California, USA
|
Posted: Thu Dec 01, 2005 4:41 pm Post subject: |
|
|
| oRGy wrote: | | Not my area of expertise however. |
Not mine either... |
|
| Back to top |
|
 |
timetraveller
Joined: 23 Dec 2004 Posts: 967 Location: Atlantic Shipping Lanes
|
Posted: Thu Dec 01, 2005 7:44 pm Post subject: |
|
|
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 |
|
 |
coronas
Joined: 27 May 2005 Posts: 65 Location: Oviedo, España
|
Posted: Thu Dec 01, 2005 8:25 pm Post subject: |
|
|
| could be putting the light of the lighthouses in ships? |
|
| Back to top |
|
 |
Marhkimov
Joined: 22 May 2005 Posts: 2392 Location: Bay Area, California, USA
|
Posted: Thu Dec 01, 2005 8:28 pm Post subject: |
|
|
| 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 |
|
 |
Cdre Gibs
Joined: 27 Apr 2005 Posts: 742
|
Posted: Thu Dec 01, 2005 8:40 pm Post subject: |
|
|
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 |
|
 |
coronas
Joined: 27 May 2005 Posts: 65 Location: Oviedo, España
|
Posted: Thu Dec 01, 2005 9:01 pm Post subject: |
|
|
| ....Another sugestion: On top of some structure (a mast, funnel, bridge) |
|
| Back to top |
|
 |
Marhkimov
Joined: 22 May 2005 Posts: 2392 Location: Bay Area, California, USA
|
Posted: Thu Dec 01, 2005 9:05 pm Post subject: |
|
|
| 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 |
|
 |
iambecomelife
Joined: 11 Apr 2005 Posts: 1047
|
Posted: Fri Dec 02, 2005 10:05 pm Post subject: |
|
|
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 |
|
 |
timetraveller
Joined: 23 Dec 2004 Posts: 967 Location: Atlantic Shipping Lanes
|
Posted: Sun Dec 04, 2005 10:11 am Post subject: |
|
|
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 |
|
 |
|