Re: [Flightgear-devel] Terrain self-shading
Then fall and windy could be combined with particles (?) to simulate wind blown leaves and dynamically painting the foliage part of the texture with alpha to make leaves fall off on windy weather..? ;) Kinda special case and maybe not worth the effort but might be quite awesome jaw-dropper on the right moment.. ;-) //Tuomas On 15.4.2013 23:27 Thomas Albrecht wrote: On a related note, the thread highlights that our tree textures are rather small, so our trees look quite blocky. Stuart, I created new textures for tropical trees a while ago, and I intend to improve central European tree textures in the near future. Thorsten suggested [1] separating foilage and trunk; is this what you have in mind? I'm just waiting for the right weather to take pictures of the trunks -- and then of course, for the trees become green again -- but then I can provide hi- res tree textures. Tom [1] http://www.flightgear.org/forums/viewtopic.php?f=5t=19265sid=d60eca7e515a1fcd8f7a8e881aba1a3cstart=15#p179241 -- Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Terrain self-shading
Stuart On Sun, Apr 14, 2013 at 10:41 PM, Stuart Buchanan wrote: As it happens, I'm part way through a change that would allow varying snow- and leaf- cover without having to load different textures, so trees above the snowline could be snow covered while those below are not. This will increase the size of the textures to 512x512, while an individual tree will remain on 128 pixels tall. This is now checked in. Tree foliage is now consistent with the experimental Season slide on the Environment Setting dialog (deciduous trees shed their leaves towards late autumn) and the snow line (trees above the snow-line have a small covering of snow). Of course, we really should only add snow cover to the trees if the snowfall is recent and there isn't much wind, so perhaps we should just have summer/winter variants and no snow-covered... to be discussed. There are changes to both simgear and data for this change. Picking up one or other results in very odd looking trees :). This retires the -summer.[png|dds] and -winter.[png|dds] variants, which have been removed. Those creating tree textures for regional project will now need to follow the new format. I'll update the next newsletter to ensure that this information is distributed. On Tue, Apr 16, 2013 at 7:22 AM, Renk Thorsten wrote: Just to be clear - if we had textures, this is something I would do the work for since I suggested it, I'm not expecting Stuart to do this for me :-) (This is not to imply that I would object against Stuart giving a try, but as long as I can follow up an idea I like myself, I try not to fill someone else's to-do list). That's fine. So I would suggest to implement this as a high-quality option for those who have the hardware to crunch substantial fragment shaders and leave the current implementation as a fallback. That sounds reasonable, though the current implementation has changed in the meantime :). We seem to have slight misalignment in the tree texture: https://dl.dropboxusercontent.com/u/57645542/fgfs-screen-004.png Is having a single texture sheet the most efficient way of doing it? Just asking. Vivian -- Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Terrain self-shading
On Sun, Apr 21, 2013 at 6:17 PM, Vivian Meazza wrote: We seem to have slight misalignment in the tree texture: https://dl.dropboxusercontent.com/u/57645542/fgfs-screen-004.png Definitely looks like it. Could you provide some further details on this please: a) Where are you seeing this ? b) which materials file (dds ? regions? ) c) Have you deleted the Textures.high file to use lower resolution textures? The trees in the screenshot look even more blocky than normal. Is having a single texture sheet the most efficient way of doing it? Just asking. I think so. The textures here are very small (512x512) so the difference between a 512x128 and a 512x512 texture would be miniscule while loading 4 textures rather than 1 from disk might be significant. IIRC Thorsten also did some experiments and found that having additional textures references in a shader had a significant performance impact. -Stuart -- Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Terrain self-shading
On Sun, Apr 14, 2013 at 10:41 PM, Stuart Buchanan wrote: As it happens, I'm part way through a change that would allow varying snow- and leaf- cover without having to load different textures, so trees above the snowline could be snow covered while those below are not. This will increase the size of the textures to 512x512, while an individual tree will remain on 128 pixels tall. This is now checked in. Tree foliage is now consistent with the experimental Season slide on the Environment Setting dialog (deciduous trees shed their leaves towards late autumn) and the snow line (trees above the snow-line have a small covering of snow). Of course, we really should only add snow cover to the trees if the snowfall is recent and there isn't much wind, so perhaps we should just have summer/winter variants and no snow-covered... to be discussed. There are changes to both simgear and data for this change. Picking up one or other results in very odd looking trees :). This retires the -summer.[png|dds] and -winter.[png|dds] variants, which have been removed. Those creating tree textures for regional project will now need to follow the new format. I'll update the next newsletter to ensure that this information is distributed. On Tue, Apr 16, 2013 at 7:22 AM, Renk Thorsten wrote: Just to be clear - if we had textures, this is something I would do the work for since I suggested it, I'm not expecting Stuart to do this for me :-) (This is not to imply that I would object against Stuart giving a try, but as long as I can follow up an idea I like myself, I try not to fill someone else's to-do list). That's fine. So I would suggest to implement this as a high-quality option for those who have the hardware to crunch substantial fragment shaders and leave the current implementation as a fallback. That sounds reasonable, though the current implementation has changed in the meantime :). -Stuart -- Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Terrain self-shading
Thorsten suggested [1] separating foilage and trunk; is this what you have in mind? At the moment I'm simply using 4 separate complete textures ; one for each combination of summer/winter and clear/snow-covered. So I 'just' need straight pictures from summer and winter. Snow-covered would be a bonus, though that can probably be added later. With that I can display different textures above and below the snowline with no computational impact (well, a couple of additions and multiplications at the vertex level plus an additional Uniform). On my system there's no impact to frame rates. I've still to look at Thorsten's idea in detail (my code predates that discussion) and don't expect to have the time to do so in the foreseeable future. Just to be clear - if we had textures, this is something I would do the work for since I suggested it, I'm not expecting Stuart to do this for me :-) (This is not to imply that I would object against Stuart giving a try, but as long as I can follow up an idea I like myself, I try not to fill someone else's to-do list). The reason for separating foilage would be to allow continuous autumn-color shifts and 'shed' leaves by overlaying a noisy alpha-channel. I expect it to require additional texture lookup and some perlin noise at a minimum so the perf impact might be significant. Depends on the hardware I guess. On my old GPU, the fragment pipeline was the bottleneck, and such an addition to the fragment shader would have been a clear no-go. My new GPU is almost always vertex-shader limited if it doesn't go to vsync, with the chief suspects being clouds, buildings and trees. So chances are I wouldn't even see additional texture lookups and noise functions, because the vertex shading dominates the execution speed of the tree code. So I would suggest to implement this as a high-quality option for those who have the hardware to crunch substantial fragment shaders and leave the current implementation as a fallback. * Thorsten -- Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Terrain self-shading
@Erik: They are read from the ambient, diffuse and specular files in fgdata/Lighting. For the default lighting scheme these do get altered, but I think you already override that scheme completely. Um... as they depend on the sun angle, these appear to be the light intensity curves. I indeed override those. I'm interested in the reflection coefficients, which must be part of the materials definition - I know that for some landclasses diffuse and specular are explicitly defined, but I don't know what the defaults are otherwise. But I guess I found a viable solution yesterday. @Fred: I presume the balance between ambient and diffuse should vary with the weather. A clear sky gives harsh shadows and overcast sky with several layers of clouds gives barely any shadows (dull day in photographer speak). Your results (which are really pretty) are likely to be unrealistic with bad weather and perhaps a middle term as it is now will fit more situations if the balance is not adjustable. Luckily for me Advanced Weather already comes with a model how light intensity is changed by the cloud cover and the interface to the shader is already in place and being used to reduce diffuse light under strong cloud cover ;-) So that's solved already - to quote myself 3 lines in the shader including all the environment dependencies on cloud cover and sun angle (it doesn't do to reduce ambient light before sunrise for instance) - for moderate cloud cover, the effect goes back to what you're used to, for strong cloud cover diffuse and specular light pretty much go away. I think the actual effect is pretty much perception - the ambient light doesn't go away that much in clear skies, but the eye, having the contrast to surfaces illuminated by high intensity light, reduces shades surface to dark. So we could attack this also by simulating real light intensities and do perception reweighting later as well, but just reducing ambient light to make up for actual high diffuse intensity seems to do the trick nicely. @Stuart: Given that we've got a very limited number of tree textures and the same texture is used on a large number of objects, perhaps it would be worthwhile increasing the resolution? The regional Caribbean palm trees should have a higher resolution if anyone wants to have a look at the differences. We seem to have some forum users who are sort of committed to provide more variety and higher resolution tree textures which we can encourage. Personally I would like to have higher resolution trees after spending quite a lot of shader lines for terrain close-up rendering - but I have a lot of memory to spare, and I understand the argument that for many users trees will be something seen from a few hundred meters at best. * Thorsten -- Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Terrain self-shading
On a related note, the thread highlights that our tree textures are rather small, so our trees look quite blocky. Stuart, I created new textures for tropical trees a while ago, and I intend to improve central European tree textures in the near future. Thorsten suggested [1] separating foilage and trunk; is this what you have in mind? Im just waiting for the right weather to take pictures of the trunks -- and then of course, for the trees become green again -- but then I can provide hi- res tree textures. Tom [1] http://www.flightgear.org/forums/viewtopic.php?f=5t=19265sid=d60eca7e515a1fcd8f7a8e881aba1a3cstart=15#p179241 -- Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Terrain self-shading (plain text)
Sorry for that HTML-crap. Here's the plain text again. On a related note, the thread highlights that our tree textures are rather small, so our trees look quite blocky. Stuart, I created new textures for tropical trees a while ago, and I intend to improve central European tree textures in the near future. Thorsten suggested [1] separating foilage and trunk; is this what you have in mind? I'm just waiting for the right weather to take pictures of the trunks -- and then of course, for the trees become green again -- but then I can provide hi- res tree textures. Tom [1] http://www.flightgear.org/forums/viewtopic.php?f=5t=19265sid=d60eca7e515a1fcd8f7a8e881aba1a3cstart=15#p179241 -- Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Terrain self-shading (plain text)
On 15 Apr 2013, at 21:39, Thomas Albrecht wrote: Sorry for that HTML-crap. Here's the plain text again. No problem. I'm writing this from an iPhone and have no idea whether it's in plain text or not! Thorsten suggested [1] separating foilage and trunk; is this what you have in mind? At the moment I'm simply using 4 separate complete textures ; one for each combination of summer/winter and clear/snow-covered. So I 'just' need straight pictures from summer and winter. Snow-covered would be a bonus, though that can probably be added later. With that I can display different textures above and below the snowline with no computational impact (well, a couple of additions and multiplications at the vertex level plus an additional Uniform). On my system there's no impact to frame rates. I've still to look at Thorsten's idea in detail (my code predates that discussion) and don't expect to have the time to do so in the foreseeable future. I expect it to require additional texture lookup and some perlin noise at a minimum so the perf impact might be significant. That's not to say that the two approaches can't sit side by side. I'm just waiting for the right weather to take pictures of the trunks -- and then of course, for the trees become green again -- but then I can provide hi- res tree textures. That will be great. Thanks. -Stuart -- Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Terrain self-shading
On 04/14/2013 10:40 AM, Renk Thorsten wrote: One problem is that I don't know the default ambient and diffuse reflection coefficients of terrain, so I have to experiment. If anyone knows these, please let me know, then I could compute rather than experiment. They are read from the ambient, diffuse and specular files in fgdata/Lighting. For the default lighting scheme these do get altered, but I think you already override that scheme completely. The first row is the sun position (with 90 being at the horizon, 9 being straight up) and the second row is the lighting factor. Erik -- http://www.adalin.com - Hardware accelerated AeonWave and OpenAL for Windows and Linux - AeonWave Audio Effects software for DJ, Instrumentalist and Vocalist -- Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Terrain self-shading
Hi Thorsten, I presume the balance between ambient and diffuse should vary with the weather. A clear sky gives harsh shadows and overcast sky with several layers of clouds gives barely any shadows (dull day in photographer speak). Your results (which are really pretty) are likely to be unrealistic with bad weather and perhaps a middle term as it is now will fit more situations if the balance is not adjustable. Regards, -Fred -- Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Terrain self-shading
On Sun, Apr 14, 2013 at 9:40 AM, Renk Thorsten wrote: Downstream, to preserve the illusion of shadows, I've had to alter the tree shader to purely ambient lighting based on sun angle above the horizon. But that seems to be a good idea in general - not only is this cheapter to compute, but also our tree sprites have flat suraces with a clear normal, so they have very pronounced directional scattering - real trees have random orientation of leaves and needles and a leaf can also transmit light, so I think real trees have much weaker directional light scattering and isotropic scattering is actually the better approximation. No objection from me. I've never been particularly happy with the directional scatter on the trees, but haven't spent any time trying to fix it. On a related note, the thread highlights that our tree textures are rather small, so our trees look quite blocky. When I initially implemented them, I think I just used the same texture sizes as the existing tree models, so the trees are only 128 pixels tall in a 512x128 strip. As it happens, I'm part way through a change that would allow varying snow- and leaf- cover without having to load different textures, so trees above the snowline could be snow covered while those below are not. This will increase the size of the textures to 512x512, while an individual tree will remain on 128 pixels tall. Given that we've got a very limited number of tree textures and the same texture is used on a large number of objects, perhaps it would be worthwhile increasing the resolution? -Stuart -- Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel