Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    basechannel?

    Scheduled Pinned Locked Moved SDK Help
    7 Posts 0 Posters 501 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      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 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....
      tone.

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        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..........?

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          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\description

          Look for files like Xshadername.h
          The id's for the Bitmap shader are in
          resource/res/description/Xbitmap.h

          To 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..

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            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.

            1 Reply Last reply Reply Quote 0
            • H Offline
              Helper
              last edited by

              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...

              1 Reply Last reply Reply Quote 0
              • H Offline
                Helper
                last edited by

                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.

                1 Reply Last reply Reply Quote 0
                • H Offline
                  Helper
                  last edited by

                  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.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post