question

Alan Jones avatar image
Alan Jones asked ·

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.

arnoldnodes
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Stephen Blair avatar image
Stephen Blair answered ·

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.

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Stephen Blair avatar image
Stephen Blair answered ·

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


2 comments Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

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

0 Likes 0 · ·

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?

0 Likes 0 · ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Welcome to the Arnold Answers community.

This is the place for Arnold renderer users everywhere to ask and answer rendering questions, and share knowledge about using Arnold, Arnold plugins, workflows and developing tools with Arnold.

If you are a new user to Arnold Answers, please first check out our FAQ and User Guide for more information.

When posting questions, please be sure to select the appropriate Space for your Arnold plugin and include the plugin version you are using.

Please include images, scene and log files whenever possible as this helps the community answer your questions.

Instructions for generating full verbosity log files are available for MtoA, MaxtoA, C4DtoA, HtoA, KtoA, and Kick.

If you are looking for Arnold Documentation and Support please visit the Arnold Support site.

To try Arnold please visit the Arnold Trial page.

Bottom No panel present for this section.