Octane v3 baked maps & UE4

Discuss anything you like on this forum.
Post Reply
User avatar
Goldorak
OctaneRender Team
Posts: 2321
Joined: Sun Apr 22, 2012 8:09 pm
Contact:

Seekerfinder wrote:
justin-cook wrote:Octane's path-tracing isn't really suitable for 60fps real time applications. I can't comment further on that at the moment though.
Brigade let us down so badly on this score - raising us up, dropping us hard (I can't comment further on that at the moment though).
To clarify Justin's point - Octane is not the right tool for 60 fps path-tracing, true. But this is the gap that Brigade will be filling (working on this for years). Brigade will make a lot more sense once you see where it is added on top of the new toolchain we are creating for real time workflow.

This begins with Octane 3 baking -> UE4 integration. Then -> Brigade -> new ORBX player. The latter can blend all of these in real time. The common link in ORBX player be OSL shaders. These will eventually interoperate across all the engine layers, as will the entire ORBX scene graph supported by Octane 3. That work is still ahead of us. We will share more details at GTC in April.
User avatar
FrankPooleFloating
Licensed Customer
Posts: 1669
Joined: Thu Nov 29, 2012 3:48 pm

Does that mean that we will not likely need to pay for v3 upgrades until at least April? (alpha & beta will definitely go on into spring)
Win10Pro || GA-X99-SOC-Champion || i7 5820k w/ H60 || 32GB DDR4 || 3x EVGA RTX 2070 Super Hybrid || EVGA Supernova G2 1300W || Tt Core X9 || LightWave Plug (v4 for old gigs) || Blender E-Cycles
User avatar
Seekerfinder
Licensed Customer
Posts: 1600
Joined: Tue Jan 04, 2011 11:34 am

Goldorak wrote:
Seekerfinder wrote:
justin-cook wrote:Octane's path-tracing isn't really suitable for 60fps real time applications. I can't comment further on that at the moment though.
Brigade let us down so badly on this score - raising us up, dropping us hard (I can't comment further on that at the moment though).
To clarify Justin's point - Octane is not the right tool for 60 fps path-tracing, true. But this is the gap that Brigade will be filling (working on this for years). Brigade will make a lot more sense once you see where it is added on top of the new toolchain we are creating for real time workflow.

This begins with Octane 3 baking -> UE4 integration. Then -> Brigade -> new ORBX player. The latter can blend all of these in real time. The common link in ORBX player be OSL shaders. These will eventually interoperate across all the engine layers, as will the entire ORBX scene graph supported by Octane 3. That work is still ahead of us. We will share more details at GTC in April.
Brigade has become like a brother in jail. You still love him but you just don't talk about him.
With all due respect, Otoy has talked about a number of things between GTC & Siggraph that did not transpire, or only surfaced a year or two later in a lesser form. And in all fairness Brigade development has been all cloak & dagger after Ray Tracey mysteriously disappeared - without a tracey...

But (the promise of) Brigade IS path tracing. At 60fps? I get that texture baking would be an important part of any kind realtime scene navigation. I also get the game engine parallel. Brigade at the 'top of the new toolchain'? Can't wait to see what that means in practice and where UE4 fits in.

Best,
Seeker
Win 8(64) | P9X79-E WS | i7-3930K | 32GB | GTX Titan & GTX 780Ti | SketchUP | Revit | Beta tester for Revit & Sketchup plugins for Octane
ZombieDisco
OctaneRender Team
Posts: 23
Joined: Mon Jul 20, 2015 9:26 pm

Replies in no particular order, apologies if they're jumbled up!
Awesome! I am new to UE but I see endless potential with it's native functionality in combination with Octane. I focus on archviz (and increasingly product viz) so for me light baking is of limited usage since controlling of daylight settings should be dynamic. Texture baking is great, however one of Octane's strengths is also it's ability to modify materials quickly to show various finishing / colour options. But for a final / unchanging VR experience I am sure baking would be great.
If you have the Octane render window inside UE4, are the baked textures exposed to Octane for faster rendering (a round-trip scenario) or are they only exposed to UE4? And inside UE4, will we only have UE4's GI or is this where the 'lightmass' integration thing comes in? I guess until we see the integration it's hard to grasp the workflow.
ability to change textures on the fly (Octane textures or UE4 or both?)
Yes, Octane does the baking hence it being of much higher quality than lightmass. :) One thing I'm quite excited about is accurate rendering of emissive materials, giving UE access to proper emissive surface lighting.

Because the static lighting layer in UE is just a lighting layer, you can do things like change the diffuse texture without needing to re-bake everything. UE does a nice job of mixing dynamic and static elements, but we're going to push that threshold forward a bit further so that more of your static results will be available sooner. I'd like to have the baked lightmaps auto-updating as you make changes and updating in the scene as they're rendered, for example, as this is pretty core to the Octane experience. We can even look at a view-dependent hybrid render that will give you a solid idea of what baking the entire scene will look like from that perspective.

The material setup I'm working with right now uses UE shaders to emulate Octane material attributes as much as possible, in a sense that you have the same inputs. You can edit these materials, textures and colour values without needing to return to Octane if you don't want to.

For now it's best to think of Octane's role in UE as a handy way of transporting previously unavailable formats across all of your tools, a really great update for lighting and the light baking process and a very nice renderer for exporting stills and cut-scenes which is really limited in UE right now. I assume we'll also be looking at ways to hook in ORC at some point as well to make your workflow even faster.
1. if I want to create content for GearVR ---> it's cubemaps.
Some of the example GearVR content we've been seeing is the result of content created in UE and then rendered out. You can also create a fully-interactive GearVR experience in UE, depending on what you're trying to do. There are heaps of exciting options you can try.
Use some UE4 daylight system but also have the ability to use Octane's brilliant daylight system
So far I've been erring on the side of disabling the UE daylight system. Octane just looks so much better. It might be possible to mix the UE and Octane results once we've sorted out the entire lightmass work package, but almost all the UE archvis I've seen involves getting rid of the UE daylight and instead focusing on bounce lighting and GI.

One thing I'd encourage you to consider is using UE as the animation engine for exporting your Octane fly-through. We'll be looking at adding support for Sequencer output rendered by Octane (Sequencer being the Matinee replacement for cutscene animation).
Brigade has become like a brother in jail.
My next task after UE is to bake a cake with a saw in it.
azims
Licensed Customer
Posts: 93
Joined: Sat Mar 29, 2014 5:55 am

Justin and All,

Please help. I am trying to do just what Justin and you folks are describing in this post 'you can bake surfaces and lighting using Octane and place it into UE' and yes it is for 'For archvis purposes'.

I have brought my UV unwrapped mesh from 3ds max as OBJ into Octane standalone. I have the mesh separated by object and baking ID etc in octane. I have applied materials in Octane and the typical renders and the Gear VR cubemap look nice and everything is ready to bake. All the passes mentioned here have been enabled 'normals and AO, specular, metallic and roughness masks are on the cards, so if you're baking manually right now you'll want those'

Q1) Please explain the following to me 'Justin said, We also export the lighting to an emissive channel in each material'. What do I need to do here? Do I need to enable something besides the above passes?

