Forgot password?

Create an account!


« back

RhinoScript – Material conversion challenge


Please log in to write a message.

  • 1. palosanto (Nov 28, 2017 00.30):

    I have several Rhino scenes in vray 2 with dozens of 2d cutout people that were created using the picture frame command. The command makes it very easy to create the figure directly with the aspect ratio of the png image. I use this method rather than creating a vray material for each figure because that means to make a plane, apply the material and adjust the proportions every time.

    When rendering, vray version 2 respects the transparency of the Piicture Frame even though it’s just a Rhino material and not a vray material.
    The problem is that now I’m using vray 3 and it doesn’t support the transparency of picture frames. So for each figure I need to:

    - Create a new material
    - Remove the BRDF layer that comes by default and create a new diffuse layer
    - Choose the png and enable the option “use color texture as transparency”.
    - Create a vertical plane with the same aspect ratio of the png and apply the material.
    Obviously to do this for dozens of 2d figures is a p.i.t.a.
    vray has the command visConvertRhinoMat which would allow me to select all the figures at once and make the conversion to vray material but the problem is that it creates them as BRDF so it doesn’t help because I still need the diffuse layer to be able to turn the transparency on.
    Also the automatically assigned name is “Picture Frame”. So when I select multiple 2d figures and run the command I end up with dozens of materials with similar name “Picture Frame”, “Picture Frame1”, “Picture Frame2”, etc. and I cannot tell which one corresponds to what 2d cutout.

    I’d like to have a script that takes the png filename as the name for the converted vray material, adds a new diffuse layer with the same png file and enables “use color texture as transparency” . Is this possible?


Why are these buttons gray?