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

    Shader Preview Size

    SDK Help
    0
    4
    401
    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 21/06/2017 at 13:04, xxxxxxxx wrote:

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

      ---------
      Hello.

      To render a ShaderData's preview, I use  InitRender, Output and FreeRender.
      How do I get the size of the preview that I have to fill ?

      Thank you.

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

        On 22/06/2017 at 01:58, xxxxxxxx wrote:

        Hi,

        there's not actually a size you could get. The shader will be sampled in UV space. All you could do is to check for the presence of VolumeData in order to differentiate between preview generation and production renders. Based on this you may decide to prepare images of different resolutions. But then again don't forget the user can open the shader preview in a separate window which can be scaled to arbitrary size. So maybe it's more something to configure for the user, to set the desired preview quality/resolution?

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

          On 19/09/2017 at 03:21, xxxxxxxx wrote:

          Hello.

          By right clicking the shader preview, you get the menu for preview size (small, medium, e.t.c).
          Can I catch that as message to know which size option user picked ? That way I can use different hardcoded size options in my code which I can use depending on user's choice.

          Thank you for your time.

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

            On 21/09/2017 at 01:23, xxxxxxxx wrote:

            Hello,

            the size of the shader preview image is soly managed within the tex box GUI element. The shader is not informed on the change of the preview size.

            best wishes,
            Sebastian

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