Moving the rendertarget in the Caustic Teapot Scene

A public forum for discussing and asking questions about the Octane for Unity Alpha

Moving the rendertarget in the Caustic Teapot Scene

Postby mytherapy » Tue Aug 08, 2017 5:45 pm

Hello, looking at the caustic teapot scene in Unity, I'm not able to change the position of the rendertarget. Or rather it seems that I can move it wherever I want in the editor but it always renders from a fixed position.

I CAN change the position of the render target by going to the "view source" link in the inspector and changing it manually in Octane standalone. I can then view that change in Unity. But I'd like to animate a quick flythrough with the teapot scene in Unity and I'm puzzled as to why I can't just move the rendertarget to do this.

I can also create my own rendertarget in Unity and animate that (but I'm going to have to figure out how all the lighting effects were hooked up).

Is there a way that I can just make the existing rendertarget movable?
mytherapy
Licensed Customer
Licensed Customer
 
Posts: 15
Joined: Mon Jun 26, 2017 1:52 pm

Re: Moving the rendertarget in the Caustic Teapot Scene

Postby ChrisHekman » Wed Aug 09, 2017 8:30 am

Go to your PBR RenderTarget -> Camera -> Select Camera -> RenderTarget
Now the RenderTarget will take its own gameobject rotation as camera orientation.

- Edit - This does not seem to work for rendertargets that are inside of ORBX files. We will take a look at it.
ChrisHekman
OctaneRender Team
OctaneRender Team
 
Posts: 25
Joined: Wed Jan 18, 2017 3:09 pm

Re: Moving the rendertarget in the Caustic Teapot Scene

Postby mytherapy » Wed Aug 09, 2017 5:45 pm

I'd really like to create some simple camera animations of the demo scenes, but if I can't animate the cameras that come through in the orbx file, what would be a work-around for this? I've experimented with creating a new rendertarget in Unity (in the Godray/Forest scene), and I can animate this rendertarget, but the godrays aren't working. I tried going to "view source" and copy/pasting nodes between the original rendertarget and my new rendertarget to try to recreate the god ray effect, but that hasn't worked. Can you tell me whether the god rays were created in Octane or in a different program and whether I should be able to add them to my own rendertarget that I just created in Unity?

( I also noticed that I can't change the "Environment>>Sun Direction" settings from "float" to "sun direction" for the rendertarget that I made in Unity).

Alternatively, is there any way to animate a path for the rendertarget thats already in the orbx scene and then bring that animated camera through to Unity?
mytherapy
Licensed Customer
Licensed Customer
 
Posts: 15
Joined: Mon Jun 26, 2017 1:52 pm

Re: Moving the rendertarget in the Caustic Teapot Scene

Postby ChrisHekman » Thu Aug 10, 2017 10:04 am

mytherapy wrote:Hello, looking at the caustic teapot scene in Unity, I'm not able to change the position of the rendertarget. Or rather it seems that I can move it wherever I want in the editor but it always renders from a fixed position.

I CAN change the position of the render target by going to the "view source" link in the inspector and changing it manually in Octane standalone. I can then view that change in Unity. But I'd like to animate a quick flythrough with the teapot scene in Unity and I'm puzzled as to why I can't just move the rendertarget to do this.

I can also create my own rendertarget in Unity and animate that (but I'm going to have to figure out how all the lighting effects were hooked up).

Is there a way that I can just make the existing rendertarget movable?


At the moment no. It will be part of future versions.

You can copy over the settings from one rendertarget to the other by doing the following. It should not take long.
- Create new pbr rendertarget, select it in unity inspector
- Set "Camera select" to "Rendertarget". (PBR camera -> camera select -> rendertarget.)
- Set "Select Environment" to "Rendertarget". (PBR environment -> Select Environment settings -> rendertarget.)
- Press view source
- select the Orbx teapot rendertarget and also press view source.
- You should now see the two rendertargets in the Octane Gui.
- In the octane gui, manually copy over Camera, Kernel, Imager, Environment nodes in the rendertarget. You should be able to copy over the whole nodes when you have rendertarget selected. No need to do each setting individually.
*You will need to invert the cam position/rotation x and z and the sundirection x and z to make it align with unitys coordinate system.
ChrisHekman
OctaneRender Team
OctaneRender Team
 
Posts: 25
Joined: Wed Jan 18, 2017 3:09 pm

Re: Moving the rendertarget in the Caustic Teapot Scene

Postby mytherapy » Thu Aug 10, 2017 1:13 pm

Hello, can you please view my last post as I've mentioned that I've already tried what you propose.

UPDATE:
I've made some progress but can you link to any good documentation on how the fog/rays are created and how they work? I'm getting various artefacts with the fog depending on the sun direction and the position of the rendertarget in the scene - sometimes the fog looks like solid geometry and no god rays are visible.

Can you also answer my question about animating a path for the rendertarget? I've seen tutorials showing how to bring animations into Octane, but can these be taken into Unity? Could I animate a camera moving along a path, then import that to Octane and then use that as my rendertarget in Unity?
mytherapy
Licensed Customer
Licensed Customer
 
Posts: 15
Joined: Mon Jun 26, 2017 1:52 pm

Re: Moving the rendertarget in the Caustic Teapot Scene

Postby ChrisHekman » Fri Aug 11, 2017 12:02 pm

mytherapy wrote:Hello, can you please view my last post as I've mentioned that I've already tried what you propose.

UPDATE:
I've made some progress but can you link to any good documentation on how the fog/rays are created and how they work? I'm getting various artefacts with the fog depending on the sun direction and the position of the rendertarget in the scene - sometimes the fog looks like solid geometry and no god rays are visible.

Can you also answer my question about animating a path for the rendertarget? I've seen tutorials showing how to bring animations into Octane, but can these be taken into Unity? Could I animate a camera moving along a path, then import that to Octane and then use that as my rendertarget in Unity?


On fog/god rays
Fog and God rays should work regardless of your rendertarget settings.
Octane uses a specular material with a transmission node set to 1, combined with a scattering medium node and fake shadows turned on in the specular material.
Creating your own materials that you can attach to unity meshrenderers already works (Octane/UserShader), however they currently are not being saved. This should be fixed in the next build.

This specular material can be placed on a geometry (like a cube). However, this setup only works if the camera is outside of the cube.

Another way is to use a volume (a .vdb file). I believe the example uses them.
These have their own scattering volume settings. There is currently no direct support for vdb files in the unity integration, but you can load them when they are part of an orbx.

On animation
For animations we want unity to be the main driver for them. We have timeline support that can be accessed from the top menu. Octane -> Timeline.
You should be able to animate a PBR Rendertarget with the unity timeline editor If you set the "Select Camera" to "rendertarget" on the PBR Rendertarget component.
You can then render out the animation using Octane -> Timeline
This is currently only supported user created PBR Rendertargets. Rendertargets in an orbx cant be animated by unity at the moment.

*Note that If your orbx is animated, the Octane Timeline tool in unity will animate them by using the unity frame time.
ChrisHekman
OctaneRender Team
OctaneRender Team
 
Posts: 25
Joined: Wed Jan 18, 2017 3:09 pm

Re: Moving the rendertarget in the Caustic Teapot Scene

Postby mytherapy » Fri Aug 11, 2017 3:32 pm

Thanks, that's been helpful.
mytherapy
Licensed Customer
Licensed Customer
 
Posts: 15
Joined: Mon Jun 26, 2017 1:52 pm

Re: Moving the rendertarget in the Caustic Teapot Scene

Postby mytherapy » Mon Aug 14, 2017 11:09 am

Hello, I've got another question about the Teapot/Caustics scene.

I've got my own PBR rendertarget working in the scene (I created this in Unity), but compared to rendering through the rendertarget in the orbx file, the water looks very different and has no real transparency or caustic effects.

Once again, I've tried to copy/paste the nodes between the two rendertargets in the Octane GUI, but it doesn't seem to be having an effect.

Can you tell me what the difference is here between the two rendertargets? It seems like my rendertarget is using the default directional light in the unity scene, but the orbx rendertarget isn't.
mytherapy
Licensed Customer
Licensed Customer
 
Posts: 15
Joined: Mon Jun 26, 2017 1:52 pm

Re: Moving the rendertarget in the Caustic Teapot Scene

Postby ChrisHekman » Mon Aug 14, 2017 12:36 pm

Yes, caustics require you to use the Path Tracing Kernel or the PCM Kernel (PCM gives the best end result) on a PBR Rendertarget. It should be the only thing you need to change.

*Note that the direction light (sun) might not be shining inside the box. Setting the directional light rotation to 30/90/0 and its intensity to 3 shows the caustics effect very clearly.
ChrisHekman
OctaneRender Team
OctaneRender Team
 
Posts: 25
Joined: Wed Jan 18, 2017 3:09 pm

Return to Octane for Unity


Who is online

Users browsing this forum: No registered users and 0 guests

Tue Aug 22, 2017 6:45 pm [ UTC ]