Cone-shaped emitter #1225
-
Dear All, I'm trying to model a physics process where Cherenkov light is emitter. As a crude first approximation, I would like to experiment with a cone-shaped kind of illumination, and my intention was to use the "spot" emitter with minimum and maximum angles. I could find a reliable way to set this either in the XML code for the scene, or in the Python dictionary afterwards. Any hint or suggestions will be appreciated. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
The |
Beta Was this translation helpful? Give feedback.
-
@njroussel Thank you! I've looked through the documentation a few times, and there is no example of setting the cutoff_angle in XML. Intuitively, this should be done withing the "rgb" tag just like the intensity, but this produces an error. I've tried a few other things but none works. Is there an example or a template of how to set this? If I were to do this in Python, will the load from dictionary procedure yield an emitter? Can it then be used to update the scene? Thank you! |
Beta Was this translation helpful? Give feedback.
-
Thank you! It works great. |
Beta Was this translation helpful? Give feedback.
-
@njroussel Thanks much. Very helpful. |
Beta Was this translation helpful? Give feedback.
The
cutoff_angle
is just a float parameter:In Python,
mi.load_dict({'type': 'spot', ... })
will indeed return anEmitter
object. However, it cannot be inserted into a scene. The only edits to a scene that can be done is modifying plugin parameters (marked with a "P", as mentioned in my previous comment)