Announcement

Collapse
No announcement yet.

Render To Texture with Projection issue

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

  • Render To Texture with Projection issue

    I'm trying to bake some maps from a high poly door made from separate parts (screws, hinges, door knobs, etc), to a low poly single object (with several elements). The normal maps turn out fine, but all other vray elements show that the item projecting is taking into consideration the item it is baking to in the render calculations. So there's dark spots showing up in the map where the low poly object crosses over the high poly one, even with the cage set properly. I've tried applying an invisible material to the item being projected to, push the cage out to extreme amounts, turn it to not renderable (which makes Max unstable until you restart). I'm at a loss as to how I can fix this.

    Anyone have any tricks to get this to work? Am I missing a toggle somewhere so it ignores the low poly object?

  • #2
    I think I got it figured out. VRayDirt was the culprit. VRayDirt seems to take into consideration any object around it, including those that are being projected to. "consider same object only" or setting up Excludes doesn't work as you think it would; it still considers the object to receive the mapping. But, if you check "work with transparency" and make sure the material assigned to the low poly object being projected to is completely transparent at the time of baking it works.

    Not sure if this would be a bug or not, but if VRayDirt could be updated that it ignores anything with the Projection modifier on it?

    Comment


    • #3
      I am not able to replicate that into our environment, it either works fine or I am not doing something right.
      I created a very simple scene with two spheres, one of them is with noise modifier just to make the VRayDirt texture visible:
      Click image for larger version  Name:	3dsmax_2017-05-25_12-17-17.jpg Views:	1 Size:	170.8 KB ID:	953447
      I baked the sphere without the VRayDirt material with Projection Mapping with source the sphere with VRayDirt texture and I got the following results:

      Dirt disabled:


      Dirt enabled:


      Dirt enabled / consider same object only:


      As you can see the dirt is no longer projected when Consider Same Object is active.

      Here is the scene if you would like to check out:
      http://ftp.chaosgroup.com/support/sc...ion_dirt01.max

      Maybe there is something else in your scene that breaks the proper work of the Dirt map and it would be very helpful if you could provide that scene or at least replicate the issue on the sample scene above.
      Attached Files
      Last edited by svetlozar.draganov; 25-05-2017, 02:34 AM.
      Svetlozar Draganov | Senior Manager 3D Support | contact us
      Chaos & Enscape & Cylindo are now one!

      Comment


      • #4
        Your image of the consider same object only isn't loading. But, I looked at your file, and it still shows it is not working properly. Sometimes I get the same result toggling same object only, other times it works properly and only itself affects VRayDirt. Either way, if the Projection modifier is applied, the sphere with the noise applied (being projected to) should not be affecting the one with the VRayDirt applied to it, whether you have consider same object selected or not. If I want to project the materials of object(s) A onto object B, object B should not affect the lighting, reflections, shadows, etc, of object A baking to object B's UV's. In every case, with Projection applied, your entire UVs should be all filled with red when using a sphere. Unless you add another object into the scene that should affect the VRayDirt applied to object A.

        I moved your VRayDirt to the self illumination slot to show where it is not working, better.

        BakingSphere_noOpacity_incorrect: This is how it renders with the map moved to self illumination, showing that the sphere with noise applied, which is receiving the baked information, is affecting the render. Everything should be red.
        BakingSphere_correct: This is how it is supposed to look if there is no other object in the scene to affect the VRayDirt, and you leave same object only unchecked. Since a sphere has no occlusions, it is all red. (Sphere with noise is 100% transparent to make it work.)
        BakingSphere_cylPenetrate_correct: Add a cylinder to the scene overlapping the sphere. This should affect VRayDirt, and it does here. Everything else is still red, as it should be. (Sphere with noise is 100% transparent to make it work.)

        I'll also send you guys a slimmed down file to what I'm baking to support@chaosgroup.com. It'll make more sense for the usage scenario. I'm using VRayDirst for grunge in cavities, and inverted normal checked for masking edges for scrapes and chips.

        Comment


        • #5
          I managed to replicate the issue on the scene you sent me and I'll report it as s bug into our system.
          Will let you know when we have progress on the subject.
          Svetlozar Draganov | Senior Manager 3D Support | contact us
          Chaos & Enscape & Cylindo are now one!

          Comment


          • #6
            Look like I replied too fast, the issue has nothing to do with the V-Ray Dirt material and I can confirm that Consider Same Object option works just fine.
            This is how the bake looks like when Consider Same Object is disabled:
            Click image for larger version  Name:	3dsmax_2017-05-31_16-51-57.jpg Views:	1 Size:	203.3 KB ID:	954180

            .. and here how it looks like when it is enabled:
            Click image for larger version  Name:	2017-05-31_16-54-35.jpg Views:	1 Size:	208.6 KB ID:	954181

            As you can see the Dirt(green color) on the second image is not influenced by the low-poly geometry as it was on the first image.

            The real issue here is that V-Ray doesn't make the geometry being projected onto invisible for the camera and V-Ray sees it and render it.
            I'm not sure how 3dsMax native render handles this case but I suspect that they automatically make the geometry invisible when Projection is enabled and only render the geometry being projected from.
            Svetlozar Draganov | Senior Manager 3D Support | contact us
            Chaos & Enscape & Cylindo are now one!

            Comment


            • #7
              Actually it doesn't work with MentalRay as well, so it might be a option that should be user-configured.
              Do you know a render engine that renders such scenes properly?
              Last edited by svetlozar.draganov; 31-05-2017, 07:56 AM.
              Svetlozar Draganov | Senior Manager 3D Support | contact us
              Chaos & Enscape & Cylindo are now one!

              Comment


              • #8
                If I recall, scanline does it properly, but I haven't used scanline in ages for any scene setup to verify. I'm now wondering how everyone else is baking their VRay (and I guess Mental Ray) scenes to low poly without these artifacts? If they are using the same workaround as I am by making the low poly object invisible, or if there's some toggle somewhere that happens to make it work properly?

                Comment

                Working...
                X