Q2) Also 'Justin said, The lighting pass we export is the raw 16-bit diffuse. UE4 loves the EXR format, incidentally[/i]'. Again I did not follow, should I enable 'ambient light' or 'sunlight' lighting pass?

Q3) Please explain what Justin meant by ',We don't bake the base diffuse textures out (eg. the diffuse filter pass). Right now traditional gaming techniques such as tiled detail textures look better up close'. Does he mean we don't save the 'Main' render and hook it into diffuse slot in UE4? Is he suggesting I hook up the diffuse texture I used to build my octane material once again directly in UE4 diffuse slot, kind of rebuilding the material?

Q4) What environment should I plug into my render node while baking these textures ? Should i just use the daylight environment I am currently using for my typical renders and Gear VR cubemap?

Q3) Which format should I save these renders in? 8 bit png or 16 bit png or EXR Untonemapped or EXR Tonemapped.

Q5) If I understand correctly all the render passes (within one baking run) can be saved within the same EXR file. If I do this, in UE4 do i just bring in the one EXR texture and connect it to the normal, specular, and other nodes listed above? or should I bake the passes separately from octane, load them separately in UE4 and link them into their respective nodes?

Justin or others if you can please share a simple scene you have taken from Octane to UE4 (both octane and UE4 files) so I understand this workflow. I am doing this for the first time so I am kind of lost with how these parts come together.

Thanks for answering my questions and sorry if any of these question are too easy or too difficult. I don't know where they fall along the curve.
ZombieDisco
OctaneRender Team
Posts: 23
Joined: Mon Jul 20, 2015 9:26 pm

Hi Azims!

You're asking the tricky questions, but they're good ones! I'll do my best to explain the process we're implementing with the plugin so that you can set it up manually for now.

