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
    • Recent
    • Tags
    • Users
    • Login

    Melange: Materials, Channels, Texture Names

    Scheduled Pinned Locked Moved SDK Help
    5 Posts 0 Posters 358 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 18/10/2011 at 03:53, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   13 
      Platform:   Windows  ;   Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      Hey!

      Edited because of curiosity reasons:

      I'm writing an importer for C4D files for our tool. These C4D files can have channels for COLOR, SPECULAR, NORMAL and REFLECTION. I am not sure however what the best way is to get the name of these texture files, and their accompanying type.

      I can test all shader types and get, whatever maps are defined, a number of different textures. However, i can't match the file names and their desired channel. I am probably doing something wrong here... thus i don't now if asdf.png is a normal map or a spec map (for example)

      Ah, and when i e.g. test for the Normal channel that is enabled in C4D - i  get a false result. All other checkboxes are returned correctly.

      Really looking for pointers.... 😞

      Thanks!

      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 19/10/2011 at 03:07, xxxxxxxx wrote:

        Textures (bitmaps) are handled through the bitmap shader in C4D materials. Retrieve the bitmap shader with the Material class' GetShader method (pass the ID of the channel). Check if it contains a path to the bitmap with the BaseShader class' HasContent method. If so retrieve the path with GetFileName.

        cheers,
        Matthias

        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 20/10/2011 at 01:45, xxxxxxxx wrote:

          Matthias,

          thanks for your help. So i basically pass the shader according to the channel i need, and get all data? that's like i did it. I was a bit confused however, as GetChannelState(CHANNEL_NORMAL) is false, but a normal map is present....

          Thanks

          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 17/11/2011 at 07:35, xxxxxxxx wrote:

            Hello,

            I have a same problem. I have a BaseShader where a texture is inside. And I like to know the filename of this texture. But I don't see a function to get the filename. With shd->GetName() I got always "Bitmap" back ?

            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 17/11/2011 at 08:04, xxxxxxxx wrote:

              The filename of the texture is in the shader's container. So if you have a BaseShader 'shd':

              BaseContainer *shddata = shd->GetDataInstance(); 
              Filename fname = shddata->GetFilename(BITMAPSHADER_FILENAME);
              
              1 Reply Last reply Reply Quote 0
              • First post
                Last post