Announcement

Collapse
No announcement yet.

Override material not working with refraction

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

  • Override material not working with refraction

    Hi,

    Got a strange one today. The override material oprion is not working with refractions, in this example scenario I have a glass object in front of the boxes and I'm overriding the boxes material with a constant red, but you can see that through the glass I can still see the original material.

    Click image for larger version

Name:	overrideShader.JPG
Views:	238
Size:	80.0 KB
ID:	1082703

    1 - shader paths baked into the alembic file.
    2 - Alembic with no shader paths and material applied after alembic.
    3 - Red shader applied directly to box.

    Example scene attached.

    Best,
    David.
    Attached Files
    David Anastácio // Accenture Song - VFX
    https://www.accenture.com/us-en/serv...visual-effects

  • #2
    Well, this feature was not designed for such cases...

    May be we could think of another approach for what you want to achieve?

    There is a completely new way of assigning materials / texture based on scene_name / user attribute implemented recently.

    You could now use a string pattern matching by user attribute (or scene_name) on packed or polygon to assign materials / textures.
    It'll also work with objects inside Alembic, but only with "name" attribute for now.

    It's implemented as ID generator texture TexPatternID that could be used with MtlMulti or TexMulti.
    V-Ray For Houdini | V-Ray Hydra Delegate | VRayScene
    andrei.izrantcev@chaos.com
    Support Request

    Comment


    • #3
      Originally posted by bdancer View Post
      Well, this feature was not designed for such cases...
      OK, that's odd, so what's the point of giving us override material with a pattern if not for such cases? This is a great feature, and a feature that has a wide range os uses, in this case was to generate masks for something seen through refractions, we can also use this this to simplify shaders of objects used as mattes or fix a shader locally for just a shot. It's great.

      Originally posted by bdancer View Post
      There is a completely new way of assigning materials / texture based on scene_name / user attribute implemented recently.
      I don't think this is gonna help me, I need to retain all original shaders, to the exception of what I want to override. This method forces me to override the original shaders but this muiltiId one and generate new shaders for all objects.
      This is a pretty neat option for other applications, and I'm already thinking on what I can use it.

      Can we have a fix for the override material option, it looks like it's working as expected except in the refractions???

      Best,
      David.
      Last edited by david.anastacio; 01-09-2020, 04:06 AM.
      David Anastácio // Accenture Song - VFX
      https://www.accenture.com/us-en/serv...visual-effects

      Comment


      • #4
        > it looks like it's working as expected except in the refractions???

        And reflections...
        V-Ray For Houdini | V-Ray Hydra Delegate | VRayScene
        andrei.izrantcev@chaos.com
        Support Request

        Comment


        • #5
          I've checked the code and it's actually possible to fix the approach we use for material override for reflection and refraction.
          Will work in the next nightly.
          Last edited by bdancer; 01-09-2020, 05:08 AM.
          V-Ray For Houdini | V-Ray Hydra Delegate | VRayScene
          andrei.izrantcev@chaos.com
          Support Request

          Comment


          • #6
            Originally posted by bdancer View Post
            > it looks like it's working as expected except in the refractions???

            And reflections...
            Of course

            I've checked the code and it's actually possible to fix the approach we use for material override for reflection and refraction.
            Will work in the next nightly.
            Awesome, thanks bdancer.
            David Anastácio // Accenture Song - VFX
            https://www.accenture.com/us-en/serv...visual-effects

            Comment


            • #7
              It's already in the nightlies, did it worked for you?
              V-Ray For Houdini | V-Ray Hydra Delegate | VRayScene
              andrei.izrantcev@chaos.com
              Support Request

              Comment


              • #8
                Thanks for the reminder bdancer.

                This one seems to be nailed, refractions and reflections all working now. Plus added textures to the shaders that are applied to the boxes, and those textures don't get loaded anymore when the shader is overwritten

                Click image for larger version

Name:	Screenshot 2020-09-03 at 23.12.27.png
Views:	168
Size:	90.3 KB
ID:	1083062

                Thanks for the quick fix.
                David.
                David Anastácio // Accenture Song - VFX
                https://www.accenture.com/us-en/serv...visual-effects

                Comment

                Working...
                X