CTRL-Click Point Light Makes Me Look Through It?

   3018   4   1
User Avatar
Member
24 posts
Joined: 2月 2012
Offline
Hello All,

I open up Houdini Apprentice to the empty scene. I CTRL-Click to add a point light and for some reason it becomes a camera that I am looking through. Also it does not appear at world origin alike all other objects that I CTRL-Click to create.

This seems like a workflow disconnect.

Is there a way to create a point light at world origin with one mouse click? Or do I have to just click on point light, move my mouse into the 3D view, press ENTER.
User Avatar
Member
250 posts
Joined: 2月 2013
Offline
Hey,

It doesn't become a “camera”, but you are just looking through the point light you created, it can be useful to place your light this way sometimes.

But if it works when pressing enter why do you want it to works with ctrl ? I know that it works with geometry but you don't place your geometry like you place a light. So it's better to have this for the light, it's quicker when you are where you want to put the light instead of putting the light at the origin, and then “look through light” and then go back to the place you want it to be.

Or you can manually set the light transform to 0.

EDIT : or, or : it hasn't always been like this, but I only started with Houdini 11.
https://vimeo.com/obreadytom [vimeo.com]
User Avatar
Member
4189 posts
Joined: 6月 2012
Offline
You can create a light with less than one mouse click.

Tab key - type “li” for light -> enter key- enter key
User Avatar
スタッフ
2540 posts
Joined: 7月 2005
Offline
Houdini has had this feature for a number of years where you quickly set your view for the light and ctrl-click to add the light with this view.

The Ctrl modifier is the “optional” modifier on tools and for lights and cameras, this option will inherit the current view as the Camera and Light orientation and view. This is a unique behaviour consistent for cams and lights which is different than that for ctrl to immediate add objects.

Given that this is a tool on the shelf, you can RMB on the tool and choose Edit Tool… to edit the Python script to do what you want.

If you wanted to change the behaviour of the spot light, you could comment out the two lines calling the genericCameraLightTool function and replace with the more simple genericTool function that objects use:


import objecttoolutils

kwargs = hou.Vector3(-1.5, -1.5, -1.5)
kwargs = hou.Vector3(1.5, 1.5, 1.5)
#newnode = objecttoolutils.genericCameraLightTool(kwargs, ‘hlight’,
# ‘spotlight1’, (not kwargs and not kwargs))
newnode = objecttoolutils.genericTool(kwargs, ‘hlight’)
newnode.parm(“coneenable”).set(1)


or if you wanted to still allow the ctrl click to keep the standard Houdini “inherit view” and a Shift-Click to place the spotlight in this case or in general any light or cam immediately, you could use this for the spotlight tool:


import objecttoolutils

kwargs = hou.Vector3(-1.5, -1.5, -1.5)
kwargs = hou.Vector3(1.5, 1.5, 1.5)

if kwargs is True:
newnode = objecttoolutils.genericTool(kwargs, ‘hlight’,
clicktoplace = False)
else:
newnode = objecttoolutils.genericCameraLightTool(kwargs, ‘hlight’,
‘spotlight1’, (not kwargs and not kwargs))
newnode.parm(“coneenable”).set(1)


Up to you how you want to do it.

The available modifier keys are:
Ctrl
Shift
Alt
Command (on Mac and generally defaults to Ctrl)
or any combination of the above.
There's at least one school like the old school!
User Avatar
Member
24 posts
Joined: 2月 2012
Offline
Thanks for the explanation. After I posted this I did make the connection that lights and cameras are on the same tool shelf so it does make some sense.
  • Quick Links