On Thu, Oct 13, 2011 at 9:23 AM, Thorsten Renk wrote: > Hi Stuart, > > after some testing of the new scheme, I have two minor and one major > comment. Minor stuff first: > > * how is the cloud density slider supposed to influence the clouds > generated by add-cloud? Heiko claims that he gets to see an effect, I > tried to reproduce that but all that happened is that all clouds vanished > as soon as I moved the slider, never to reappear.
The cloud density is used as a multiplier on the number of sprites that are generated for a specific cloud instance: int n_sprites = num_sprites * sprite_density * (0.5f + sg_random()); I've repro'd the problem where manually placed clouds disappear when this is changed. I suspect the problem is that it is clearing all the clouds and then causing the "global" clouds to be re-generated. I'll investigate further. > * same thing actually with switching shaders off and on again (I sometimes > do that to see how the scene would look in a different rendering scheme) - > while the global weather clouds reappear, the manually added ones are gone > never to reappear for me. Is this behaviour expected/consistent/as it > should be? Probably a similar problem - I'll take a look. > Now the big thing: it seems I can't use the shading options under most > conditions. The only thing that seems to matter is what I pass as > middle-factor, and that determines the color of the whole cloud from top > to bottom. Yup - that's a bug. Should now be fixed in the shader code so that the top/middle/bottom shade all have an effect. > I have some idea why this might be the case: It's not clear to me how a > vertex shader could paint a single sprite with 4 vertices consistently > with a top, middle and bottom color. All it can do is paint the upper two > vertices in one color, and the lower in a different color, and the rest is > interpolation. A fragment shader could probably do it, but that's not > where the shading code is. > > So, it seems to me that there's the implicit assumption in the scheme that > cloud_height is at least 2-3 times sprite_height, so that there are enough > vertices in between such that 3 colors can be achieved. You are correct. If you are just using a single texture for the cloud then only the top,bottom and shade light factors are really relevant - the middle shade is less relevant. However, you can still use it to determine the shade if the texture isn't exactly the same size as the cloud. > But building clouds that way is a luxury we can't afford too often. You > have to start all design considerations from 8/8 layers which need to run > with decent performance, otherwise you'll never be able to do overcast. > You can't start with a design working well for 1/8 coverage and expect > that it will stay that way for 8/8. LOL. What you say is absolutely correct - I must admit to having completely forgotten this in my enthusiasm for creating greater control over the shading. Looks like it isn't as useful as I had hoped :) However, I hope it will allow you to create towering CBs as composite clouds, with better control over the shade of the top/bottom of each "slice". > I hope that's enough explanation to convince everyone that I'm not being > mean here and just do stupid design that doesn't work with the shading, > but that there are real issues here. I actually feel bad firing off one > issue after the other... I am happy with the performance of the system in > most situations otherwise. No problem. Please keep on pointing out the bugs/issues. I've been trying to stay on top of them and iteratively making the cloud system more useful, but I haven't done as much testing as I would like so it's very useful to have these things pointed out to me. -Stuart ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2d-oct _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel