Announcement

Collapse
No announcement yet.

(Fixed)(Fixed)(Fixed)[HOU-2781][HOU-2904][HOU-3637] OSL Textures and Shader Differences with Maya and Houdini

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

  • (Fixed)(Fixed)(Fixed)[HOU-2781][HOU-2904][HOU-3637] OSL Textures and Shader Differences with Maya and Houdini

    Hi All,

    I am finding various OSL textures that I have used over the years in vray for maya do not evaluate in Houdini as expected. I've tried current nightly builds and the older production builds.
    There are different behaviors depending on the vray for Houdini build but so far none that I have tested is working as expected nor matches the result I get in Maya .

    For example, In Maya I am testing this parallax shader jiWindowBox. This has worked great in Vray for maya and its a simple setup.
    Click image for larger version  Name:	oslMayaWorkingNetwork3.JPG Views:	39 Size:	184.7 KB ID:	1129525

    Here is the result.
    Click image for larger version  Name:	oslMayaWorkingRender.JPG Views:	35 Size:	25.7 KB ID:	1129527


    In Houdini I was originally testing using the older production release from June.

    V-Ray for Houdini hash:fb365cd from 16 Jun 2021 11:46
    V-Ray Core 5.10.20 [5322b47e] from 4 Jun 2021
    Windows 10.
    Houdini 18.5.499

    Below are my findings with that setup.

    When using a vrayTexOSL node I can path to the same file and the parameter interface updates as expected.
    Click image for larger version  Name:	oslHoudiniWorkingNetwork2.JPG Views:	34 Size:	80.7 KB ID:	1129526

    But now when attempting to render with the material applied to a simple grid with uvs (tested packed and unpacked geo), the OSL texture is ignored and its applying to texture as if going directly to the self illumination parameter.

    Here is the result.
    Click image for larger version  Name:	oslHoudiniNonWorkingRender.JPG Views:	35 Size:	31.9 KB ID:	1129524




    Knowing there are many bugs that have been solved in the newer nightly builds I tried a few using the same Houdini version and newer versions of Houdini.

    For example using the latest nightly from 11/5 for 18.5.499 and 18.5.596 I am seeing that the OSL Texture and OSL Materials no longer update when using Inline Code or a file on disk.
    The network looks like this and the parameters no longer update at all.

    Click image for larger version  Name:	oslHoudiniNonWorkingNetwork.JPG Views:	48 Size:	38.7 KB ID:	1129523


    I am not seeing any error messages at all. But at this point I am stuck going back to using Maya for this kind of setup

    For testing purposes this is the free version of the jiWindowbox.osl to attempt to replicate.
    https://github.com/julsVFX/osl/tree/main/jiWindowBox


    Note this is also happening for me when using the vray thinfilm OSL example from the Chaos site.



    To Clarify, In older builds the OSL texture/shaders are not evaluating as expected but the parameter interface does update. In newer builds it no longer builds the parameter interface at all.

    Is there an extra step I am missing here to get this to work in vray for houdini?


    Thanks & Regards,
    David Eschrich
    CG Technical Supervisor
    Zoic Studios.
    Last edited by chakarov; 27-01-2022, 08:27 AM.

  • #2
    Hello daeschri , can you send me your example scenes, because with the osl/oso files in the git you shared I can't get anything similar to your screenshots.
    georgy.chakarov@chaosgroup.com
    or
    support@chaosgroup.com
    Georgy Chakarov | QA
    www.chaosgroup.com
    georgy.chakarov@chaosgroup.com

    Comment


    • #3
      Hi Georgy.

      I'll put together both the Maya and Houdini scenes to send to you via email shortly.

      Thanks.

      Comment


      • #4
        You should have the files now. Hopefully it's as simple as user error.

        Comment


        • #5
          Hello daeschri ,
          just checked it, seems that the problem is caused by "uv" attribute used in ImageFile UV tab. If you remove the name of the attribute / empty parm /, the OSL texture is rendered as expected.

          Click image for larger version  Name:	solution.png Views:	0 Size:	428.5 KB ID:	1129882
          Georgy Chakarov | QA
          www.chaosgroup.com
          georgy.chakarov@chaosgroup.com

          Comment


          • #6
            Thanks Georgy,

            When testing with a recent nightly from Oct23rd I still cannot get any response with this at all. The parameter interface still doesn't update as in my above screen shot with the question mark.

            When testing this using 18.5.499 and a the latest production build from June its working for a single material when the text uv is removed from the imageFile node just like you mentioned.

            Does it work for you on the latest builds? On both home setups and studio setups the newest builds of vray are not building the parameter interface whereas the older one from June is.


            Also, when testing using 18.5.499 and the the latest production vray build from June there are still huge issues with how vray is handling the data.
            For example if there is more than one OSL texture being used across multiple material network setups vray is ignoring the other OSL textures and keeps using the same one OSL texture for every shader.

            I'll email you the scene that demoes the behavior.

            Below is a screen shot showing two unique materials each with a unique texture input into the OSL texture. They are applied to two separate objects.


            Click image for larger version

Name:	setup and materials.JPG
Views:	404
Size:	50.8 KB
ID:	1130240
            Click image for larger version

Name:	textures and materials.JPG
Views:	418
Size:	106.5 KB
ID:	1130241

            But when its rendered vray is using only one OSL texture to both the objects.

            Click image for larger version

