THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 27/03/2006 at 03:14, xxxxxxxx wrote:
Cinema 4D Version: 8.5
Language(s) : C++ ;
Ive recently shifted to c++ from coffee, and find the 8.5 material system difficult to use... I need to create a new bitmap shader. I can do it using basechannels, grabbing ,say, the color channel and reading/assignong its bitmap. I know that basechannels are now old hat, but how do you create a new shader[xbitmap] and then assign a new bitmap to it? Can someone show me a quick example how to do this?
The prob I have is the basecontainer IDs. With basechannels you can set a new filename for the InitTexture to find , but what are the IDs for an xbitmap ?
Is it okay to continue using basechannels? Will they suddenly be removed from future versions......?
thanks for ANY help at all....
ve recently shifted to c++ from coffee, and find the 8.5 material system difficult to use... I need to create a new bitmap shader. I can do it using basechannels, grabbing ,say, the color channel and reading/assignong it
On 27/03/2006 at 09:21, xxxxxxxx wrote:
I just need to understand the ethos of materials now...
If you attach a new shader to a material, how do you decide which material channel it is working for? e.g. create a noise shader and apply it to the material`s color channel..
On 29/03/2006 at 08:02, xxxxxxxx wrote:
References to Shaders are now stored in BaseLinks. So you can just do mat->GetDataInstance()->GetLink( MATERIAL_COLOR_SHADER, doc, Xshader ) to get the shader in the color channel for example.
The id's can be found in mmaterial.h in the resource/res/description folder.
Some of the shader headers are in
But most of them are in
Look for files like Xshadername.h
The id's for the Bitmap shader are in
To give a channel a bitmap texture you would do something like:
PluginShader* shd = PluginShader::Alloc(Xbitmap);
mat->GetDataInstance()->SetLink( MATERIAL_COLOR_SHADER, shd );
Of course, don't forget to check the result of allocations, delete shaders that are not needed anymore.. well you know.. all the memory management stuff that is not needed in coffee..
On 30/03/2006 at 02:09, xxxxxxxx wrote:
I know you pros are generally too busy to help new starters with the basics, but this is much appreciated.
On 30/03/2006 at 07:39, xxxxxxxx wrote:
Sorry for sounding thick, but I can use the above to make noise shaders etc. but cannot make a new LayerShader. .
I assume you use Insertshader to add layers to an Xlayer.. and then link to a full-blown LayerShader... but can`t seem to get it to work.
On 30/03/2006 at 11:23, xxxxxxxx wrote:
the Layershader is quite special. From the R9.5 SDK upwards, there is a library to deal with it. Look for lib_layershader, or so. If you can't find there what you need, i guess you are out of luck. InsertShader will not work i think.
On 30/03/2006 at 11:27, xxxxxxxx wrote:
can`t win em all......