keyframe HDRI rotation?

Blender (Export script developed by yoyoz; Integrated Plugin developed by JimStar)
protovu
Licensed Customer
Posts: 476
Joined: Thu Sep 11, 2014 7:30 pm

Hi BlendOctaners,

Here is my set up, but I cannot figure out how to animate/keyframe the rotation of the HDRI.
animate rotation of hdri.PNG

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
linograndiotoy
OctaneRender Team
Posts: 1358
Joined: Thu Feb 01, 2018 7:10 pm

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.
Whispermode
Licensed Customer
Posts: 136
Joined: Thu Aug 11, 2016 11:27 pm

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...
User avatar
ChrisH
Licensed Customer
Posts: 103
Joined: Sun Mar 06, 2011 12:13 am
Location: Lidköping, Sweden
Contact:

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)
Octane_RotateProj.png
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;
}
Windows 10 Pro - AMD Ryzen 7 2100X 8 core 3.70GHz - 32GB RAM - GeForce GTX 1080 8GB
Octane Prime - Blender Plugin user

Metal IOR values for Octane (with .blend library): https://chris.hindefjord.se/resources/rgb-ior-metals/
protovu
Licensed Customer
Posts: 476
Joined: Thu Sep 11, 2014 7:30 pm

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:
animate rotation of hdriBl.PNG
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.
protovu
Licensed Customer
Posts: 476
Joined: Thu Sep 11, 2014 7:30 pm

osl.PNG
osl.PNG (14.18 KiB) Viewed 3899 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
User avatar
ChrisH
Licensed Customer
Posts: 103
Joined: Sun Mar 06, 2011 12:13 am
Location: Lidköping, Sweden
Contact:

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).
BlenderText.png
Windows 10 Pro - AMD Ryzen 7 2100X 8 core 3.70GHz - 32GB RAM - GeForce GTX 1080 8GB
Octane Prime - Blender Plugin user

Metal IOR values for Octane (with .blend library): https://chris.hindefjord.se/resources/rgb-ior-metals/
protovu
Licensed Customer
Posts: 476
Joined: Thu Sep 11, 2014 7:30 pm

Ahhhhhhh. We are conspiring to actually have me learn new stuff! Ow,,, my brain hurts.

Thanks, Chris. I will give it a go.
protovu
Licensed Customer
Posts: 476
Joined: Thu Sep 11, 2014 7:30 pm

Hi Chris,
Sorry to bug with something that must be obvious.......
nodein.PNG
Where is my input hiding?
User avatar
ChrisH
Licensed Customer
Posts: 103
Joined: Sun Mar 06, 2011 12:13 am
Location: Lidköping, Sweden
Contact:

Try pressing the "update/compling button".
OSL_Upd.png
It should work directly (unless you're getting an error) .
Windows 10 Pro - AMD Ryzen 7 2100X 8 core 3.70GHz - 32GB RAM - GeForce GTX 1080 8GB
Octane Prime - Blender Plugin user

Metal IOR values for Octane (with .blend library): https://chris.hindefjord.se/resources/rgb-ior-metals/
Post Reply

Return to “Blender”