On mercredi 07 janvier 2009, Vladimir Karmisin wrote: > Hello ! > In past couple of weeks I wrote GLSL-based shader for fluid surfaces and > now trying to deploy it into FlightGear. > As far as I know - there's no diference between solid and liquid surfaces > from FG/SG point of view. In other words > - rivers, lakes, ocean are a part of TerraGear scenery (except OceanTiles > for non existent BTG-s of course). > > To make shader work propertly - probally I have to embedd a fluids into > separate graph of scene (or into a subgraph > of terrain), and assign a StateSet, containing shader and all of it data to > it. > > If anyone have any idea or suggestion - how water can be separated from > terrain, please drop me a note, right > now all idea I have is only to determine quality of a BTG object by > it's material name. Hello I am not sure that could answer your question, however i do use the following nasal script to know if there is water or solid under.
terrain_under = func { var lat = getprop("/position/latitude-deg"); var lon = getprop("/position/longitude-deg"); var info = geodinfo(lat, lon); if (info != nil) { if (info[1] != nil) setprop("/environment/terrain",info[1].solid); #print("and it is ", info[1].solid ? "solid ground" : "covered by water"); #debug.dump(geodinfo(lat, lon)); }else { setprop("/environment/terrain",1); } settimer (terrain_under, 0.1); } so............ :) Happy new year -- Gérard http://pagesperso-orange.fr/GRTux/ J'ai décidé d'être heureux parce que c'est bon pour la santé. Voltaire ------------------------------------------------------------------------------ Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel