A while back I wrote an animation script for doing walkthroughs in octane that has been posted here. I would like to extend that script to include rotating an hdr sky texture in sync with the sun animation already included in that script.
Below is a segment of the code where I grab the daylight environment and copy it.
I can't find a call to determine if a sky texture hdr has been assigned to the skytexture pin, and going straight to the projection node on the hdr image doesn't work either.
Can someone point me in the right direction, I basically want to rotate the sky at a rate of 18deg per hour during a daylight sun animation by setting an animator the Y angle of a spherical projection. Alternatively what would be a different approach to achieve the same thing?
thx
local copyEnv = copyRt:getConnectedNode(octane.P_ENVIRONMENT)
copySunDir = nil
if not copyEnv then
showError("Walkthrough Error!", "A 'Daylight' or 'Texture' environment node must be connected to the render target", true)
else
-- Check if a daylight environment
if copyEnv:getProperties().type == octane.NT_ENV_DAYLIGHT then
-- Get the sun direction from the daylight environment
copySunDir = copyEnv:getConnectedNode(octane.P_SUN_DIR)
if not copySunDir or copySunDir:getProperties().type ~= octane.NT_SUN_DIRECTION then
showError("Walkthrough Error!", "No sun direction connected to the daylight environment", true)
end
THESE TWO DO NOT WORK
copySkyTex = copyEnv:getConnectedNode(octane.P_SKY_TEXTURE)
copySkyTex = copyEnv:getConnectedNode(octane.P_PROJECTION)
END THIS DOES NOT WORK
if not copySkyTex or copySkyTex:getProperties().type ~= octane.NT_PROJ_SPHERICAL then
showDebugInfo("copySkyColor","Not a Texture")
end
else