Board index FlightGear Development Weather

Including 3dclouds as models

Everything related to weather simulation, visuals should be discussed in the shader subforum.

Including 3dclouds as models

Postby D-ECHO » Sun Oct 25, 2015 8:13 am

Hi guys!
For a multiplayer event, I would like to do an AI scenario which sets thermals to some positions (so that everyone has the same).
But I wondered whether it's possible to include the 3d-clouds (used by the advanced weather system) as a model into the AI scenario.
Regards
D-ECHO
D-ECHO
 
Posts: 2453
Joined: Sat May 09, 2015 1:31 pm

Re: Including 3dclouds as models

Postby Thorsten » Sun Oct 25, 2015 8:20 am

By and large no, as the 3d clouds aren't models but procedurally generated quad stacks.

There is a provision to generate a cloud from Nasal at a definite position

fgcommand("add-cloud", p);

where p is a property node containing all the cloud properties (see README.3DClouds for details on how to set this up), but these clouds will not be linked to the AI scenario like models are but to the current 3d cloud layer - in particular they will not move as the AI thermals but as the rest of the clouds.

I think it should be possible to set up what you want, but only using carefully managed windfields and some custom-rigged Nasal.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Including 3dclouds as models

Postby sdef » Tue Mar 21, 2017 10:20 am

Hi Everyone,

I am using Flightgear 3.4 version, i am able to enable 3d clouds through GUI(Environment/weather) but i want to enable through code.
so can any one say me how to enable 3d clouds in flightgear code.

thanks in advance.
sdef
 
Posts: 7
Joined: Tue Mar 21, 2017 10:02 am

Re: Including 3dclouds as models

Postby erik » Tue Mar 21, 2017 11:48 am

Why exactly do you want to do that?
It is highly discouraged to set rendering options in aircraft configurations for example.
(Or in any other configuration file for that matter).

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2238
Joined: Thu Nov 01, 2007 2:41 pm

Re: Including 3dclouds as models

Postby sdef » Tue Mar 21, 2017 2:51 pm

Because i want to control the weather(rain,fog,cloud...) through keyboard input.

Enabling/disabling is done with key input as in default flightgear.
sdef
 
Posts: 7
Joined: Tue Mar 21, 2017 10:02 am

Re: Including 3dclouds as models

Postby erik » Tue Mar 21, 2017 4:01 pm

Ok, you can enable 3D clouds by setting /sim/rendering/clouds3d-enable to true.

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2238
Joined: Thu Nov 01, 2007 2:41 pm

Re: Including 3dclouds as models

Postby sdef » Wed Mar 22, 2017 8:35 am

Ok i enabled it to true. still i can't..

Can you please tell me where exactly 3d clouds are drawn or rendered on screen in code. i want to know where that logic is implemented.
sdef
 
Posts: 7
Joined: Tue Mar 21, 2017 10:02 am

Re: Including 3dclouds as models

Postby Thorsten » Wed Mar 22, 2017 10:26 am

You don't need that for what you described. To change the weather via keyboard input, all you need to do is to control the high-level weather parameters, there's no need to inspect the rendering code (if you still want to see it, just run a find for any file that contains 'cloud' in its name over the FG source code, and you'll get the lot - it's one of the most involved and opaque parts of the code, so enjoy).
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am


Return to Weather

Who is online

Users browsing this forum: No registered users and 2 guests