Page 1 of 1

I am trying to automate the system of rendering.

PostPosted: Mon Dec 13, 2021 7:49 am
by wyh880123
I'd like to render set of images, using following procedure:
1)Set current properties(For example, Rendered image size.Render Camera,Thin lens camera or panoramic camera...)
2) Call "Render" method for the current camera view.
3) Check that rendering is complete and Save the image.
4) Repeat points 1-3 till all images / choices rendered and exported.
All the above steps need to be achieved through code
Now, the second step has been achieved.
OctaneUnity.Scene.Instance.RenderTarget = pBRRender.RenderTarget;
How do I correctly detect when rendering is complete and save to local disk?
I have read some replies from the forum, but it is a long time ago. May I ask what is the latest correct way

Re: I am trying to automate the system of rendering.

PostPosted: Mon Jan 03, 2022 12:11 pm
by ChrisHekman
Octane for Unity was not intended to do automated rendering, so the setup will be a bit awkward.

1. Can be done by accessing the Render Target Component, and getting the rendertarget node and then getting the camera node and changing the settings of the camera.
3. Can be done by accessing the static class Octane.Renderer. It has functions that return the SampleCount and DenoisedSampleCount

Re: I am trying to automate the system of rendering.

PostPosted: Fri Jan 07, 2022 2:38 am
by wyh880123
ChrisHekman wrote:Octane for Unity was not intended to do automated rendering, so the setup will be a bit awkward.

1. Can be done by accessing the Render Target Component, and getting the rendertarget node and then getting the camera node and changing the settings of the camera.
3. Can be done by accessing the static class Octane.Renderer. It has functions that return the SampleCount and DenoisedSampleCount

Thanks to ChrisHekman, I can judge that the rendering is finished according to your suggestion, but now I have a new problem, I don't know if it is my Settings. Now after I finish rendering one picture, the second one cannot be completed, and it stays at about 15%.,

Re: I am trying to automate the system of rendering.

PostPosted: Mon Jan 10, 2022 10:37 am
by ChrisHekman
wyh880123 wrote:
ChrisHekman wrote:Octane for Unity was not intended to do automated rendering, so the setup will be a bit awkward.

1. Can be done by accessing the Render Target Component, and getting the rendertarget node and then getting the camera node and changing the settings of the camera.
3. Can be done by accessing the static class Octane.Renderer. It has functions that return the SampleCount and DenoisedSampleCount

Thanks to ChrisHekman, I can judge that the rendering is finished according to your suggestion, but now I have a new problem, I don't know if it is my Settings. Now after I finish rendering one picture, the second one cannot be completed, and it stays at about 15%.,



Octane for Unity needs to be updated every tick for proper functioning.
Is your script using a for loop for checking if Octane is done rendering? If yes, you can try without the for loop and just check once ever update tick.

Re: I am trying to automate the system of rendering.

PostPosted: Wed Jan 19, 2022 7:01 am
by wyh880123
ChrisHekman wrote:
wyh880123 wrote:
ChrisHekman wrote:Octane for Unity was not intended to do automated rendering, so the setup will be a bit awkward.

1. Can be done by accessing the Render Target Component, and getting the rendertarget node and then getting the camera node and changing the settings of the camera.
3. Can be done by accessing the static class Octane.Renderer. It has functions that return the SampleCount and DenoisedSampleCount

Thanks to ChrisHekman, I can judge that the rendering is finished according to your suggestion, but now I have a new problem, I don't know if it is my Settings. Now after I finish rendering one picture, the second one cannot be completed, and it stays at about 15%.,



Octane for Unity needs to be updated every tick for proper functioning.
Is your script using a for loop for checking if Octane is done rendering? If yes, you can try without the for loop and just check once ever update tick.

Thanks!The problem is solved.

Re: I am trying to automate the system of rendering.

PostPosted: Thu Jan 20, 2022 6:06 am
by wyh880123
ChrisHekman wrote:
wyh880123 wrote:
ChrisHekman wrote:Octane for Unity was not intended to do automated rendering, so the setup will be a bit awkward.

1. Can be done by accessing the Render Target Component, and getting the rendertarget node and then getting the camera node and changing the settings of the camera.
3. Can be done by accessing the static class Octane.Renderer. It has functions that return the SampleCount and DenoisedSampleCount

Thanks to ChrisHekman, I can judge that the rendering is finished according to your suggestion, but now I have a new problem, I don't know if it is my Settings. Now after I finish rendering one picture, the second one cannot be completed, and it stays at about 15%.,



Octane for Unity needs to be updated every tick for proper functioning.
Is your script using a for loop for checking if Octane is done rendering? If yes, you can try without the for loop and just check once ever update tick.


I tried to modify the sky box programmatically, but failed to modify it using the following code:
pBRRender.RenderTarget.SkyboxTexture = skyTexture; is failure
pBRRender.RenderTarget.EnvironmentSkybox = skyMaterial; is OK

Re: I am trying to automate the system of rendering.

PostPosted: Thu Jan 20, 2022 1:15 pm
by wyh880123
ChrisHekman wrote:Why can't I select Use for denoising in Settings?