Loading [MathJax]/extensions/Safe.js

Special Aircraft Service

Please login or register.

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

Author Topic: Resquest accurate shadows in shallow pristine water  (Read 562 times)

0 Members and 1 Guest are viewing this topic.

Draken

  • member
  • Offline Offline
  • Posts: 1183
Resquest accurate shadows in shallow pristine water
« on: July 27, 2024, 02:47:50 AM »

IRL shows that small boats floating on shallow pristine water cast their shadow on the sea bed :






But in the game , small ships cast their shadow on the surface of the water :
Logged

Draken

  • member
  • Offline Offline
  • Posts: 1183
Re: Resquest accurate shadows in shallow pristine water
« Reply #1 on: July 27, 2024, 02:53:08 AM »

Same thing for seaplanes floating on shallow pristine water :








I think that the shadow on the sea bed would look like this ( edited picture ) :
Logged

WxTech

  • Modder
  • member
  • Online Online
  • Posts: 6181
Re: Resquest accurate shadows in shallow pristine water
« Reply #2 on: July 27, 2024, 03:47:51 AM »

The water is graphically treated as the 'floor' of the game world, with nothing beneath. If you move the camera around a boat or plane sitting in shallow water having the seabed visible as a shallows texture, you'll see that there is no depth at all. The shallows texture is drawn at the surface. And sothere is no ready means of placing a shadow at some depth below.

I see that in the BigShipGeneric class (and probably ShipGeneric, too) there is code to determine the depths at a number of spots around a vessel, based on the RGB value of adjacent pixels centered on the vessel's position on map_c.tga (which creates the shorelines and shallows). Perhaps some Java guru (not a Neanderthal like me) might be able to use this to displace the shadow as a means to suggest depth. This would involve establishing an initial offset based on the Sun angular elevation, and then dynamically shifting the shadow based on the camera view angle. But such an approach should then dispense with the usual shadow, or keep it AND add the deeper shadow up to some maximum water depth.

As to creating the seabed shadow, refraction in the water will have it displaced at an angle no larger than roughly 45 degrees from vertical (even when the Sun is on the horizon.) This makes for an easier treatment. But is it all worth the trouble?
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

Vampire_pilot

  • member
  • Offline Offline
  • Posts: 8630
Re: Resquest accurate shadows in shallow pristine water
« Reply #3 on: July 28, 2024, 07:19:59 AM »

This is also why we do not see a "submerged" submarine, but a graphic is drawn on top of the water.
23 y/o flightsim doing 23 y/o flightsim things.
Logged
Pages: [1]   Go Up
 

Page created in 0.046 seconds with 20 queries.