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

Creating a custom Shape Node

4 REPLIES 4
Reply
Message 1 of 5
alan-LFL
393 Views, 4 Replies

Creating a custom Shape Node

Hi all,

I'm trying to put together a custom shape node, but can't find an example anywhere.

Even searching the headers there seems to be no EXPORT_METHODS macro (i.e. something like AI_SHAPE_NODE_EXPORT_METHODS akin to the other types).

Anyone happen to have an example, even a plane would be huge (and not just because they're infinite XD).

Cheers,

Alan.

Tags (2)
Labels (2)
4 REPLIES 4
Message 2 of 5
Stephen.Blair
in reply to: alan-LFL

You can't add custom shapes to Arnold, but you can use a procedural to create some combination of nodes in the scene.


There actually is a plane shape already. Just not exposed or used in any of the Arnold plugins.

C:\solidangle\mtoadeploy\2019>bin\kick -nodes | findstr plane
 plane                            shape

C:\solidangle\mtoadeploy\2019>bin\kick -info plane
node:         plane
type:         shape
output:       (null)
parameters:   22
filename:     <built-in>
version:      6.0.0.0

Type          Name                              Default
------------  --------------------------------  --------------------------------
BYTE          visibility                        255
BYTE          sidedness                         255
BOOL          receive_shadows                   true
BOOL          self_shadows                      true
BOOL          invert_normals                    false
FLOAT         ray_bias                          1e-06
MATRIX[]      matrix                            (empty)
ENUM          transform_type                    rotate_about_center
NODE[]        shader                            (empty)
BOOL          opaque                            true
BOOL          matte                             false
BOOL          use_light_group                   false
NODE[]        light_group                       (empty)
BOOL          use_shadow_group                  false
NODE[]        shadow_group                      (empty)
STRING[]      trace_sets                        (empty)
FLOAT         motion_start                      0
FLOAT         motion_end                        1
UINT          id                                0
VECTOR        point                             0, 0, 0
VECTOR        normal                            0, 0, 1
STRING        name




// Stephen Blair
// Arnold Renderer Support
Message 3 of 5
alan-LFL
in reply to: Stephen.Blair

Unfortunately procedurals don't work for my use case (Arnold just hangs).

It's the camera creating nodes during initialization problem, I mentioned. I've just been using a plane for now, but there are sync issues with this (changes to the plane made in node_update aren't respected on that render, but come through on the next.... to be continued

Message 4 of 5
alan-LFL
in reply to: alan-LFL

Calling Update(plane) from in the camera's node_update crashes everything. So far best I've been able to do is set an attribute of type node that I'm not using to point at the camera, which get the sync issues to this state). Custom shape was to fix this as I could make a parameter referencing the camera.

Any thoughts?

Message 5 of 5
Stephen.Blair
in reply to: alan-LFL

What are you doing in the procedural?

A camera node shouldn't be creating nodes, and updating other nodes from a node update is going to cause problems in general.



// Stephen Blair
// Arnold Renderer Support

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

Post to forums  

Autodesk Design & Make Report