Page 1 of 1

Maxwell SDK 3.2.0 environment IBL settings problem

Posted: Fri Oct 16, 2015 2:46 pm
by ArmanZak
When I export scene from Maxwell Render Plugin for Daz Studio
scene always exported with IBL Settings ScreenMapping on.

This is a part of a code.
Code: Select all
mxEnvironment.setEnvironmentWeight(iblSettings->getFloatValue("Intensity"));

		mxEnvironment.setEnvironmentLayer(maxwellrender::EnvironmentLayer::IBL_LAYER_BACKGROUND,
											iblSettings->getStringValue("BackMap").toLocal8Bit().data(),
											iblSettings->getIntValue("BackType"),
											false,
											iblSettings->getBoolValue("Interpolation"),
											iblSettings->getFloatValue("BackIntensity"),
											iblSettings->getFloatValue("BackScaleFrom"),
											iblSettings->getFloatValue("BackScaleTo"),
											iblSettings->getFloatValue("BackOffsetFrom"),
											iblSettings->getFloatValue("BackOffsetTo"));

		mxEnvironment.setEnvironmentLayer(maxwellrender::EnvironmentLayer::IBL_LAYER_REFLECTION,
			iblSettings->getStringValue("ReflMap").toLocal8Bit().data(),
			iblSettings->getIntValue("ReflType"),
			iblSettings->getBoolValue("ScreenMapping"),
			iblSettings->getBoolValue("Interpolation"),
			iblSettings->getFloatValue("ReflIntensity"),
			iblSettings->getFloatValue("ReflScaleFrom"),
			iblSettings->getFloatValue("ReflScaleTo"),
			iblSettings->getFloatValue("ReflOffsetFrom"),
			iblSettings->getFloatValue("ReflOffsetTo"));

		mxEnvironment.setEnvironmentLayer(maxwellrender::EnvironmentLayer::IBL_LAYER_REFRACTION,
			iblSettings->getStringValue("RefrMap").toLocal8Bit().data(),
			iblSettings->getIntValue("RefrType"),
			iblSettings->getBoolValue("ScreenMapping"),
			iblSettings->getBoolValue("Interpolation"),
			iblSettings->getFloatValue("RefrIntensity"),
			iblSettings->getFloatValue("RefrScaleFrom"),
			iblSettings->getFloatValue("RefrScaleTo"),
			iblSettings->getFloatValue("RefrOffsetFrom"),
			iblSettings->getFloatValue("RefrOffsetTo"));

		mxEnvironment.setEnvironmentLayer(maxwellrender::EnvironmentLayer::IBL_LAYER_ILLUMINATION,
			iblSettings->getStringValue("IllumMap").toLocal8Bit().data(),
			iblSettings->getIntValue("IllumType"),
			iblSettings->getBoolValue("ScreenMapping"),
			iblSettings->getBoolValue("Interpolation"),
			iblSettings->getFloatValue("IllumIntensity"),
			iblSettings->getFloatValue("IllumScaleFrom"),
			iblSettings->getFloatValue("IllumScaleTo"),
			iblSettings->getFloatValue("IllumOffsetFrom"),
			iblSettings->getFloatValue("IllumOffsetTo"));
	}
if you want I can put plugin for testing. (Now it under development)

Re: Maxwell SDK 3.2.0 environment IBL settings problem

Posted: Fri Oct 16, 2015 5:23 pm
by JDHill
The problem is that you are always setting the fourth argument (bool sphericalMapping) to false in your background channel. Also note that screen mapping is only supported in the background channel -- this argument has no effect on the other channels.

Re: Maxwell SDK 3.2.0 environment IBL settings problem

Posted: Sat Oct 17, 2015 11:20 am
by ArmanZak
Thanks.
But documentation says.
http://www.maxwellrender.com/api/3.2/do ... e96f82d999
sphericalMapping can only be set to false when layerType = IBL_LAYER_BACKGROUND.
My english is very bad, and I understand this, than
sphericalMapping parameter for layerType = IBL_LAYER_BACKGROUND must be false.
maybe I'm wrong?

Re: Maxwell SDK 3.2.0 environment IBL settings problem

Posted: Sat Oct 17, 2015 6:53 pm
by JDHill
I can see how that might be difficult to interpret:
Code: Select all
sphericalMapping can only be set to false when layerType = IBL_LAYER_BACKGROUND
This is not saying that it must be set to false, it is saying that setting it to false will have no effect unless layerType==IBL_LAYER_BACKGROUND. You can also just think of it in terms of how Maxwell works: the background channel is the only channel that supports screen mapping.

Re: Maxwell SDK 3.2.0 environment IBL settings problem

Posted: Sat Oct 17, 2015 7:01 pm
by ArmanZak
Ok.
You, right.
Thanks, again.