Hi.
I am a newbie at Octane scripting and need to know if there are any good references to do the following:
I have a camera and I am putting a camera flash at some distance behind it, so that I get those distinctive hairline cast shadows. My problem is that a camera has a position and a target in world space to direct the view of the camera, but my little flash cube only has a position, also in world space. There is no way to move the flash with the camera simply by moving the camera and letting the flash follow it wherever it goes. As a result, I have some math that can easily calculate where the flash should be based only on the camera's position and target, but no way to access the camera's position and target (x, y, z) values to do the calculations. Then, I need to output the Flash position calculated from the script to the flash object's position node.
I imagine this is a LUA question, but not sure.
Script Question
Forum rules
Please add your OS and Hardware Configuration in your signature, it makes it easier for us to help you analyze problems. Example: Win 7 64 | Geforce GTX680 | i7 3770 | 16GB
Please add your OS and Hardware Configuration in your signature, it makes it easier for us to help you analyze problems. Example: Win 7 64 | Geforce GTX680 | i7 3770 | 16GB
Here is a script node that take a camera as input and output its transform that you can plug in a placement node to drive your flash.
The flash need to have the same origin as the camera, the offset being in the geometry.
viewtopic.php?f=73&t=56882#p293802
(just import cameraTransform.orbx in your scene)
The flash need to have the same origin as the camera, the offset being in the geometry.
viewtopic.php?f=73&t=56882#p293802
(just import cameraTransform.orbx in your scene)
Pascal ANDRE
Thanks again for the great xform node. Works great! I have been looking at the code and will hopefully find a way to parse out the xform values, so that I can do some math with them, then re-export them for the output.
Win7 | Geforce TitanX w/ 12Gb | Geforce GTX-560 w/ 2Gb | 6-Core 3.5GHz | 32Gb | Cinema4D w RipTide Importer and OctaneExporter Plugs.