Name:	two_renders.JPG
Views:	440
Size:	67.3 KB
ID:	1130239

            To solve for this I have to make a primitive string attribute equal to the file path of the textures I want and then call that attribute in the file path of the imageFile node.
            Click image for larger version

Name:	texturePath.JPG
Views:	406
Size:	26.3 KB
ID:	1130242

            Then I can get a working result where I have unique textures being rendered.
            Click image for larger version

Name:	two_renders_working.JPG
Views:	398
Size:	66.5 KB
ID:	1130243

            But vray is still technically reading data from only one OSL_Texture in this setup and this solution does not work for our production needs.

            We need the ability to have multiplt OSL_Textures into multiple materials.

            Please let me know what you find.

            Thanks again for looking in to this.



            David Eschrich
            CG Technical Supervisor
            Zoic Studios
            .

            Comment


            • #7
              Hi Georgy,

              Have you had a chance to look into this yet?



              David Eschrich
              CG Technical Supervisor
              Zoic Studios

              Comment


              • #8
                Did you try latest build, I think it is fixed there.
                Georgy Chakarov | QA
                www.chaosgroup.com
                georgy.chakarov@chaosgroup.com

                Comment


                • #9
                  Hi Georgy,

                  I can confirm that in the build from last night the OSL Texture node now creates the parameter interface when provided an OSL file or inline code.

                  We can now apply multiple materials with multiple OSL setups and they evaluate when using multiple material sops. So my issue described above is resolved as that only occurred with more than one material sop.


                  But there is an odd behavior that is still present.

                  If I try to use more than one output from the same OSL_Texture only one of the output parameters will be evaluated.

                  At this point in testing if I take the out_Alpha and out_RGB to use in a shader, the out_RGB will be evaluated as black while the out_Alpha still works.

                  To get around this I have to use two OSL_Textures, one to use for out_RGB and another for out_Alpha. Only then can I plug both into my shader and get the desired outcome.


                  See below, this is the only way for me to get both out_Alpha and out_RGB to work in a shader.
                  Click image for larger version

Name:	working.JPG
Views:	372
Size:	52.3 KB
ID:	1131173
                  If I tried to use this with one OSL texture this is the result:
                  Click image for larger version

Name:	notworking.JPG
Views:	329
Size:	40.0 KB
ID:	1131174
                  But the Aplha is still accurately evaluated as seen below, so its just the color that is not being evaluated when you have both outputs from the same OSL texture in this case.
                  Click image for larger version

Name:	alpha.JPG
Views:	333
Size:	9.6 KB
ID:	1131175



                  Additionally when using the OSL_Texture we have the ability to change the float parameter for Window Aspect. This is needed to ensure the correct perspective for different shaped windows.
                  This works fine when using the parameter interface on the OSL Texture but if I use a vray float node for the input instead or a vray user float node that calls a float attribute, the texture no longer evaluates correctly.

                  See below.

                  Click image for larger version

Name:	aspect ratio.JPG
Views:	329
Size:	68.3 KB
ID:	1131176





                  David




                  Comment


                  • #10
                    Hello daeschri , in my test scene I can't reproduce the behavior were rgb output is not rendered when used along with alpha one. Can you share your Houdini and V-Ray builds numbers, also a hip file will help a lot.

                    Click image for larger version  Name:	houdinifx_bxugZpiHj3.png Views:	0 Size:	321.4 KB ID:	1132056
                    Georgy Chakarov | QA
                    www.chaosgroup.com
                    georgy.chakarov@chaosgroup.com

                    Comment


                    • #11
                      Hi Georgy,


                      I know this is a very late response. In the new production release of V-Ray 5, Update 2 with Houdini 19.0.455 most of the issues I was experiencing are now resolved.

                      The only thing still outstanding is when using either a vray float or user float that is input into any of the inputs expecting float values, the OSL texture no longer evaluates correctly.

                      I'm sending you a hip to demo the issue but these screen shots show the behavior that is happening.

                      For example, in the below screenshot if I disable the float node and use the value of 1 in the parameter for windowAspect of the OSL Texture everything works as expected. Please focus on the room with the lights on.
                      Click image for larger version

Name:	osl_works.JPG
Views:	327
Size:	221.5 KB
ID:	1135847

                      In the below screenshot if I enable the vray float node with the same value of 1 and it is input into the same windowAspect parameter, the texture is now broken.

                      Click image for larger version

Name:	osl_float_broken.JPG
Views:	288
Size:	202.6 KB
ID:	1135848


                      These two images should look the same with the same value of 1 being used in the same parameter.


                      Our ultimate goal is to have a primitive attribute that equals the windows aspect ratio for each window based on the geo dimensions and then have this user float attribute connect to the windowAspect of the OSL texture.
                      At the moment just using a vray float node with a value of 1.0 breaks the setup without using any attributes.


                      David Eschrich
                      CG Technical Supervisor
                      Zoic Studios


                      Comment


                      • #12
                        Hello daeschri I've reproduced and reported the problem, hope it will be fixed soon.
                        Georgy Chakarov | QA
                        www.chaosgroup.com
                        georgy.chakarov@chaosgroup.com

                        Comment


                        • #13
                          Thanks Georgy!

                          Comment


                          • #14
                            Hi Georgy,

                            Any update on this one?

                            Comment


                            • #15
                              Hi daeschri , the issue with values set via userFloat or userColor is fixed in latest builds.
                              Georgy Chakarov | QA
                              www.chaosgroup.com
                              georgy.chakarov@chaosgroup.com

                              Comment

                              Working...
                              X