Announcement

Collapse
No announcement yet.

vray cameramap?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • vray cameramap?

    Is there a vray cameramap node? I'd like to use it to project the film plate onto a groundplane (useBackground in Maya) so that it does not render but will reflect the scene up into my object (for both reflections and GI bounce).

    I can use the old Maya projection and set to the camera, but this gives inaccurate results. The Mental Ray mip_cameramap is more accurate, but of course does not work with vray, so is there a vray version of the cameramap?

  • #2
    Have you tried VRayMtlWrapper with Matte surface ticked?
    Maya 2020/2022
    Win 10x64
    Vray 5

    Comment


    • #3
      As I understand it, the VRayMtlWrapper would be useful for receiving a reflection from an object. What I am trying to do is a bit different. I want to project the film plate (say of a table top) from the camera onto an object (say a model of a table) that had its primary visibility off. That way this object (the table) will not render, but an object sitting on it (say a chrome salt shaker) will properly reflect the film plate (the table top).

      Here is a pic of the difference between the result of the Maya projection from the camera (wrong) and the mental ray mip_cameramap which gives the correct reflection on the sphere. This is from p 38 of the mental ray - Production Shader Library manual. What I am after is a vray node that can do what the mip_cameramap can do:

      Click image for larger version

Name:	mip_cameramap.jpg
Views:	2
Size:	121.4 KB
ID:	843275

      Here's an except from the MR manual:

      The main difference is that the former only uses the current raster position (i.e. x and y coordinate of the pixel currently being rendered) whereas the latter actually calculates the
      image space position of the shaded point.

      Notice how the left image, which uses mib lookup background looks incorrect. It looks transparent rather than reflective. What is the cause of this?
      Imagine we are rendering pixel coordinate 200,200 which lies on the sphere. An eye ray is sent that hits the sphere. This hit point is indeed on the 200,200 pixel coordinate. But the ray
      continues as a reflection ray to hit the ground plane.

      This new point (on the ground plane) is not the same as the pixel being rendered, it is somewhere else in the model. Yet mib lookup background only concerns itself with the current pixel (200,200) and will return the color at that point from the map. Conversely, mip cameramap actually converts this new point to a new set of raster coordinates (e.g. 129,145) and will look up the map at that new position, creating the correct appearance in the reflection.

      However, there is a snag; what happens if the reflected point lies outside the screen? What if the calculated raster coordinate is (-45, 39)? The answer is that mip cameramap either
      returns the specied color, or, if oscreen is environment is on, returns the environment color
      for that ray direction.

      Comment


      • #4
        Wouldn't Maya's projection node work? Just pipe an image into the projection node, choose the camera, attach to s surface shader and apply material. I've done this before.

        Andrew

        Comment


        • #5
          Originally posted by aweidenhammer View Post
          Wouldn't Maya's projection node work? Just pipe an image into the projection node, choose the camera, attach to s surface shader and apply material. I've done this before.

          Andrew
          No, because as I explain in the above post, this produces incorrect reflections:

          Notice how the left image, which uses mib lookup background looks incorrect. It looks transparent rather than reflective. What is the cause of this?
          Imagine we are rendering pixel coordinate 200,200 which lies on the sphere. An eye ray is sent that hits the sphere. This hit point is indeed on the 200,200 pixel coordinate. But the ray
          continues as a reflection ray to hit the ground plane.

          This new point (on the ground plane) is not the same as the pixel being rendered, it is somewhere else in the model. Yet mib lookup background only concerns itself with the current pixel (200,200) and will return the color at that point from the map. Conversely, mip cameramap actually converts this new point to a new set of raster coordinates (e.g. 129,145) and will look up the map at that new position, creating the correct appearance in the reflection.

          Comment


          • #6
            Originally posted by sharktacos View Post
            Notice how the left image, which uses mib lookup background looks incorrect. It looks transparent rather than reflective. What is the cause of this?
            Imagine we are rendering pixel coordinate 200,200 which lies on the sphere. An eye ray is sent that hits the sphere. This hit point is indeed on the 200,200 pixel coordinate. But the ray
            continues as a reflection ray to hit the ground plane.

            This new point (on the ground plane) is not the same as the pixel being rendered, it is somewhere else in the model. Yet mib lookup background only concerns itself with the current pixel (200,200) and will return the color at that point from the map.
            This is *not* how the V-Ray implementation of the projection node works (I'm pretty sure it's not how the Maya implementation works either).

            Conversely, mip cameramap actually converts this new point to a new set of raster coordinates (e.g. 129,145) and will look up the map at that new position, creating the correct appearance in the reflection.
            This is exactly how the V-Ray implementation works (and the Maya software renderer too, as far as I can tell).

            Best regards,
            Vlado
            I only act like I know everything, Rogers.

            Comment


            • #7
              Originally posted by vlado View Post
              This is exactly how the V-Ray implementation works
              Vlado
              Neat. Thanks!

              Comment

              Working...
              X