Announcement

Collapse
No announcement yet.

OSL -> standalone export: User properties not working

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

  • OSL -> standalone export: User properties not working

    Hi,
    I have another problem with max osl to standalone export (please also have a(nother) look at this thread which I updated with more problems: https://forums.chaosgroup.com/forum/...-render-result ) .
    Here I'm trying to use the OSL version of the VrayUserColor node. It renders fine in max but turns out gray (the default) in VrayStandanlone. Please have a look at the files below (userprops_vray_bugreport.zip + screenshot).

    Max: V-Ray Next, update 2.1 (4.20.01.29465)
    Standalone: Build 29466 from Sep 3 2019, 02:22:04

    Also, I uploaded a "mtlID_based_objProp_OSL_bonus_02.zip" which contains a modified OSL node that is combining material IDs and user properties. It would be great if you could test that this works as well when you solve the issue, would greatly reduce turnover times if it doesn't. Thanks!

    [edit: replaced the bonus.zip]
    Attached Files
    Last edited by racoonart; 09-09-2019, 03:43 AM.

  • #2
    Hello,

    If you take a close look at the OSL shader source code you will see that when the "User Defined Property" checkbox is checked the code adds a "usr_" in front of the user property that you have chosen (That way it finds your user property in 3ds Max itself). If you uncheck that checkbox you will get the correct result in standalone.
    Click image for larger version

Name:	user_prop.png
Views:	203
Size:	210.1 KB
ID:	1047854

    As for the one with the mtlIDs I changed the code a little bit, so it adds the "mtlID_" regardless of the fact if the checkbox is checked. And again it must be unchecked for the standalone version to work. (I have attached the scene with the edited code.)

    Best regards,
    Kiril Kostov
    Attached Files

    Comment


    • #3
      Originally posted by kiril.kostov View Post
      Hello,
      If you take a close look at the OSL shader source code you will see that when the "User Defined Property" checkbox is checked the code adds a "usr_" in front of the user property that you have chosen (That way it finds your user property in 3ds Max itself). If you uncheck that checkbox you will get the correct result in standalone.
      Yes but that's exactly the issue and purpose of this bug report. If I have it activated it only works in max... if I have it deactivated it only works in standalone. It never works in both. I need it to work identically in both applications, otherwise the whole export process and standalone workflow is pointless (It would consequently also fail in the vray cloud of course).

      Originally posted by kiril.kostov View Post
      As for the one with the mtlIDs I changed the code a little bit, so it adds the "mtlID_" regardless of the fact if the checkbox is checked. And again it must be unchecked for the standalone version to work. (I have attached the scene with the edited code.)
      Oh, yes, I should have made it more clear, sorry. I know it wouldn't have worked with the checkbox off. I basically ignored the whole "usr_prefix" thing checkbox in this case all together since I assumed the fix was going to be to make standalone understand the "usr_" prefix. So basically, the checkbox would have had to be on in any case.
      Last edited by racoonart; 11-09-2019, 12:21 PM.

      Comment


      • #4
        Any news on this? Sorry to be so impatient but a current project is dependent on those OSL fixes and I'm slowly running out of time

        Comment


        • #5
          Hello,

          You can expect the fix to be in the next nightly. You have several other issues that you want to be looked at and all of them seem urgent. If you want you can contact me directly at kiril.kostov@chaosgroup.com and tell me in what order do you need them.

          Best regards,
          Kiril Kostov

          Comment


          • #6
            Awesome! Thanks! Sent you a mail

            Comment

            Working...