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
    • Recent
    • Tags
    • Users
    • Login

    Get non-render camera render pixels

    Scheduled Pinned Locked Moved SDK Help
    12 Posts 0 Posters 769 Views
    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 Offline
      Helper
      last edited by

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

      On 17/04/2009 at 16:56, xxxxxxxx wrote:

      Oh, I always wanted to do the same thing! The CamShader 🙂

      I haven't done much with channel shaders yet, so I can only explain how I think it would work. My idea would be to implement a channel shader that actually works like a refraction. So you get the ray that comes from the active camera and hits the object's surface, and you kinda reroute the ray so it shoots out of the second camera. The math should be rather easy, I *think*.

      Really I think the calculation should work almost like a refraction (or reflection).

      Cheers,
      Jack

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

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

        On 21/04/2009 at 03:07, xxxxxxxx wrote:

        In what context do you want to get the pixels, in a shader, post effect etc.?

        cheers,
        Matthias

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

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

          On 21/04/2009 at 06:13, xxxxxxxx wrote:

          Shader for sure. 🙂

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

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

            On 21/04/2009 at 23:48, xxxxxxxx wrote:

            Quote: Originally posted by c4dJack on 17 April 2009
            >
            > * * *
            >
            > Oh, I always wanted to do the same thing! The CamShader 🙂
            >
            >
            > * * *

            guess how an old plugin of mine is called 😉
            I didn't finish it though...

            i took a camera (or an other object) and spawned new rays from those coordinates

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

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

              On 22/04/2009 at 09:11, xxxxxxxx wrote:

              Why didn't you finish it? Would you be willing to share your code? 🙂

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

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

                On 22/04/2009 at 09:11, xxxxxxxx wrote:

                yeah, that would be really cool...

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

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

                  On 23/04/2009 at 00:06, xxxxxxxx wrote:

                  I didn't have the time to finish it, and wasn't able to reproduce the focal options of the camera at that time. Here is a part of the code

                  > \> Vector CamShaderData::Output(PluginShader \*chn, ChannelData \*cd) \> { \>      ... \>           Ray ray; \>           ray.p = LV(m.off); \>           m.off = 0.0; \>           Vector dest = Vector(cd->p.x-0.5, 0.5-cd->p.y, 1.0); \>           dest = dest\*m; \>           ray.v = LV(dest); \> \>           SurfaceIntersection si; \>           Vector v; \>           if(cd->vd) \>                v = cd->vd->TraceColorDirect(&ray;, MAXREAL, cd->vd->raydepth, cd->vd->raybits, 0, &si;); \>      ... \> } \>

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

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

                    On 23/04/2009 at 07:24, xxxxxxxx wrote:

                    That is very close to the direction my code was going but the result was always black. In my case though, I was trying to get the camera 'rays' so that the camera options would be already considered. If your code works, that'll be a step in the correct direction. 🙂

                    Thanks,

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

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

                      On 23/04/2009 at 11:27, xxxxxxxx wrote:

                      I also notice that this is very close to Per Anders' solution for a camera shader but it was restricted to the active render camera. Were you ever able to work this with *any* camera? That's the main problem for me.

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

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

                        On 23/04/2009 at 12:56, xxxxxxxx wrote:

                        Okay. That works basically - you should have mentioned that Matrix m = cam->GetMg() but that makes sense. 🙂

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

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

                          On 23/04/2009 at 23:33, xxxxxxxx wrote:

                          ah, yes m is the Camera Matrix, but in my code it doesn't have to be a camera it may be any object.

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