Jump to content

Global space translation of the Sun light objects


Green-Man

Recommended Posts

Hi!

 

I have a little problem of getting the world space translation of the Sun light object in the vex light shader.

 

What I'm doing looks like this:

transform("space:light", "space:world", {0,0,0})

This statement should return me the vector I'm looking for. And it returned the correct value at these wonderful happy days of Houdini 12.5.

Now in Houdini 13 it also works well but not for Sun light objects. With a Sun light it returns the world translation of the camera.

 

When checking the transformation matrix in H13 with:

getspace(getlightname(), "space:world")

we can see that the matrix is correct except the translation part.

 

One can say that the Sun light is a kind of a Distant light that represents just a direction not the position. And virtually it's true. The light itself represents the direction. But the object still exists in the IFD with it's fully correct transformation matrix.

By the way I can get this transformation for the actual Distant light. It doesn't work only for Sun light only in Houdini 13.

 

Do you guys have any suggestions about how to solve this problem?

Do you think it is possible to get this world position of the Sun light in the light shader?

 

The scene in the attachment shows the problem. Take a look to the terminal output.

lightspace.hip

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...