Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3   Go Down

Author Topic: Is it possible to have ships partially sink in shallow water?  (Read 1523 times)

0 Members and 2 Guests are viewing this topic.

WxTech

  • Modder
  • member
  • Online Online
  • Posts: 6040
Re: Is it possible to have ships partially sink in shallow water?
« Reply #12 on: August 24, 2024, 06:08:21 AM »

I would still vastly prefer to use the pixel RGB value from map_c.tga as the measure of water depth under a ship. The resolution of map_C is usually 50m, which is precise enough. I've looked for any useage of map_C in any classes, but find nothing. There is useage of map_H (height map) and map_T (type map). I suspect that the way map_C is constructed in its tiled form could be one reason for this, and so I figure a dll is where this map is treated. If so, that's too bad. :(

I wonder if one could make up a contiguous 'map_C' at the same pixel resolution (200m, so as to not have the 16X larger file size as a 50m resolution would involve) as for map_H/map_T. Then the ship's map X/Y location could be compared against this 'map_C' for the RGB value at that pixel. This would be ideal for maps which have shoals far from shore. Currently the computed water depth is effectively conducted only within 355m of a shoreline; beyond that the depth is the default 1km. The new algorithm could then be constructed so as to place priority on the current method, it having a far better resolution than 200m. If no land is found via this search, the pixel value from the new 'map_C' would be used, which nicely handles shallows far from a shoreline.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

RABIZO

  • member
  • Offline Offline
  • Posts: 512
Re: Is it possible to have ships partially sink in shallow water?
« Reply #13 on: August 24, 2024, 06:13:27 AM »

"Glenn" I'm looking forward to a great effect.

During the war, there were many sunken ships along the coastline where the Japanese military was stationed.

I would be very happy if I could express such a landscape.

Now I remember what my father told me.
Logged

genXgamer

  • member
  • Offline Offline
  • Posts: 1358
Re: Is it possible to have ships partially sink in shallow water?
« Reply #14 on: August 24, 2024, 06:26:07 AM »

Really good, I'm liking the direction this is heading.
Logged
Go in quickly - Punch hard - Get out!

gunny0134

  • member
  • Offline Offline
  • Posts: 1152
  • no skill just simple, but seek the best beauty !!
Re: Is it possible to have ships partially sink in shallow water?
« Reply #15 on: August 24, 2024, 06:44:58 AM »

I'd like to take a bigger look at the screenshot of the half-sinking ship group on the right end.
Logged

WxTech

  • Modder
  • member
  • Online Online
  • Posts: 6040
Re: Is it possible to have ships partially sink in shallow water?
« Reply #16 on: August 24, 2024, 07:31:00 AM »

Not exactly a closeup; still more of an overview of the two groups of small vessels. Here I've arrayed them so as to cover a progressively larger distance from the shoreline. The greater distance results in a concomitant larger sink depth. The farthest of each group has got just about completely submerged.

[click for larger]
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

gunny0134

  • member
  • Offline Offline
  • Posts: 1152
  • no skill just simple, but seek the best beauty !!
Re: Is it possible to have ships partially sink in shallow water?
« Reply #17 on: August 24, 2024, 08:18:51 AM »

From the pilot's point of view in the cockpit, it would seem very realistic.

The smoke rising a little makes the atmosphere of the battlefield feel even more.

I think it will be a very interesting effect, so I'm looking forward to it.

Thank you always !!
Logged

genXgamer

  • member
  • Offline Offline
  • Posts: 1358
Re: Is it possible to have ships partially sink in shallow water?
« Reply #18 on: August 24, 2024, 12:03:10 PM »

It appears to be a linear drop-off.
I think a curved path would be better.
Gently sloping up to the third vessel and then getting more steep thereafter.
Logged
Go in quickly - Punch hard - Get out!

RABIZO

  • member
  • Offline Offline
  • Posts: 512
Re: Is it possible to have ships partially sink in shallow water?
« Reply #19 on: August 27, 2024, 08:01:17 AM »

Thank you Glenn for your passion for effects.

I can't wait for the new version to come out.
Logged

Whiskey_Sierra_972

  • Modder
  • member
  • Offline Offline
  • Posts: 6505
  • In memory of my beloved hero: Saburo SAKAI!
Re: Is it possible to have ships partially sink in shallow water?
« Reply #20 on: September 01, 2024, 08:07:58 AM »

This work could open a real new dimension for coastal operations and harbour strikes where sunken ships usually are semi submerged....
Logged

WxTech

  • Modder
  • member
  • Online Online
  • Posts: 6040
Re: Is it possible to have ships partially sink in shallow water?
« Reply #21 on: September 01, 2024, 01:42:20 PM »

I would really like to use a consolidated map_C.tga, perhaps scaled down to the same 200m/pixel (or whatever scale a map uses) as for the map_H.tga and map_T.tga, and perhaps named map_W (water map). This size reduction could be worthwhile because of the potentially HUGE size of the full 50m/pixel file. It would be used ONLY for determining water depth at the position of a vessel, but would still require to be instantiated as an object and loaded in preparation for a mission; I'm not sure of the steps to take for this. But it would be important that if no such map_W.tga exists its absence will cause no problem. After all, many maps have no ocean or otherwise 'navigable' water, and others have no shallows of significance. Only maps having shallows extending a few hundred meters or more beyond shorelines would be worthy of this additional treatment.

Below is a proposed means of getting water depth from the pixel value of a NEW "map_W" (water map) made from the consolidated map_C, perhaps scaled down from 50m/pix to 200m/pix. This code would be present in method computeSeaDepth() in BigshipGeneric.class and ShipGeneric.class. Whether this scheme takes precedence or not over the existing search for nearby land, or it would be used in conjunction with, would require more thought.

Code: [Select]
int j = Landscape.getPixelMapW(Engine.land().WORLD2PIXX(((Tuple3d) (point3d)).x), Engine.land().WORLD2PIXY(((Tuple3d) (point3d)).y));
if(j > 0 && j < 127)  //j=0 is default ocean depth
    seaDepth = 127F - (float)j;  /linear scaling, to 127m max shallows depth
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

Orge Schwab

  • member
  • Offline Offline
  • Posts: 79
Re: Is it possible to have ships partially sink in shallow water?
« Reply #22 on: September 01, 2024, 01:51:04 PM »

This work could open a real new dimension for coastal operations and harbour strikes where sunken ships usually are semi submerged....
I wonder if this process could be reversed to create a surfacing sub? A sort of 'reverse sink', where the hull rises out of nowhere (on a timer) in the manner of a sub rising to charge its batteries on the surface? It might be surfaced and stationary for a while before submerging again, leaving a window of opportunity for sinking it. Just thinking out loud - it probably needs a fair bit of coding.
Logged

WxTech

  • Modder
  • member
  • Online Online
  • Posts: 6040
Re: Is it possible to have ships partially sink in shallow water?
« Reply #23 on: September 01, 2024, 02:03:00 PM »

The sub behaviour involves rather more coding in other classes than I might be capable of undertaking.  ;)

Here's an example of a proposed map_W.tga. It's a small portion of the consolidated map_C from my version of agracier's New Georgia map, where I used Google earth imagery to obtain accurate shallows. This is after the original 50m/pixel image has been reduced to 200m/pixel (file size is 1/16 as large). Furthermore, for this illustration I expanded the image size by a factor of 4 so as to make the individual pixels clearly visible.

My purpose here is to show the viability of my notion, especially when shallows/reefs can be found even kilometers away from land. Again, each 'pixel' block seen here is 200m square.

[click for larger]
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)
Pages: 1 [2] 3   Go Up
 

Page created in 0.036 seconds with 26 queries.