question

Rodney Holland avatar image
Rodney Holland asked ·

Moving Light Source with scripts

What I am trying to do is get the light source we have in max to move behind a camera with scripting. In the past we have done this in mental ray by the following:

--move the light

campt = c.pos

campt.x = campt.x*10

campt.y = campt.y*7.5

ldist = sqrt((campt.y^2) + (campt.x^2))

elfact = (ldist/7500)*6

campt.z = ldist

$Daylight001.Controller.manual_position.position = campt

But I have not been successful with moving the light source in Arnold. The script stop at this spot and will not process anything else. We need the light to move so we can get the sun behind the camera and shadows going away from us.

light3ds maxscriptshadowslight group
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.

Rodney Holland avatar image
Rodney Holland answered ·

Yes, this is in max before rendering. We have a template set up that has multiple cameras where the Arnold light is set up behind them. We are trying to get Arnold light to follow behind a camera that used to set a manual view. If you need the whole script we can provide, or the script that was already provided to us that didn't work.

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 ·

This is all happening in 3ds Max before rendering, right? So it's not about Arnold, it's about what you can do in 3ds Max before you click Render.

Arnold (MAXtoA) only reads the 3ds Max scene when you click render.


Or are you able to move the light, but then the render doesn't show it in the right place?



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.