Announcement

Collapse
No announcement yet.

Front/Back Map?

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

  • Front/Back Map?

    Is there some map that will give me black and white for front or back faces (e.g. White for front faces black for back faces) or similar?

    I would like to use with with a VRayExtraTex render element, so a map is idea. I could render a separate pass if I had to, but was trying to do it in one.

    Thanks in advance.

  • #2
    By back faces, do you mean flipped faces or faces facing away from the camera?

    If you mean flipped - you can use a VRay2SidedMtl and bake the result onto a texture.
    If you mean facing away - a Solid Gradient Ramp mapped with a Falloff (Towards/Away)
    Last edited by hermit.crab; 07-02-2023, 01:37 AM.
    Aleksandar Hadzhiev | chaos.com
    Chaos Support Representative | contact us

    Comment


    • #3
      Originally posted by hermit.crab View Post
      By back faces, do you mean flipped faces or faces facing away from the camera?
      I mean backfaces in the old school sense of the back side of a polygon. So every polygon has a normal facing a certain direction, and the backface would be the opposite side from the normal.

      Basically I just want a different map for side A and side B of the polygons.

      I ended up solving it with an additional pass with a VRay2SidedMtl set to do VRayColors. But would still like to know if there is an easy way to get that with a map.

      Not sure how VRay would handle it, but back in the LightWave days you would duplicate your polys and flip them so you had a copy facing each way. It shaded free of artifacts because the coplanar polys were identical except for their normals (and because LIghtWave was designed to work like this). I wonder can VRay shade such things without issues? I suppose it could. And then each side could have its own material ID I suppose. But in my case I already have a bunch of polys with different IDs. Maybe an ID offset...

      Comment


      • #4
        You can use a standard 2-sided material...maybe similar to a Vray2sided but simpler at least.
        https://www.behance.net/bartgelin

        Comment


        • #5
          Originally posted by fixeighted View Post
          You can use a standard 2-sided material...maybe similar to a Vray2sided but simpler at least.
          Good call. Still doesn't give me a map, though (and the VRay2SidedMtl rendered fast with solid colors and no translucency).

          Comment


          • #6
            Check my edited post (didn't refresh, sorry).
            Aleksandar Hadzhiev | chaos.com
            Chaos Support Representative | contact us

            Comment


            • #7
              Originally posted by hermit.crab View Post
              Check my edited post (didn't refresh, sorry).
              Ah, baking the VRay2sidedMtl is a good idea! I think that would actually do it. Thanks.

              Comment


              • #8
                I usually use this simple OSL map - https://github.com/gkmotu/OSL-Shader.../FrontBack.osl

                Comment


                • #9
                  Excellent. I was looking through the included OSL files, but didn’t do a web search. Also, OSL is pretty simple code sometimes. That is sweet. Thanks.

                  Comment

                  Working...
                  X