How to programmatically modify the sky background?

Forums: How to programmatically modify the sky background?
A public forum for discussing and asking questions about the Octane for Unity Alpha

Moderator: ChrisHekman

How to programmatically modify the sky background?

Postby wyh880123 » Wed Feb 09, 2022 2:47 am

wyh880123 Wed Feb 09, 2022 2:47 am
I tried to modify the sky box programmatically, but failed to modify it using the following code:
Visible environment Node
pBRRender.RenderTarget.VisibleSkyboxTexture = tex; is failure
Backplate Set to true
Then I tried to modify it by modifying the node
Node node = new Node();
node.InitInRoot(NodeType.NT_ENV_DAYLIGHT);
node.SetPinBool(PinId.P_VISIBLE_ENVIRONMENT_BACKPLATE, true);
Octane.Texture skyTexture = new Octane.Texture();
skyTexture.Init(@"G:\OctaneDnG\Assets\Sandbox\2.jpg", TextureType.Color);
skyTexture.InitInRoot(NodeType.NT_TEX_IMAGE);
node.ConnectToIx(12, skyTexture);
pBRRender.RenderTarget.ConnectToIx(2, node);
But the nodes cannot be textured correctly.The texture node created is empty!
How to programmatically modify the sky background?
wyh880123
 
Posts: 13
Joined: Wed Dec 08, 2021 2:42 am

Return to Octane for Unity


Who is online

Users browsing this forum: No registered users and 12 guests

Tue Apr 23, 2024 10:10 pm [ UTC ]