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

    Material preview in viewport using OpenGL [SOLVED]

    SDK Help
    0
    3
    412
    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 29/09/2016 at 06:39, xxxxxxxx wrote:

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

      ---------
      Hello,

      Is it possible to get the viewport's Open GL context to be able to render material previews directly in viewport?

      At the moment I am sending my material preview scenes to my custom network renderer and after waiting for the result I display it line after line.
      It would be much faster and easier if I could render this simple scene directly in viewport but I couldn't find this specific thing in the documentation.

      Thank you in advance!

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

        On 30/09/2016 at 08:27, xxxxxxxx wrote:

        Hi Rico, thanks for writing us.

        With reference to your request to properly support you, I need some additional details about your intended workflow and what you're trying to achieve.
        From your request it's not 100% clear, when talking about "material preview", if you mean creating a material thumbnail for the Material Manager or if you intend to create a the material in viewport as it would be seen once rendered by the offline engine or, in the end, if you just want to show a material preview scene in viewport during an auto-refining rendering process.
        In the meanwhile, I invite you to take a look at the gl_material shader example available here which covers some aspects regarding showing OpenGL material in viewport and might be helpful to shed light on the topic pointed but please be aware this is a pretty undocumented part of the API and the support will probably rather limited.
         
         
        Best, Riccardo

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

          On 02/10/2016 at 23:26, xxxxxxxx wrote:

          Thank you for your response Riccardo!

          I will take a look at your example and let you know wether it contains the information I was looking for.

          All the best, Rico

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