[Flightgear-devel] Sea color (was: Re: Regional textures merge request)
Hmm I've got something wrong here then - if I understand that right I select Advanced Weather, and skydome and the sea colour stuff should run? I get this: http://dl.dropbox.com/u/57645542/fgfs-screen-190.png It doesn't seem to have any interpolation. The color seems about right to me for what the interpolation should give at the location. There is no interpolation in the scene, because the color change is assumed to happen on a 1000 km scale, so it changes smoothly for the whole scene as a function of position - take the ufo, fly 1000 km away from TNCM, compare sea color and it should go back to the darker blue-green default. Admittedly I haven't really tried flying 1000 km, I've just tested it on startup in different locations. Try starting at Nice (LFMN), that should have a dark blue. I was thinking of this for loop for (var i = 0; i ivector_size; i = i + 1) I take the view that any for loop is not good, but if ivector_size is small, I guess it won't matter. It depends on what is executed in the loop. If it's a distance computation or property tree access, then there shouldn't be much more than 20 operations per frame. But I've done benchmark tests with basic math - say the sine function. Here, I could execute about 1.000 operations per frame without creating a measurable slowdown. In this particular loop, it's just adding numbers - that's probably a factor 100 cheaper than computing a sine, so if my benchmark extrapolates correctly, you can run it ~100.000 times per frame before running into trouble. In practice, I think it's unlikely that we'll use more much than 100 points. I have been coding some performance-eating stuff (and even some badly designed performance eating stuff), but that's not one of these cases. Cheers, * Thorsten -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Sea color
There are good sources for sea colour out there - here is one: http://oceancolor.gsfc.nasa.gov/FEATURE/IMAGES/A2008129125500.Scotland.png The Northern North Sea, away from the turbidity and major river outfalls of the Southern North Sea, is indistinguishable from the Atlantic, the other side of Scotland. 4 West, 54 North I get an rgb value of (93, 113, 121) 2 East, 54 North I get (31, 71, 83) There's pretty significant variation everywhere, but I don't see that in that picture that the two would even be similar. There are many examples in this archive, and if there are differences in the deep ocean colour in any of the oceans they are darned hard to spot. Similarly, if there is a difference between the Atlantic and the Mediterranean, it's very hard to see. We might not be after the same thing here... In reality, water color depends on a lot of factors: * light reflection at the surface, i.e. light diffuseness, intensity, wave patterns, sky color, ... - we have a decent way to account for that in the shader * sediment and algae in the water - water being a flowing substance, all these are variable phenomena, rivers carry a lot of mud in spring when the snow thaws, algae bloom seasonally,... we can't model this realistically in any case * near the coast, depth and nature of the bottom - white underwater sand looks quite differently from overgrown rocky bottom, deep water looks different from shallow water... we simply don't have this information - we might get depth somehow, pass true depth to the shader, use it to determine color, then let the shader move the vertex up to the water surface, but it's a bit tricky. Given that we can't do so much realistically anyway for lack of data (and lack of framerate - I could probably write a detailed water color computing code, but that'd really drive framerate down), my idea is more to re-create iconic pictures. When approaching Nice in sunshine, I want to see one of these postcard Cote d'Azur pictures. When landing on a drilling rig in the Northern Sea, I don't expect to see this deep blue. Probably in reality the differences are driven by differences in lighting, average weather and some sediment/algae component - but when I can't do the realistic thing, I might as well do the iconic thing. Many people (including myself) seem to feel that the sea should look different in different places. I'm entirely willing to tweak physics here a bit to create a better illusion that one is in the place by fulfilling the expectation. True, the actual Caribbean deep ocean is not turquoise. Then again, the actual Caribbean city doesn't look the Flightgear way either. But making sea color a lighter turquoise in the Caribbean helps me to maintain the illusion that I am in the Caribbean rather than the Northern Sea. Feel free to disagree, but for me creating the visual environment has much more to do with credible illusions than with getting the physics of the scene right (disclaimer: my position is diffferent for the fidelity of the FDM where we can actually get the physics really right since we have often the required amount of data). * Thorsten -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Sea color
Thorsten There are good sources for sea colour out there - here is one: http://oceancolor.gsfc.nasa.gov/FEATURE/IMAGES/A2008129125500.Scotlan d .png The Northern North Sea, away from the turbidity and major river outfalls of the Southern North Sea, is indistinguishable from the Atlantic, the other side of Scotland. 4 West, 54 North I get an rgb value of (93, 113, 121) 2 East, 54 North I get (31, 71, 83) 2 E 54N? that's the Southern N Sea off the Humber estuary. That is one of the major sources of silt flowing into the North Sea . The depth is probably less than 150m there. 4 W 54N? That's just off Morecambe Bay, which forms part of the Irish Sea. It is the largest expanse of intertidal mudflats and sand in the United Kingdom! Neither of these locations could be remotely described as deep ocean, and yes, we should certainly be investigating how to best model such areas of sea. There's pretty significant variation everywhere, but I don't see that in that picture that the two would even be similar. There are many examples in this archive, and if there are differences in the deep ocean colour in any of the oceans they are darned hard to spot. Similarly, if there is a difference between the Atlantic and the Mediterranean, it's very hard to see. We might not be after the same thing here... In reality, water color depends on a lot of factors: * light reflection at the surface, i.e. light diffuseness, intensity, wave patterns, sky color, ... - we have a decent way to account for that in the shader * sediment and algae in the water - water being a flowing substance, all these are variable phenomena, - rivers carry a lot of mud in spring when the snow thaws, algae bloom - seasonally,... we can't model this realistically in any case * near the coast, depth and nature of the bottom - white underwater sand looks quite differently from overgrown rocky bottom, deep water looks different from shallow water... we simply don't have this information - we might get depth somehow, pass true depth to the shader, use it to determine color, then let the shader move the vertex up to the water surface, but it's a bit tricky. Yup - getting to grips with all that is difficult. Not too dissimilar to getting reasonable representations of towns and countryside in various regions in the world, I suppose Given that we can't do so much realistically anyway for lack of data (and lack of framerate - I could probably write a detailed water color computing code, but that'd really drive framerate down), my idea is more to re-create iconic pictures. When approaching Nice in sunshine, I want to see one of these postcard Cote d'Azur pictures. When landing on a drilling rig in the Northern Sea, I don't expect to see this deep blue. Probably in reality the differences are driven by differences in lighting, average weather and some sediment/algae component - but when I can't do the realistic thing, I might as well do the iconic thing. Many people (including myself) seem to feel that the sea should look different in different places. I'm entirely willing to tweak physics here a bit to create a better illusion that one is in the place by fulfilling the expectation. True, the actual Caribbean deep ocean is not turquoise. Then again, the actual Caribbean city doesn't look the Flightgear way either. But making sea color a lighter turquoise in the Caribbean helps me to maintain the illusion that I am in the Caribbean rather than the Northern Sea. Feel free to disagree, but for me creating the visual environment has much more to do with credible illusions than with getting the physics of the scene right (disclaimer: my position is diffferent for the fidelity of the FDM where we can actually get the physics really right since we have often the required amount of data). I do feel free to disagree - the Caribbean just isn't turquoise, as you say. There was a time when we prided ourselves on FG being the most realistic sim around. Making the ocean the wrong colour to maintain an illusion just doesn't seem to me to sit right with that. But I would also agree that we need to sort out some of the more obvious problems of the shallow seas, if that is possible. Anyway, on a more prosaic note - your sea colour script appears to be bugged here. After I got it to run (my bad, I broke it) I discovered that it iterates at 1 sec not 5 as stated. If I restart Advanced Weather the sampling locations are re-added to the interpolation_vector which grows in size: I have reached 32 so far, but sometimes FG crashes before that point. In any case running Advanced Weather FG crashes here at some point, running out of memory. I would be surprised if this were related to sea-colour, and might indeed be a general problem which Advanced Weather runs into sooner than Basic Weather. You re-instantiate var ppos in each of your locations: nasal doesn't seem to mind, but I wouldn't have thought
Re: [Flightgear-devel] Sea color
Renk Thorsten thorsten.i.r...@jyu.fi writes: There are good sources for sea colour out there - here is one: http://oceancolor.gsfc.nasa.gov/FEATURE/IMAGES/A2008129125500.Scotland.png The Northern North Sea, away from the turbidity and major river outfalls of the Southern North Sea, is indistinguishable from the Atlantic, the other side of Scotland. 4 West, 54 North I get an rgb value of (93, 113, 121) 2 East, 54 North I get (31, 71, 83) There's pretty significant variation everywhere, but I don't see that in that picture that the two would even be similar. There are many examples in this archive, and if there are differences in the deep ocean colour in any of the oceans they are darned hard to spot. Similarly, if there is a difference between the Atlantic and the Mediterranean, it's very hard to see. We might not be after the same thing here... In reality, water color depends on a lot of factors: * light reflection at the surface, i.e. light diffuseness, intensity, wave patterns, sky color, ... - we have a decent way to account for that in the shader * sediment and algae in the water - water being a flowing substance, all these are variable phenomena, rivers carry a lot of mud in spring when the snow thaws, algae bloom seasonally,... we can't model this realistically in any case * near the coast, depth and nature of the bottom - white underwater sand looks quite differently from overgrown rocky bottom, deep water looks different from shallow water... we simply don't have this information - we might get depth somehow, pass true depth to the shader, use it to determine color, then let the shader move the vertex up to the water surface, but it's a bit tricky. Given that we can't do so much realistically anyway for lack of data (and lack of framerate - I could probably write a detailed water color computing code, but that'd really drive framerate down), my idea is more to re-create iconic pictures. When approaching Nice in sunshine, I want to see one of these postcard Cote d'Azur pictures. When landing on a drilling rig in the Northern Sea, I don't expect to see this deep blue. Probably in reality the differences are driven by differences in lighting, average weather and some sediment/algae component - but when I can't do the realistic thing, I might as well do the iconic thing. Many people (including myself) seem to feel that the sea should look different in different places. I'm entirely willing to tweak physics here a bit to create a better illusion that one is in the place by fulfilling the expectation. True, the actual Caribbean deep ocean is not turquoise. Then again, the actual Caribbean city doesn't look the Flightgear way either. But making sea color a lighter turquoise in the Caribbean helps me to maintain the illusion that I am in the Caribbean rather than the Northern Sea. Feel free to disagree, but for me creating the visual environment has much more to do with credible illusions than with getting the physics of the scene right (disclaimer: my position is diffferent for the fidelity of the FDM where we can actually get the physics really right since we have often the required amount of data). There are also nice patterns drawn by wind and by oil. When the sea is flat, over distances on the order of hundreds of meters you have changes in the wavelets that give quite different patterns from a distance. And furthermore, there some oil floating in nice patterns seeing at different scales, generally in spiral. They're stricking when saw from space, but they are also visible from the beaches. https://docs.google.com/viewer?a=vq=cache:P6Iom6_AjrMJ:armi.ucsd.edu/Spirals.pdf+hl=enpid=blsrcid=ADGEEShQ-kOpl7JfwiDDG2SHOGs7fkAkhVrVHwuUs1tJZO9pLKhS9ks-VrdHB2k68QgP1jJ2pKH7HwSKqnzn1tCJ0GLa88JxHVR_4xbQifElWm4FlScwpk0lZ8hfTZWjJYSld-d_ryw7sig=AHIEtbQ9vmtNjZC9WylNau0sW17FgGEe9Apli=1 -- __Pascal Bourguignon__ http://www.informatimago.com/ A bad day in () is better than a good day in {}. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel