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

    How to make DrawTexture ignore the Depth of Field option?

    Cinema 4D SDK
    python r20
    2
    8
    940
    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.
    • R
      rui_mac
      last edited by

      I'm drawing a bitmap on the viewport using DrawTexture but, if the Depth of Field option is turned on and depending on the camera settings, the bitmap is drawn out of focus.
      Is there a way to make DrawTexture always draw the bitmap without any blurring, no matter if the Depth of Field option is on or off?
      Thank you very much in advance for any reply.

      1 Reply Last reply Reply Quote 0
      • ManuelM
        Manuel
        last edited by

        Hello @rui_mac

        First, for your next threads, please help us keeping things organised and clean. I know it's not your priority but it really simplify our work here.

        • Q&A New Functionality.

        I've marked this thread as a question so when you considered it as solved, please change the state πŸ™‚

        Regarding your question,

        The DrawTexture is drawing a polygon so you have to specify where in space your points are. You can retrieves the camera FocusDistance and draw the polygon there. Of course this will probably draw your polygon behind other objects and I guess it's not what you want. (let me know)

        If you want to "draw" some information i would suggest to create a VideoPostPlugin using c++

        Cheers,
        Manuel

        MAXON SDK Specialist

        MAXON Registered Developer

        1 Reply Last reply Reply Quote 0
        • R
          rui_mac
          last edited by

          I didn't realized this would qualify as a new functionality. Sorry.
          In fact, I don't want it to be drawn behind other objects.
          It is supposed to show as a floating layer on top of everything else.

          1 Reply Last reply Reply Quote 0
          • ManuelM
            Manuel
            last edited by

            @rui_mac said in How to make DrawTexture ignore the Depth of Field option?:

            I didn't realized this would qualify as a new functionality. Sorry.

            The linked thread is talking about the new functionality of the forum, Mark a thread as "Ask a question".
            This allow us to find quickly the unresolved questions. (in case we missed something)

            You need to switch to c++ and write your own VideoPostPlugin to draw at the end of the render.

            Cheers,
            Manuel

            MAXON SDK Specialist

            MAXON Registered Developer

            1 Reply Last reply Reply Quote 0
            • R
              rui_mac
              last edited by

              Well, since this is a plugin that I had already coded in python, I don't think I will be converting it to C++.
              But in the future I know now that I will need to start a project that requires this type of control, in C++.

              Tell me... Manuel MagalhΓ£es... are you portuguese?

              1 Reply Last reply Reply Quote 0
              • ManuelM
                Manuel
                last edited by

                My parent were, but I'm French. My Portuguese is really bad.

                MAXON SDK Specialist

                MAXON Registered Developer

                1 Reply Last reply Reply Quote 0
                • R
                  rui_mac
                  last edited by

                  I had to ask, since your name is so "portuguese" πŸ™‚

                  1 Reply Last reply Reply Quote 0
                  • ManuelM
                    Manuel
                    last edited by

                    hi,

                    without any further feedback, this thread will be considered as solve tomorrow.

                    Cheers
                    Manuel

                    MAXON SDK Specialist

                    MAXON Registered Developer

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