Hi, I would like to being able to change the intensity of my HDR texture through a script, for example:
frame 1245 --> intensity 1.00
frame 1259 --> intensity 0.30
Is it possible?
Thank you
Script request: change light intensity through a script
Yes, I think it could be done.
It would probably be best to modify Roeland's animation render script and add this functionality to it.
Jason

Jason
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
Hey Rikk,
Try this out and see if it works for you. You need to have a texture environment node connect to the render target and have the target selected for it to work. Let me know if you have any problems.
Jason
Try this out and see if it works for you. You need to have a texture environment node connect to the render target and have the target selected for it to work. Let me know if you have any problems.
Jason
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
Thanks, this should come in handy. Maybe you could add an option to add the texture Environment if a node does not exist and connect it to the render target.
Code: Select all
local settings =
{
["renderTargets"] = octane.project.getSceneGraph():findNodes(octane.NT_RENDERTARGET),
}
-- no render targets available -> error out
if #settings.renderTargets == 0 then
error("no render targets to render in project:", projectPath)
else
-- create a texture environment node
texNode = octane.node.create{ type=octane.NT_ENV_TEXTURE, name="HDRI intensity" }
-- evaluate the texture node
texNode:evaluate()
Win 11 64GB | NVIDIA RTX3060 12GB
- Rikk The Gaijin
- Posts: 1528
- Joined: Tue Sep 20, 2011 2:28 pm
- Location: Japan
Hey grimm, this looks sweet! But I would like to see the result before start rendering, the script Roeland made changed the scene so I could see the result by just moving the marker on the animation bar, can you do that?
Thanks Tugpsx,
That would be a good addition.
Rikk,
Ah, I see, so you need the script to modify the animation and then get out of the way? I will look into it.
Jason
That would be a good addition.
Rikk,
Ah, I see, so you need the script to modify the animation and then get out of the way? I will look into it.
Jason
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
Thank you, I really appreciate it.grimm wrote:Thanks Tugpsx,
That would be a good addition.
Rikk,
Ah, I see, so you need the script to modify the animation and then get out of the way? I will look into it.
Jason

Hi Rikk,
Ok, here is a really rough script that should work. As always let me know if you have any problems with it. You need to have a texture environment node with a float value node connected to the power input pin. The script needs a lot of work still to make it easier to use and more reliable. Right now the start and end time is in frame numbers. When you set the start and end values for the power, every frame before the start will have the same power as the start value, and every frame after the end will equal the end value. The values between the start and end will be smoothly interpolated. Hopefully that isn't too confusing, it's easy to see when you run the script and look at the results. Once you pick the settings you want and select the "build animator" button, close the script and you should be able to scrub the animation and see the effect.
Jason
Ok, here is a really rough script that should work. As always let me know if you have any problems with it. You need to have a texture environment node with a float value node connected to the power input pin. The script needs a lot of work still to make it easier to use and more reliable. Right now the start and end time is in frame numbers. When you set the start and end values for the power, every frame before the start will have the same power as the start value, and every frame after the end will equal the end value. The values between the start and end will be smoothly interpolated. Hopefully that isn't too confusing, it's easy to see when you run the script and look at the results. Once you pick the settings you want and select the "build animator" button, close the script and you should be able to scrub the animation and see the effect.
Jason
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
Thanks a lot grimm, you rock! 
