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 > Silent Hunter 5
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 11-30-09, 12:19 PM   #1
ichso
Ace of the Deep
 
Join Date: Jul 2005
Location: Germany's oldest city alive
Posts: 1,066
Downloads: 57
Uploads: 0
Default

Quote:
Originally Posted by Antar View Post
REAL VISUAL CONTACT is possible and no too hard to implementation.
Sensor of visibility shouldn't be depend from real range (with corrections of fog, wave) but depend from single pixels color.
You have three variables for sensitivity:
- contact circle (how many pixel is tested in local range)
- difference between test colour and average colour of background
- time reaction

AI knows that this contact is enemy but this contact is not detected yet.
A is average colour of contact in tested range
B is average background colour
If difference between A and B is higher than critical value AI waits "reaction time" and contact is detected (is sighted).

Of course difference between colour of contact and background and pixels number depends from level of enemy...

This method is very close to "real human eye"...
Look on the screenshot:
Circle on ship is "tested colour pixels range". If difference between all colours is higher than 5 (at this example |77-68|+|86-77|+|85-76|=27) the enemy ship is detected and can be attacked.
What would you do if there is another ship behind the first one ?
The program would realize that the ship further away would be in your spotting range, the pixels within it's theoretical silhouette would be also different from the ones of the empty horizon but the ship further away is still not supposed to be seen.

Also, if the sky has different colors all at once, which colour do you exactly use to incorporate this test. E.g. if the sky is taking on a scale of yellow to red colours during sunrise. Clouds might also offer a different colour palette. So simulating the contrast of ship <-> sky is not that easy. Ships can have multiple colours in their painting as well.
I'm not even talking about camo schemes here.

And a last but very important point:
ships are often spotted not by their own silhouettes but by there smoke trail on the horizon. And a smoke could is a thing that constantly changes form, thickness and contrast to the sky. They would be a pain to be simulated in terms of real vision especially.

In an already complex simulation you better stick with the more abstract schemes of making visual contact like they did in the games before and try to improve on this approach.
ichso is offline   Reply With Quote
Old 11-30-09, 01:10 PM   #2
rik007
Grey Wolf
 
Join Date: Jan 2002
Location: Holland
Posts: 818
Downloads: 126
Uploads: 0
Default

Quote:
Originally Posted by ichso View Post
What would you do if there is another ship behind the first one ?
The program would realize that the ship further away would be in your spotting range, the pixels within it's theoretical silhouette would be also different from the ones of the empty horizon but the ship further away is still not supposed to be seen.

Also, if the sky has different colors all at once, which colour do you exactly use to incorporate this test. E.g. if the sky is taking on a scale of yellow to red colours during sunrise. Clouds might also offer a different colour palette. So simulating the contrast of ship <-> sky is not that easy. Ships can have multiple colours in their painting as well.
I'm not even talking about camo schemes here.

And a last but very important point:
ships are often spotted not by their own silhouettes but by there smoke trail on the horizon. And a smoke could is a thing that constantly changes form, thickness and contrast to the sky. They would be a pain to be simulated in terms of real vision especially.

In an already complex simulation you better stick with the more abstract schemes of making visual contact like they did in the games before and try to improve on this approach.
Then at least agree upon an implementation in which you can sneak into a convoy, surface, make you attack and get out of it with a great change to escape unhurt. In SH-III you can certainly approach a convoy but after launching an attack, the lights flip on and you are detected. A sensor.cfg parameter for the before and after an attack would give us the ability to mod the detection chances before/after the torpedos hit.

Remember that surface attacks will provide emersion and variation to the game. It will be a shame if it isn't there. I miss comparable with the missing of Wolfpacks.
rik007 is offline   Reply With Quote
Old 11-30-09, 02:15 PM   #3
PL_Andrev
Grey Wolf
 
Join Date: Feb 2009
Posts: 995
Downloads: 91
Uploads: 0
Default

On my example I wanted to show how to realize the ship detection in case of bad weather conditions (fog, rain, dusk, storm) similar to human eyes.

Indeed, to check all ships AI must follow up on all enemy ships in the area (AI vs. player, AI vs. AI), but remember that GPU does not need to render the whole scene (as you see in monitor), but the only small area with size f.e. 100 pixels - and not "all the time" but once every 10 seconds for each ship...
__________________

PL_Andrev is offline   Reply With Quote
Old 11-30-09, 02:29 PM   #4
ichso
Ace of the Deep
 
Join Date: Jul 2005
Location: Germany's oldest city alive
Posts: 1,066
Downloads: 57
Uploads: 0
Default

O.k. how would you want to use this approach for ai ships <-> ai ships anyways. In the 3D model of the game world the program has the coordinates of the objects/ships. But to know whether one ship can see the other you would need to computer the vector of the first ship in direction of the other and then compute what the background would be in this direction and compare that to how the second ship would be rendered on screen.

Either you explained your approach wrong, I understood it wrong or this is overly complicated, no matter if done every 1/100th second or done every 10 seconds.

