Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    Custom MaterialData UV & Parameter Bugs [SOLVED]

    SDK Help
    0
    27
    15.5k
    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
      Helper
      last edited by

      On 11/11/2014 at 10:45, xxxxxxxx wrote:

      this is a normal behavior!! 🙂 , I tested it with standard material and it does the same!!!!

      edit: this is a CONFIRMED bug, when I render, it renders correctly "OpenGL got a problem here" , it renders correct because it uses UVs , not spherical projection "like OpenGL"

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

        On 16/11/2014 at 10:44, xxxxxxxx wrote:

        @Sebastian.
        There seems to be a problem in your example.
        When you choose to use a shader. And you load an image into the shader. The preview icon is white.
        This only happens with the sphere preview option.

        I just ran into this same problem when writing my own R13 material plugin.
        And I discovered that if I Shift+LMB on the sphere in preview window and rotate it 180 degrees in X. The image shows up properly.
        So I guess we need a way to either show both sides of the sphere. Or some way to see the other side of the sphere in the material's preview window?

        -ScottA

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

          On 21/11/2014 at 11:38, xxxxxxxx wrote:

          Any progress in fixing the sphere preview yet?

          -ScottA

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

            On 24/11/2014 at 10:57, xxxxxxxx wrote:

            Hello,

            I have not found a solution for this particular issue yet.

            best wishes,
            Sebastian

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

              On 24/11/2014 at 11:43, xxxxxxxx wrote:

              OK. Thanks for the update.
              At least I know now that it's not something I'm doing wrong.

              -ScottA

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

                On 28/11/2014 at 02:18, xxxxxxxx wrote:

                Hello,

                in the standards preview scene the Texture Tag tiles the U coordinate. This way coordinates bigger than 1 are created. So a material must handle such coordinates. To make sure a shader will handle this properly the texture flags in the ChannelData[URL-REMOVED] object have to be set. This can be done using CALC_TEXINFO[URL-REMOVED]:

                  
                             ChannelData channelData(vd);  
                             channelData.texflag = CALC_TEXINFO(((TexData* )vd->tex)->texflag, CHANNEL_ANY);  
                  
                             resultColor = _renderParamShader->Sample(&channelData);  
                

                For further questions on materials please open a new thread. Thanks.

                Best wishes,
                Sebastian


                [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

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

                  On 28/11/2014 at 07:43, xxxxxxxx wrote:

                  Excellent. That fixes it.
                  Thanks Sebastian. 👍

                  -ScottA

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