A baking test scene

Discussion related to the Engine functionality, implementations and API.
Racleborg
Posts: 529
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: A baking test scene

Post by Racleborg » Sat Nov 30, 2019 4:15 pm

I’ll rework the chair as it has some dodgy geometry.
In the meantime, are the UVs now working ok for the added thicknesses?

Here: https://1drv.ms/u/s!AhdwgLaw01tLpndZGHs ... T?e=oIIqtd

Racleborg
Posts: 529
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: A baking test scene

Post by Racleborg » Sun Dec 01, 2019 1:02 am

Fixed all materials and textures (hopefully)
Added 4 x window glass panes (There was none in the original scene)
Deleted all duplicated vertices
Repaired some errors in the chair
I hope it works ok for you. 😊

Here: https://1drv.ms/u/s!AhdwgLaw01tLpnjUfAc ... 7?e=A8zSyf

User avatar
Dade
Developer
Posts: 3377
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: A baking test scene

Post by Dade » Tue Dec 03, 2019 4:27 pm

Some update. I added a new menu command to LuxCoreUI to bake the current scene. The process for a simple scene (a plane + 2 cubes) looks like:

baking.jpg

and produces 3 maps for this scene:

maps.jpg

once you have the baked maps, you can render a scene using them (by tracing just a single ray for each sample):

baked.jpg

however, this isn't really the intended/best usage: I'm probably going to write a glTF (https://www.khronos.org/gltf/) exporter so the scene can be seen even inside a browser and explored in real-time using OpenGL/Vulkan/etc.

I'm baking the Racleborg's scene, it takes a while.
Support LuxCoreRender project with salts and bounties

Racleborg
Posts: 529
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: A baking test scene

Post by Racleborg » Tue Dec 03, 2019 5:19 pm

once you have the baked maps, you can render a scene using them (by tracing just a single ray for each sample)
Really exciting. Thank you.

If a scene contains baked and non-baked textures is it possible (or will it be possible) to have different 'by tracing just a single ray for each sample' settings for whether they are baked or not?

Thanks

User avatar
Dade
Developer
Posts: 3377
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: A baking test scene

Post by Dade » Tue Dec 03, 2019 5:29 pm

Racleborg wrote:
Tue Dec 03, 2019 5:19 pm
If a scene contains baked and non-baked textures is it possible (or will it be possible) to have different 'by tracing just a single ray for each sample' settings for whether they are baked or not?
Yes, it already work like that (specular and highly glossy materials are mostly view dependent and usually not worth baking).
Support LuxCoreRender project with salts and bounties

User avatar
Sharlybg
Donor
Posts: 1555
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: A baking test scene

Post by Sharlybg » Tue Dec 03, 2019 5:38 pm

congrats for the work done.

just wonder how baking will stand against realtime tech improvement comming next years with microsoft XBOX / SONY PS5 and AMD / INTEL realtime ray tracing hardware.

will it be relevant ?
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA

User avatar
Dade
Developer
Posts: 3377
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: A baking test scene

Post by Dade » Tue Dec 03, 2019 6:51 pm

Sharlybg wrote:
Tue Dec 03, 2019 5:38 pm
just wonder how baking will stand against realtime tech improvement comming next years with microsoft XBOX / SONY PS5 and AMD / INTEL realtime ray tracing hardware.

will it be relevant ?
I doubt it is ever going to be fast enough to replace the baking option. Anyway the baking process is about tracing (a lot of) rays, so the hardware is going to accelerate the baking process if it can not replace it.
Support LuxCoreRender project with salts and bounties

Racleborg
Posts: 529
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: A baking test scene

Post by Racleborg » Tue Dec 03, 2019 7:08 pm

Yes, it already work like that (specular and highly glossy materials are mostly view dependent and usually not worth baking).
Great. Thanks

I'm trying it out with just the default Blender cube.

Having not used the standalone before I'm doing something wrong because the Baked textures looks to only be 64 x 64 pixels

My process is:
Default scene in Blender (already unwrapped cube).
Add a Disney shader.
Only write Luxcore scene to disc
Open LuxcoreUI
Load the .cfg file and let render.
Then, File - Bake All Objects
Import the .EXR textures back to Blender
Is that correct?
Thank you

User avatar
Dade
Developer
Posts: 3377
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: A baking test scene

Post by Dade » Tue Dec 03, 2019 10:26 pm

Racleborg wrote:
Tue Dec 03, 2019 7:08 pm
Is that correct?
Yes, it is the default parameters. The command write also a render-bakeallobjects.cfg file. You can edit that file in a text editor to change the baking parameters. This commented .cfg file should give you an idea what the parameters mean: https://github.com/LuxCoreRender/LuxCor ... r-bake.cfg

You can than load the edited render-bakeallobjects.cfg file in LuxCoreUI and render the maps as you like.

You want probably change the min. and max. map size or set each map width/height by hand (otherwise the size is based on the mesh surface area and set between min. and max.):

Code: Select all

# Note: "autosize" is an option to automatically set the baked map width/height
# based on the mesh area. Small objects will have lower resolution maps and big
# will have high resolution maps.
#
# Set the minimum size of the baked map when "autosize" option is enabled
bake.minmapautosize = 512
# Set the maximum size of the baked map when "autosize" option is enabled
bake.maxmapautosize = 1024
You may want to change also the halt conditions.
Support LuxCoreRender project with salts and bounties

Racleborg
Posts: 529
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: A baking test scene

Post by Racleborg » Tue Dec 03, 2019 10:54 pm

Dade

Thank you for all the information. I'm playing around with it and will probably be focused on it over the next few days.
I also need to get my head around the correct methods to unwrap the objects, so I'll probably be watching a few training videos on that as well.

A great feature!!! :D :D :D Awesome!

Post Reply