
Lua script for texture animation?
Excellent! Glad it works.
On adding in the texture node stuff, I'm going to have to look in to it. I'm thinking that some of that functionality, like the UV transform can be taken care of by hooking up a transform node between the script node and what you are plugging it into. Other items I'm not sure about, ideally the texture node could have an input pin that accepts an image instead of loading it externally. Kind of an input override pin?

Linux Mint 21.3 x64 | Nvidia GTX 980 4GB (displays) RTX 2070 8GB| Intel I7 5820K 3.8 Ghz | 32Gb Memory | Nvidia Driver 535.171
- Rikk The Gaijin
- Posts: 1528
- Joined: Tue Sep 20, 2011 2:28 pm
- Location: Japan
That would be perfect.grimm wrote:ideally the texture node could have an input pin that accepts an image instead of loading it externally.
Well, it doesn't quite work that way, but maybe this will work for you. I have only added a UV transform pin but I can add other image texture options. Which ones did you need?
Here is the updated script and an example image:
Here is the updated script and an example image:
Linux Mint 21.3 x64 | Nvidia GTX 980 4GB (displays) RTX 2070 8GB| Intel I7 5820K 3.8 Ghz | 32Gb Memory | Nvidia Driver 535.171
- Rikk The Gaijin
- Posts: 1528
- Joined: Tue Sep 20, 2011 2:28 pm
- Location: Japan
Great! But I also need the Invert button, and then it should be perfect! 

- blobbybarack
- Posts: 250
- Joined: Sun Feb 03, 2013 9:11 pm
- Location: Paris
- Contact:
Oh god yes !!!
Should be set as a default script in the next release.
Good job.
Should be set as a default script in the next release.
Good job.
- Rikk The Gaijin
- Posts: 1528
- Joined: Tue Sep 20, 2011 2:28 pm
- Location: Japan
Agree! I hope it will.blobbybarack wrote:Oh god yes !!!
Should be set as a default script in the next release.
Good job.

- ParviainenArk
- Posts: 11
- Joined: Fri Oct 31, 2014 10:40 am
Both of the scripts posted here work great (Thanks stratified and grimm!), but I encounter a problem when trying to use the scripts to animate a HDRi environment. I'm using the HDRi Sky Capture sequence by Paul Debevec et al (http://gl.ict.usc.edu/Data/skyprobes/), which allows for a fully animated day cycle from sunrise to sunset - just under 700 frames of HDRi sky domes. I'm loading the HDRi sequence using the animated texture script, and feeding that into my Texture Environment. It all works great except for the fact that the script seems to load the HDR textures as LDR images.
Attached are 3 image files that illustrate the problem. The first one is a single frame render with a skyprobe EXR file fed into the Texture Environment. The HDRi has a wide enough range so that the sun casts a sharp shadow, producing a very realistic outcome. The second image is the result when the exact same EXR is fed into the Animated Texture script (both stratified and grimm's scripts produce identical results). The overall lighting is much darker, and the shadow is nowhere near as sharp. I suspected that the image is loaded as an LDR texture, so I made a test and saved the EXR as an 8-bit JPG and fed that to the Texture Environment; The result can be seen in the third attachment. I'm not sure if this is indeed the problem since I needed to set the Gamma to 5.0 to produce a similar result as the Animated Texture script. So, is there anything anyone can do about that? Being able to play back an HDR image sequence as a Texture Environment would be great for animations. If you're curious, just download the HDR Sky Capture sequence from http://gl.ict.usc.edu/Data/skyprobes/ and see for yourself how awesome it looks to have clouds rolling and sunlight shifting and changing while your animation runs!
Attached are 3 image files that illustrate the problem. The first one is a single frame render with a skyprobe EXR file fed into the Texture Environment. The HDRi has a wide enough range so that the sun casts a sharp shadow, producing a very realistic outcome. The second image is the result when the exact same EXR is fed into the Animated Texture script (both stratified and grimm's scripts produce identical results). The overall lighting is much darker, and the shadow is nowhere near as sharp. I suspected that the image is loaded as an LDR texture, so I made a test and saved the EXR as an 8-bit JPG and fed that to the Texture Environment; The result can be seen in the third attachment. I'm not sure if this is indeed the problem since I needed to set the Gamma to 5.0 to produce a similar result as the Animated Texture script. So, is there anything anyone can do about that? Being able to play back an HDR image sequence as a Texture Environment would be great for animations. If you're curious, just download the HDR Sky Capture sequence from http://gl.ict.usc.edu/Data/skyprobes/ and see for yourself how awesome it looks to have clouds rolling and sunlight shifting and changing while your animation runs!

- Rikk The Gaijin
- Posts: 1528
- Joined: Tue Sep 20, 2011 2:28 pm
- Location: Japan
Wow! That's actually a great idea! Grimm, can you take a look and fix the image loader to support HDR?