Using the player's POV you at least already have the rendered scene to use but even there, there would be too many factors to include to get satisfying results, I think.
ichso is offline   Reply With Quote
Old 11-30-09, 02:34 PM   #5
Zonke
Swabbie
 
Join Date: Nov 2009
Location: Sweden
Posts: 13
Downloads: 23
Uploads: 0
Default

Quote:
Originally Posted by Antar View Post
On my example I wanted to show how to realize the ship detection in case of bad weather conditions (fog, rain, dusk, storm) similar to human eyes.

Indeed, to check all ships AI must follow up on all enemy ships in the area (AI vs. player, AI vs. AI), but remember that GPU does not need to render the whole scene (as you see in monitor), but the only small area with size f.e. 100 pixels - and not "all the time" but once every 10 seconds for each ship...
I see, seams more plausible now I suppose with the 10sec interval and small render. It would ensure the AI has the same conditions as the human player..

Whatever the method, I hope they improve it. I like the ideas of ships being on different states of alert at different times (based on where they are, crew size/skill, time in the war and ofcourse whether they've been attacked recently)..
Zonke is offline   Reply With Quote
Old 12-01-09, 08:48 PM   #6
timmyab
Watch
 
Join Date: Aug 2008
Posts: 22
Downloads: 0
Uploads: 0
Default

I've read in 'Das Boot' and 'Iron Coffins' where the U-boat captain has used the submarine's exhaust fumes to create a kind of smoke screen to hide from destroyers at night.It would be cool if you could do this.Also it would be nice if you could wait for the moon to go behind a cloud before attacking. I'd like to see the whole business of whether you're detected or not to be far more randomised than it was in SH3, something I believe computers find difficult to do, with the advantage being decidedly with the sub in the early years at least.
timmyab is offline   Reply With Quote
Old 12-02-09, 03:01 AM   #7
JScones
Navy Seal
 
Join Date: Apr 2005
Posts: 5,501
Downloads: 19
Uploads: 0
Default

Quote:
Originally Posted by timmyab View Post
I've read in 'Das Boot' and 'Iron Coffins' where the U-boat captain has used the submarine's exhaust fumes to create a kind of smoke screen to hide from destroyers at night.It would be cool if you could do this.Also it would be nice if you could wait for the moon to go behind a cloud before attacking. I'd like to see the whole business of whether you're detected or not to be far more randomised than it was in SH3, something I believe computers find difficult to do, with the advantage being decidedly with the sub in the early years at least.
Do diesel engines actually produce that much smoke? I know they throw a bit of soot on startup, but I thought otherwise, when maintained, they ran quite smoke free?
JScones is offline   Reply With Quote
Old 12-02-09, 03:18 AM   #8
TarJak
Rear Admiral
 
TarJak's Avatar
 
Join Date: Jul 2006
Location: Sydney, Australia
Posts: 12,805
Downloads: 150
Uploads: 8


Default

You can make a well maintained and smooth running diesel throw out thick black smoke by fiddling with the fuel plate. No harm to the engine, but less fuel efficient.

In normal operation though it should be thin blue smoke that is hard to see unless you are accelerating hard.
TarJak is offline   Reply With Quote
Old 12-02-09, 08:11 AM   #9
JU_88
Silent Hunter
 
Join Date: Jan 2006
Location: Spain
Posts: 3,529
Downloads: 11
Uploads: 0
Default

Quote:
Originally Posted by JScones View Post
Do diesel engines actually produce that much smoke? I know they throw a bit of soot on startup, but I thought otherwise, when maintained, they ran quite smoke free?
This ^^
....and i woulndn't take anything from Das Boot or Iron coffins as the Gospel truth.
Both are 'based' on facts - but designed primarily for entertainment.
__________________
JU_88 is offline   Reply With Quote
Old 12-02-09, 09:55 AM   #10
looney
Commodore
 
Join Date: May 2007
Location: Sneek, The Netherlands
Posts: 635
Downloads: 43
Uploads: 0
Default

even so it is easier to make a engine produce smoke than to make an engine produce no smoke while still running.

If the Kaleu wanted to produce a smoke screen just add a bit of oil in the exhaust. Easy peasy
looney is offline   Reply With Quote
Old 12-02-09, 07:11 AM   #11
timmyab
Watch
 
Join Date: Aug 2008
Posts: 22
Downloads: 0
Uploads: 0
Default

In the books they went full ahead and stern on to produce this screen.I just thought that as it was mentioned in both books that in might have been a common device.
timmyab is offline   Reply With Quote
Old 12-02-09, 07:48 AM   #12
Malmer
Watch
 
Join Date: Mar 2005
Location: the Netherlands
Posts: 20
Downloads: 0
Uploads: 0
Default

During the Snorkel development exhaust modifications were dropped just because the diesel fumes were barely visible...
__________________
TAKE CARE & CONTROL
Malmer is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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 06:45 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Copyright © 1995- 2026 Subsim®
"Subsim" is a registered trademark, all rights reserved.