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 7: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
User avatar
D-ECHO
 
Posts: 1338
Joined: Sat May 09, 2015 12:31 pm

Re: Including 3dclouds as models

Postby Thorsten » Sun Oct 25, 2015 7: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: 9530
Joined: Mon Nov 02, 2009 8:33 am

Re: Including 3dclouds as models

Postby sdef » Tue Mar 21, 2017 9: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 9:02 am

Re: Including 3dclouds as models

Postby erik » Tue Mar 21, 2017 10: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
erik
 
Posts: 1495
Joined: Thu Nov 01, 2007 1:41 pm

Re: Including 3dclouds as models

Postby sdef » Tue Mar 21, 2017 1: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 9:02 am

Re: Including 3dclouds as models

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

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

Erik
erik
 
Posts: 1495
Joined: Thu Nov 01, 2007 1:41 pm

Re: Including 3dclouds as models

Postby sdef » Wed Mar 22, 2017 7: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 9:02 am

Re: Including 3dclouds as models

Postby Thorsten » Wed Mar 22, 2017 9: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: 9530
Joined: Mon Nov 02, 2009 8:33 am


Return to Weather

Who is online

Users browsing this forum: No registered users and 1 guest