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

    BakeTexture in vertex map shader

    SDK Help
    0
    2
    314
    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 08/06/2016 at 05:48, xxxxxxxx wrote:

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

      ---------
      Hello.

      I have my a MaterialData plugin that can pass shaders in my render engine as textures.
      The problem is that the vertex shader is not baked correctly, even though the physical render shows the correct result.
      Noise, gradients , colorizer and other shaders appear fine.

      So I suppose the way the vertex map is baked differs from the rest. Is there anything I can do to bake the vertex maps correctly ? Do I need specific Bake settings ?

      Here are the settings that I use.

      bake_settings.InsData(BAKE_TEX_WIDTH,GeData(resolution_x));
      bake_settings.InsData(BAKE_TEX_HEIGHT,GeData(resolution_y));
      bake_settings.InsData(BAKE_TEX_UV_LEFT,GeData(0.0));
      bake_settings.InsData(BAKE_TEX_UV_RIGHT,GeData(1.0));
      bake_settings.InsData(BAKE_TEX_UV_TOP,GeData(0.0));
      bake_settings.InsData(BAKE_TEX_UV_BOTTOM,GeData(1.0));
        
      bake_settings.InsData(BAKE_TEX_AMBIENT_OCCLUSION,GeData(FALSE));
      bake_settings.InsData(BAKE_TEX_ILLUMINATION,GeData(FALSE));
      bake_settings.InsData(BAKE_TEX_SHADOWS,GeData(FALSE));
      bake_settings.InsData(BAKE_TEX_NO_GI,GeData(TRUE));
      bake_settings.InsData(BAKE_TEX_USE_CAMERA_VECTOR,GeData(FALSE));
      bake_settings.InsData(BAKE_TEX_SHOW_STATUS,GeData(TRUE));
      bake_settings.InsData(BAKE_TEX_PROGRESS_BITMAP,GeData(TRUE));
        
      bake_settings.InsData(BAKE_TEX_COLOR,GeData(TRUE));
      bake_settings.InsData(BAKE_TEX_DIFFUSION,GeData(FALSE));
      bake_settings.InsData(BAKE_TEX_LUMINANCE,GeData(FALSE));
      bake_settings.InsData(BAKE_TEX_ALPHA,GeData(FALSE));
      bake_settings.InsData(BAKE_TEX_TRANSPARENCY,GeData(FALSE));
      bake_settings.InsData(BAKE_TEX_REFLECTION,GeData(FALSE));
      bake_settings.InsData(BAKE_TEX_DISPLACEMENT,GeData(FALSE));
      bake_settings.InsData(BAKE_TEX_NORMAL,GeData(FALSE));
      bake_settings.InsData(BAKE_TEX_BUMP,GeData(FALSE));
      

      I bake only the color channel.

      Thank you.

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

        On 13/06/2016 at 02:28, xxxxxxxx wrote:

        Hello,

        the pyhsical renderer does not bake the vertex map shader (or any other shader). It can simply sample the given shader in object or world space.

        Can you post some more code showing how exactly you are trying to bake the shader?

        Best wishes,
        Sebastian

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