Page 1 of 2
keyframe HDRI rotation?
Posted: Sat Jul 13, 2019 12:50 am
by protovu
Hi BlendOctaners,
Here is my set up, but I cannot figure out how to animate/keyframe the rotation of the HDRI.
Hovering over the indicated rotation parameters and hitting "i" on the keyboard does nothing.
Any tips? Should be possible. I am able to do this in my Carrara Octane plugin.
Thanks,
Rick
Re: keyframe HDRI rotation?
Posted: Sat Jul 13, 2019 1:10 pm
by linograndiotoy
This is a my HDRI setup. You can use the Rotation of the Octane 3D Transform node to control the environment.
I hope this helps.
Re: keyframe HDRI rotation?
Posted: Mon Jul 15, 2019 8:40 am
by Whispermode
linograndiotoy wrote:This is a my HDRI setup. You can use the Rotation of the Octane 3D Transform node to control the environment.
HDRI_Setup.JPG
I hope this helps.
Lino - you're only answering part of the question
@protuvu - I don't think this is possible (Lino/devs - to confirm) - I've tried to no avail.
In the end, I rotated everything else in the scene, in the opposite direction. I'm sure there are limitations to this...
Re: keyframe HDRI rotation?
Posted: Mon Jul 15, 2019 3:48 pm
by ChrisH
I thought "This could probably be solved with an OSL script!"
And so it could!
The attached OSL script will rotate the environment texture along the Z-axis (according to the set Rotation value).
A Rotation value of 1 is 360 degrees (there's no limit on the Rotation, so you could rotate several turns in one animation).
The Rotation value is "keyframable".
Just add a OSL Projection node in the Environment Texture, select the OSL-script (and run it), connect it to the Project of the ImageTexture node (and you probably have to connect an Spherical Projection node to the Projection input of the OSL-node)
A small caveat:
The script works perfectly in Stand Alone, but in Octane Blender there is some problems:
* It doesn't "default" to Spherical Projection (so you'll need to add & connect it).
* For some reason it does't update in the viewport when you change the Rotation value (You have to go out of rendered view, and then back in again). But it should work fine when rendering an animation! (ETA: Rendered a test animation at it works fine!)
Strangely enough, OSL-files aren't allowed as attachments, but it's short, so here it is (copy and paste to a textfile in Blender):
Code: Select all
shader OslRotationProjection(
float Rotation = 0.0,
point Projection = 0 [[ string inputType = "projection:spherical" ]],
output point uvw = 0)
{
uvw = Projection;
uvw[0] = uvw[0] + Rotation;
}
Re: keyframe HDRI rotation?
Posted: Mon Jul 15, 2019 4:02 pm
by protovu
Hi Lino,
Thank you for answering.
Seems odd that this limitation exists in one plugin but not in another.
Would it be possible for a Blender developer to check this tutorial:
https://www.youtube.com/watch?v=0c_oqn4i648?
It neatly shows how to attach an hdri rotation to an empty, but I can't figure out the Octane equivalent. Here is the setup:
I am assuming that this can be keyframed, but maybe not.
Or maybe a Blender Developer could reach out to the Carrara developer, Simon, to see if there is some information that can be leveraged?
I am dealing with a very complicated scene, heavily rigged and parented. Not crazy about rotating the scene to achieve this.
Re: keyframe HDRI rotation?
Posted: Mon Jul 15, 2019 4:40 pm
by protovu

- osl.PNG (14.18 KiB) Viewed 3901 times
Hi Chris,
Thank you for figuring this out.
I copied your script to a text file, and then changed the file extension to .osl.
Correct way?
As you can see in the image above, I am missing the yellow folder icon. How do we enter the .osl file?
Thank you ,
Rick
Re: keyframe HDRI rotation?
Posted: Mon Jul 15, 2019 4:49 pm
by ChrisH
Hi Rick!
If you want to open it from a file you need to select "External", and then you'll be able to open it.
You could also open a text editor in Blender, paste in there (or open the file with Alt+O), then you have to use "Internal" (and click the arrows to compile the script).
Re: keyframe HDRI rotation?
Posted: Mon Jul 15, 2019 4:56 pm
by protovu
Ahhhhhhh. We are conspiring to actually have me learn new stuff! Ow,,, my brain hurts.
Thanks, Chris. I will give it a go.
Re: keyframe HDRI rotation?
Posted: Mon Jul 15, 2019 5:12 pm
by protovu
Hi Chris,
Sorry to bug with something that must be obvious.......
Where is my input hiding?
Re: keyframe HDRI rotation?
Posted: Mon Jul 15, 2019 6:17 pm
by ChrisH
Try pressing the "update/compling button".
It should work directly (unless you're getting an error) .