1. We bake several infopasses that UE can use to correctly display the static lighting results from Octane. These are all 32-bit .exr files using linear colour space.
..1a. Go to your render target and check the "Raw", "Diffuse" and "Diffuse Filter" beauty passes. Diffuse is going to be the effect of light on your surface and Diffuse Filter will be the unshaded base texture.
..1b. Under Info Passes check "Bump and normal mapping" and "Shading Normal". You can also check "Tangent normal" if you want to work in tangent space. I find using Shading Normal fixes up a common problem UE has with importing smoothing groups from C4D.
..1c. Check "Ambient Occlusion" as well.
..1d. In your Imager node change Response to "Linear/Off".
..1e. Use the Path Tracing Kernal or PMC for best results when you bake. Direct Lighting is fast but doesn't achieve what you're trying to do.

2. Set up your meshes with good, non-overlapping UVs. If you need overlapping UVs for your bitmap materials set up a completely unwrapped and non-overlapping UV set in the second UV channel. Unfortunately you can't use .obj to do this as it only supports a single UV channel. Use Alembic in this case instead.
..2a. Bake each object's surface and save the results of those infopasses mentioned above as .exr files. The best way to do this is to set up each mesh with its own object layer map and then each mesh with a unique baking ID. If you plan to bake more than once, set up multiple render targets with multiple baking cameras, each with its own baking ID target. Then you just have to click each render target and output the results. This is the most time-intensive step.
..2b. Since you're baking lighting results, use whatever environment your in-game scene will be using.
..2c. I believe I saved the infopasses as untonemapped.
..2d. They'll be separate .exr files.
..2e. You'll want to target the highest res output you can. For UE this means 4096x4096. I would even recommend going for 8192x8192 and follow the steps here to enable 8k textures in UE: https://docs.unrealengine.com/latest/IN ... utionlimit

3. Import your meshes and textures to Unreal Engine. Your .exr textures should import as 16-bit linear colour textures. This part is very important so verify that a couple of them worked. For this manual process I found it easier to set the origin of each mesh to 0, 0, 0 with the mesh's geometry offset from that. This means when you import to UE you just zero the position and rotation for your meshes and they're in exactly the right place.
..3a. Set up your material like this:

Image

..3b. Also note that in the sidebar you should uncheck "Tangent space normals" if you're using the Shader Normal infopass.

I'll attach an example .ocs file so you don't have to manually go over every step. Setting up the UE material should be pretty easy. Make sure if you're doing a base material to instance off of in UE that you use your .exr textures as the preview material or the colour space will be wrong.

We're going to release a sample scene with the first alpha of the plugin that will contain examples of all of the above. It's a pretty arduous process so you can see why we're plugin-izing it. I'm a little behind my schedule but I'm hoping we'll have something to download real soon.
You do not have the required permissions to view the files attached to this post.
azims
Licensed Customer
Posts: 93
Joined: Sat Mar 29, 2014 5:55 am

Justin,

Thank you very much for the quick, detailed response. You and the Otoy team and awesome. Also I don't mind the manual steps when someone can guide me. I am going to use your methodology to bring the octane baked textures into UE4 tonight. I will get back to you with questions tomorrow.

Thanks again.
ZombieDisco
OctaneRender Team
Posts: 23
Joined: Mon Jul 20, 2015 9:26 pm

No problem, we'd love to see your results!
azims
Licensed Customer
Posts: 93
Joined: Sat Mar 29, 2014 5:55 am

Hi Justin,

I am following your workflow and the 'use alembic' recommendation is causing problems. When I bring geometry in Octane as a alembic scene, all object layers nodes are collapsed into one. When I edit settings of the alembic file and turn on all the checkboxes, I have two nodes, one for the object and a second for material. I even tried exporting using the exocortex plugin for max. No luck. So I am going to skip this recommendation and proceed with OBJ. When I go to UE4, I will bring in a fbx from max which supports two uv channels. Let me know if you see any problems with the approach

Thanks,
ZombieDisco
OctaneRender Team
Posts: 23
Joined: Mon Jul 20, 2015 9:26 pm

I had that problem with Alembic too! Here's what you do:

Import the Alembic scene, select the node and then click the cog icon near the source path in the details panel. In there you should find some options relating to merging materials and meshes. The first thing you need to do is prevent anything from merging. That will give you a lot of extra material and object layer inputs. Set them all up like normal and don't worry too much about it still being a single node - the important thing is that you can set a baking ID per mesh and assign all of the right materials.

As for what you want to do with FBX, you're on the right track. I also used two different format meshes but with identical data, one for Octane and one for UE.
Post Reply

Return to “Off Topic Forum”