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

    Transforming 3D viewport vertices

    SDK Help
    0
    11
    984
    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 28/08/2015 at 02:19, xxxxxxxx wrote:

      Hello,

      Cinema 4D is no real time application and the viewport is no open OpenGL engine so one has no way to influence the viewport this way. The only thing that comes to mind are the OpenGL post effect functions of VideoPostData plugins. But these functions are not documented and no additional support can be given.

      Best wishes,
      Sebastian

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

        On 28/08/2015 at 03:17, xxxxxxxx wrote:

        @Sebastian: Is there at least an example to start with? Eg. how to retrieve the OpenGL context for the active base draw?

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

          On 28/08/2015 at 10:06, xxxxxxxx wrote:

          Hello,

          I don't think it is possible to get the OpenGL context of a viewport window. Cinema 4D is not intended to be modified this way.

          Best wishes,
          Sebastian

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

            On 28/08/2015 at 10:18, xxxxxxxx wrote:

            I really have few experiences with OpenGL to be honest, but can you actually do OpenGL stuff without
            the main OpenGL context? :'-)

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

              On 28/08/2015 at 11:18, xxxxxxxx wrote:

              Then how can the stereo vp example change how the viewport is drawn?
              If it can shift the vertices to draw 2 different point of views, can't I transform according to my parameters also?

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

                On 31/08/2015 at 00:34, xxxxxxxx wrote:

                Hello,

                the VideoPostData class contains special functions to support stereoscopic functionality as seen in the example you mentioned. So what you can do in such an video post is to move the camera(s), not to move the vertices.

                Best wishes,
                Sebastian

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

                  On 11/09/2015 at 09:34, xxxxxxxx wrote:

                  Hello Roger,

                  was your question answered?

                  Best wishes,
                  Sebastian

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

                    On 11/09/2015 at 14:04, xxxxxxxx wrote:

                    these are the lines that control the vertex position.
                    https://github.com/PluginCafe/cinema4d_cpp_sdk/blob/master/source/videopost/vpstereo.cpp#L335-L372

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

                      On 11/09/2015 at 17:10, xxxxxxxx wrote:

                      Looks like a fragment shader to join the stereo cameras into one. 
                      I need to take a closer look into that when I have some time.

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

                        On 12/09/2015 at 05:26, xxxxxxxx wrote:

                        Afaik, inside the Draw functions you can call OpenGL code just as usual. Worked fine for me here I clearly remember (it's a few years back but I used to draw my own polygon objects, boxes etc. so if it was possible back then it should be right now). Don't think I could retrieve the OGL context though.

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