Jump to content

[SOLVED] Precipitations - IG plugin


photo

Recommended Posts

Hello, 

i wonder how to control the weather only via the IG plugin. According to the documentation, there are 5 layers active.
But I have no regions. meteo.getNumRegions () returns 0. What about the layers, is it only for CIGI?

I am trying to start raining, but not working. I can only manage the clouds through my added global region.
How should I proceed if I want to activate raining?

Thanks for your help.

Link to comment

Hello Michal,

Firstly you need to create a region with addRegion and specify its type (global/local). Then you can control the region with IG::IRegion.

To start raining use setPrecipitationType. Please note, that rain/snow/etc. in the local region wouldn't be visible outside of this region.

If you experiencing problems with this task, please, send us a test scene (source and data folders).

Thank you.

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

Hello!
you should add
setPrecipitationIntensity(1)
setPrecipitationSize(1)

by default they are 0. These methods take range from 0.0f to 1.0f

also meteo.refresh() call refresh() for all regions

Link to comment

the plane was not within the region. 

	auto global_region = ig_manager->getMeteo()->addRegion(0);

	global_region->setEnabled(true);
	global_region->setType(0);
	global_region->setAltitude(1000.0);	// Sets altitude of the base (bottom) of the layer of the weather region. Entity in winterthur_geopos.z = 1000
	global_region->setVisibilityDistance(constants::global_visiblity);
	global_region->setCloudDensity(0.8f);
	global_region->setCloudTypeByEnum(constants::stratus_type);
	global_region->setThickness(500.0); // Sets vertical layer thickness for the weather region. The altitude of the top of the layer is equal to this value plus altitude
	global_region->setPrecipitationType(2);
	global_region->setPrecipitationIntensity(1);
	global_region->setPrecipitationSize(1);

	ig_manager->getMeteo()->refresh();

 

Link to comment

Thank you for your help. I need a separate global layer for rain otherwise it conflicts with  clouds altitude.

Now it works.

image.png.885e62c2368c1352eee2f5709dc38b17.png

 

 

Edited by michal
Link to comment
  • morbid changed the title to [SOLVED] Precipitations - IG plugin
×
×
  • Create New...