Announcement

Collapse
No announcement yet.

Creating renderElement in python scene access

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

  • Creating renderElement in python scene access

    Hi,

    Is it possible to create renderElements with the python scene access. I know how to create lightSelects and multimattes, but how do I create elements like specular, diffuse, relfection etc.

    I have tried creating the channel with: specChannel = create('RenderChannelColor', 'specChannel')

    How do I set the channel to ex. specular?

    --
    Jacob
    Jacob Børsting
    Head of Pipeline @ Ghost VFX

  • #2
    Hi,
    I will try to explain my workflow when i work with python scene access :
    Example : i want to create a specular renderElement in python scene access.

    1) I create a empty scene, and create a specular renderElement in Maya.
    2) In the Translator Options tab, i disable "render", and enable "Export to a .vrscene file". I set the file name, where i want to export the vrscene.
    3) I click on render.
    4) Now, i open the exported vrscene with a text editor.
    5) You will see your previous specular renderElement in the vrscene.
    6) Just copy the type, the name.
    For example, for the output plugin, we will have :
    Code:
    SettingsOutput vraySettingsOutput {
      img_width=450;
      img_height=337;
      img_pixelAspect=1;
      img_file="tmp/untitled.png";
    The type of the plugin here is "SettingsOutput", the name is "vraySettingsOutput".
    Found your previous specular renderElement plugin in the vrscene
    7) Create it : create(pluginType, pluginName), in your python script.

    Done.
    Last edited by bigbossfr; 20-03-2013, 06:32 AM.
    www.deex.info

    Comment


    • #3
      Thanks alot bigboss. That approach makes it pretty simple to figure out how to create the different channels.

      --
      Jacob
      Jacob Børsting
      Head of Pipeline @ Ghost VFX

      Comment


      • #4
        Originally posted by jbvfx View Post
        How do I set the channel to ex. specular?
        You need to set the "alias" parameter of the channel to something that V-Ray understands. As bigbossfr suggested, you can look at existing .vrscene files to figure out the correct numbers. They are also defined in the pixelbuffer.h file from the V-Ray SDK.

        Best regards,
        Vlado
        I only act like I know everything, Rogers.

        Comment

        Working...
        X