Community
Arnold General Rendering Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Where can I find some examples about procedural_viewport, the new function of Procedrual API, please?

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
Anonymous
347 Views, 4 Replies

Where can I find some examples about procedural_viewport, the new function of Procedrual API, please?

Where can I find some examples about procedural_viewport, the new function of Procedrual API, please?

Tags (1)
Labels (1)
4 REPLIES 4
Message 2 of 5
adrien.herubel
in reply to: Anonymous

We currently don't have public examples of this new API, but here is a short sample showing how to use it to create a bounding box viewport representation in a 3rd party procedural. This viewport representation should be displayed automatically in the DCC viewport, once the procedural is added in the scene.


procedural_viewport
{
    if (mode == AI_PROC_BOXES)
    {
      AtNode* bbox_node = AiNode(universe, "box", "bbox0");
      AiNodeSetVec(bbox_node, "min", -5, -5, -5);
      AiNodeSetVec(bbox_node, "max", 5, 5, 5);
    }
   return AI_SUCCESS;
}


Message 3 of 5
Anonymous
in reply to: adrien.herubel

Thank you Adrien, I guess this function only works in viewport of Arnold mode, instead of VP2, in Maya.

Message 4 of 5
adrien.herubel
in reply to: Anonymous

In the Arnold viewport, nothing is needed to display procedurals as they are part of the Arnold scene. The procedural_viewport API is needed to display the procedural in the DCC's own viewport, for example VP2 in Maya.

Message 5 of 5
Anonymous
in reply to: Anonymous

Hi, @Adrien Herubel. I met a problem when trying a simple procedural with the example of drawing code your posted. After creating the procedural node from Arnold->custom procedrual successfully, I got nothing in Maya's viewport (vp2.0). Should some parameters or options be set or turned on for drawing? Thanks.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators