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

    Custom Cameras (FishEye, Panorama, Etc)

    SDK Help
    0
    15
    1.2k
    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

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 18/12/2005 at 13:52, xxxxxxxx wrote:

      Well, as that version is released now, would you mind giving a hint how to do this with VIDEOPOST_CUSTOMLENS?

      Thanks!

      Kabe

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 02/01/2006 at 14:33, xxxxxxxx wrote:

        You give the VIDEOPOST_CUSTOMLENS flag for your videopost node in GetRenderInfo(). Then C4D will send MSG_VIDEOPOST_CREATERAY messages to you. Simply cast the data parameter to VideoPostCreateRay and set p/v depending on x/y.
        If this doesn't work, please tell me what fails so that I can investigate further.

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 22/03/2006 at 09:48, xxxxxxxx wrote:

          Hi!
          I tested VIDEOPOST_CUSTOMLENS flag by making a camera similar to cinema4d perspective camera and there are some diferences in rendered images. Looks like the antialiasing is somehow lost during the CREATE_RAY process...
          The test was really simple, only received x/y converted to perspective and the set p/v.
          Marco Silva

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

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 29/03/2006 at 07:57, xxxxxxxx wrote:

            Hi again!
            this is my code for message function:

                
                
                
                
                Bool Message(GeListNode* node, LONG type, void *data) {
                
                
                
                
                switch (type) {
                
                
                
                
                case MSG_VIDEOPOST_CREATERAY: {
                
                
                
                
                VideopostCreateRay *vpcr = (VideopostCreateRay * ) data;
                
                
                
                
                LReal x = (vpcr->x - width/2.0) / xFactor;
                
                
                
                
                LReal y = (vpcr->y - height/2.0) / yFactor; 
                
                
                
                
                LReal alt, azi, z;
                
                
                
                
                // gnomonic projection, it's a spherical projection equivalent to perspective
                
                
                
                
                gnomonicProjection(-x, y, alt, azi);
                
                
                
                
                // convert altitude and azimuth to vector form
                
                
                
                
                LReal cos_alt = cos(alt);
                
                
                
                
                y = cos(azi) * cos_alt;
                
                
                
                
                x = sin(azi) * cos_alt;
                
                
                
                
                z = sin(alt);
                
                
                
                
                // camera position
                
                
                
                
                vpcr->p.x = camera_x;
                
                
                
                
                vpcr->p.y = camera_y;
                
                
                
                
                vpcr->p.z = camera_z;
                
                
                
                
                // precalculated values for vector rotation
                
                
                
                
                vpcr->v.x = x*v11 + y*v12 + z*v13;
                
                
                
                
                vpcr->v.y = x*v21 + y*v22 + z*v23;
                
                
                
                
                vpcr->v.z = x*v31 + y*v32 + z*v33;
                
                
                
                
                return TRUE;
                
                
                
                
                }
                
                
                
                
                }
                
                
                
                
                return TRUE;
                
                
                
                
                }
                
                
                
            

            this code works perfectly if antialiasing is set to best (16x16), otherwise object edges become aliased...
            can someone please help me... I don't understand why this is happening...
             
            Marco Silva

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

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 31/03/2006 at 10:34, xxxxxxxx wrote:

              Does everything else than Best 16x16 equal None in the AA settings or are the edges just less AA'd the less AA you have set in there? Could you post a complete ray creation algorithm (not necessarily your real one) that shows the problem? I always got somewhat decent AA when I tried.

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

                THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                On 31/03/2006 at 10:37, xxxxxxxx wrote:

                According to the developers VIDEOPOST_CUSTOMLENS will always force the Best AA setting (same as with QTVR, since no projection of geometry edges is possible). Could that be what you're seeing?

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

                  THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                  On 03/04/2006 at 11:41, xxxxxxxx wrote:

                  Probably...
                  The AA Best 16x16 or no AA both make a perfect render. But using other options all the edges suffers from aliasing...
                  It isn't very perceptible but he problem is there...
                  I don't known if you already seen this problem nor if it possible to solve...
                  Other question, is possible to invalidate one ray in MSG_VIDEOPOST_CREATERAY?
                  By other other words, don't render one specific ray, or give it a color, like black.
                  thanks
                  Marco Silva

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

                    THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                    On 12/05/2006 at 07:34, xxxxxxxx wrote:

                    Hi all!

                    I may have found a bug on CUSTOMLENS, when I set 2 planes, one in front of the other, and the nearest is transparent, the ray generated by CREATERAY doesn't hit the far plane!

                    I think this problem is in CUSTOMLENS code, since transparency seems not to be honored...

                    sdk version: 9.5

                    Thanks
                    Marco Silva

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

                      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                      On 16/05/2006 at 07:40, xxxxxxxx wrote:

                      Hi again!

                      Ok this problem has been solved in this new release...
                      In 9.6 CUSTOMLENS works fine!

                      Marco Silva

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

                        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                        On 29/08/2006 at 08:30, xxxxxxxx wrote:

                        Hi all,

                        Again one question about CUSTOMLENS, when I set this flag on my code the post effect "lens effect" simply doesn't render anything...

                        Is this supposed to happend?

                        Cheers,
                        Marco Silva

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

                          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                          On 02/09/2006 at 07:33, xxxxxxxx wrote:

                          Yes, it seems like some post effects will not work with a custom lens. I've passed this on to the developers. Thanks for reporting!

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