A baking test scene

Discussion related to the LuxCore functionality, implementations and API.
Post Reply
Racleborg
Posts: 621
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: A baking test scene

Post by Racleborg »

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: 621
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: A baking test scene

Post by Racleborg »

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
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: A baking test scene

Post by Dade »

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: 621
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: A baking test scene

Post by Racleborg »

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
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: A baking test scene

Post by Dade »

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
Donor
Posts: 3101
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: A baking test scene

Post by Sharlybg »

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
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: A baking test scene

Post by Dade »

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: 621
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: A baking test scene

Post by Racleborg »

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
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: A baking test scene

Post by Dade »

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: 621
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: A baking test scene

Post by Racleborg »

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