question

Jay Dunstall avatar image
Jay Dunstall asked ·

Instancing Lights in HtoA 6.0.3.0

Hi all,

In the change log of 6.0.3.0 it mentions a new instancer procedural has been added - which works for lights. This is something that would be helpful on my current project, can anyone explain the workflow for this as I'm unable to work it out?

Many Thanks.


New instancer procedural: A new instancer procedural node has been added to create instances of shapes and lights. (#7901)The nodes to instance are defined by the nodes and optionally node_idxs parameters. Per instance transformation, visibility and shaders can be specified via the instance_matrix, instance_visibility and instance_shader parameters. Any other per instance parameter (builtin or user parameters) can be specified via array type user parameters prefixed as instance_, for example:


lighthtoa arnold houdiniinstances
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.

Madivadanatamilparidy Ramamoorthy avatar image
Madivadanatamilparidy Ramamoorthy answered ·

You can write a simple python script to create number of Arnold lights and get position data from points.

This is a very simple 10 min code, I'm new to python. But this works.

Add a new tool to shelf and copy this script to the script tab.

And make sure you select object node(with points) you want to copy lights before executing this script.

a = hou.selectedNodes()
b = a[0].displayNode()

pts = b.geometry().points()

for pt in pts:
    x=pt.position()[0]
    y=pt.position()[1]
    z=pt.position()[2]
    light = hou.node("obj/").createNode("arnold_light")
    light.parm("tx").set(x)
    light.parm("ty").set(y)
    light.parm("tz").set(z)


2 comments
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.

Hey @Madivadanatamilparidy Ramamoorthy. Thanks for replying, I'll save a copy of this. However this is different to what I'm after - I'm looking to instance lights instead of copying to save on some memory overhead.

Found a solution for this involving Solaris. As you can instance lights in Arnold/Solaris, you can create the instances there then write them out as a .USD file. And then you can load in the .USD into an Arnold Procedural node at SOP level. Bit of an annoying workaround, but it works atleast.

Thanks.

1 Like 1 ·

Hi Jay!
SOP or OBJ?
If I correct understand, first you create light instancing in LOP, after that you write it to usda and load to Arnold procedural node in obj, correct?

0 Likes 0 ·
Slava Sych avatar image
Slava Sych answered ·

I suppose this is only for USD and ASS

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.

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.