basechannel?
-
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:
User Information:
Cinema 4D Version: 8.5
Platform:
Language(s) : C++ ;---------
Hi.
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 it
s 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....
tone. -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 27/03/2006 at 09:21, xxxxxxxx wrote:
Hi.
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..
anyone..........? -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
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
resource/res/description
But most of them are in
resource\modules\shader\res\description
and
modules\CINEMA 4D\sla\res\descriptionLook for files like Xshadername.h
The id's for the Bitmap shader are in
resource/res/description/Xbitmap.hTo give a channel a bitmap texture you would do something like:
PluginShader* shd = PluginShader::Alloc(Xbitmap);
shd->GetDataInstance()->SetFilename(BITMAPSHADER_FILENAME,"texture.jpg");
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..
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 30/03/2006 at 02:09, xxxxxxxx wrote:
Thanks Michael....
I know you pros are generally too busy to help new starters with the basics, but this is much appreciated.
cheers..
tone. -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 30/03/2006 at 07:39, xxxxxxxx wrote:
Hmm..
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.
cheers... -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 30/03/2006 at 11:23, xxxxxxxx wrote:
Hi,
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.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 30/03/2006 at 11:27, xxxxxxxx wrote:
Ah well..
can`t win em all......
ta.