question

James Robinson avatar image
James Robinson asked ·

HtoA Mesh Lights Broken

Trying to use a mesh light produces the following error:

Fails even in the most basic of test scenes.

Error 
Failed to save output to file "Traceback (most recent call last):
File "[HOUDINI_INSTALL_DIRECTORY]plugins/houdini-17.0.459/htoa/htoa-3.2.2_rdc1beed_arnold-5.2.2.1/soho/arnold.py", line 78, in 
HaSession.getSession().run()
File "[HOUDINI_INSTALL_DIRECTORY]plugins/houdini-17.0.459/htoa/htoa-3.2.2_rdc1beed_arnold-5.2.2.1/scripts/python/htoa/session.py", line 497, in run
hook(arg_dict)
File "[HOUDINI_INSTALL_DIRECTORY]plugins/houdini-17.0.459/htoa/htoa-3.2.2_rdc1beed_arnold-5.2.2.1/scripts/python/htoa/object/light.py", line 41, in linkMeshHook
log.error('Expected exactly one mesh in %s for mesh light %s' % (obj_path, AiNodeGetName(arg_dict['mesh_light'])))
NameError: global name 'obj_path' is not defined
".

Fails even in the most basic of test scenes.

Using Houdini 17.0.459 Arnold 5.2.2.1 htoa-3.2.2.

lighterror
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.

rachid Hadj Abderrahmane avatar image
rachid Hadj Abderrahmane answered ·

work fine here
just put a start "*" in candidate object (arnold ropnet)

1 comment 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.

Hi Rachid,

Adding a wildcard in the candidate objects does indeed fix it, but that's not really ideal since really never use candidate objects, and don't want to make everything in a scene potentially renderable. You got me on the right track though, I got it working below. Thanks!!

0 Likes 0 · ·
Julian Hodgson avatar image
Julian Hodgson answered ·

Thanks, I'll look into this. By the way the error when no mesh light is found should be fixes in HtoA 3.3.0.

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.

James Robinson avatar image
James Robinson answered ·

Ok I got it working.

I guess you have to have the geometry object also forced on the Arnold ROP. Since this will render both the light, and the geometry source, it is necessary to go to the object's Arnold tab > visibility > and make sure the object is invisible to camera rays.

I looked over the docs again, and I think this could really be worth mentioning in the HtoA documentation on mesh lights, as with mantra this is handled by default without having to force the geo on.

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.

James Robinson avatar image
James Robinson answered ·

mesh-light-example.tar.gzHi Stephen,

Could you explain that again? My test scene is pretty barebones -- Just a torus (light geo), sphere, mesh light, shopnet, camera, and arnold rop. Nothing crazy with the torus mesh that's in the light geo. I'll try and include it here.


3 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.

There's a bug in the HtoA Python code.

The bug triggered only if an invalid object name is used as the mesh for the mesh light.

As Rachid pointed out, the torus was not being exported to Arnold, so the mesh light had no mesh.

Thanks for reporting the bug, I've opened a ticket for that.

1 Like 1 · ·

Actually, this is fixed in HtoA 3.3 and you get the error message (and no Python error):

ERROR   | [htoa.object.light] Expected exactly one mesh in /obj/torus1 for mesh light /obj/LGT_mesh
1 Like 1 · ·

Awesome, thanks a lot, Stephen! I'll ask about getting us on 3.3

0 Likes 0 · ·
Stephen Blair avatar image
Stephen Blair answered ·

I can reproduce, but only if I put an non-mesh object as the mesh for the mesh light (Arnold Light node, Light tab, Mesh box)

The error is from the log.error line. The mesh light still won't work, even after we fix that script error (because you'll still be referencing a non-mesh object)

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.

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.