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.