THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 23/11/2009 at 18:43, xxxxxxxx wrote:
Cinema 4D Version: 11
Platform: Windows ;
Language(s) : C++ ;
I know that access to the layer shader is pretty limited with C++ but is it possible to insert a layer shader in to a channel and then insert a noise shader and a fresnel shader in to that layer shader?
On 23/11/2009 at 22:26, xxxxxxxx wrote:
Limited? In what regard?
If you search in the SDK for "Layer", you find a wealth of information about LayerShader, LayerShaderLibrary and a host of parameters.
I might be wrong, but that doesn't look very limited to me at the first glance.
On 23/11/2009 at 23:49, xxxxxxxx wrote:
LayerShaderLibrary is indeed very limited:
On 24/11/2009 at 02:28, xxxxxxxx wrote:
Okay... really a gap in the SDK.
Means that answer to original question is NO.
On 24/11/2009 at 11:34, xxxxxxxx wrote:
Is there any hope of getting this working or is there some sort of workaround? We need to dynamically update the shaders in the layer channel for our plugin to function...Its the icing on a very big cake! I've tried dozens of unskilled attempts, the commented stuff below crashes, and the current stuff doesn't put anything into my layer shader-just makes an empty one:
// Failed attempts at layer shader!!!
PluginShader *shd2 = NULL;
shd2 = PluginShader::Alloc(Xlayer);
if(!shd2) return FALSE;
// LayerShader *lshd2 = (LayerShader* )shd2;
// LayerShaderLayer *layer = NULL;
// lshd2->InsertShader(bmp, NULL); // This breaks it!!!
BaseContainer *shd2data = shd2->GetDataInstance();
On 25/11/2009 at 00:31, xxxxxxxx wrote:
Unfortuantly it is not possible to insert shaders into the layer with the plugin API.
On 26/11/2009 at 13:49, xxxxxxxx wrote:
Thanks Matthias. I ended up just using a different channel and was able to achieve the same effect.