Film output types documentation

Discussion related to the LuxCore functionality, implementations and API.
Post Reply
bartek_zgo
Posts: 116
Joined: Mon Oct 26, 2020 11:42 am

Film output types documentation

Post by bartek_zgo »

Hi Guys,
is there a place where I can find documentation for film output types? I have found how to set selected color for material, and than I add film.output with type MATERIAL_ID or MATERIAL_ID_COLOR. And it looks to work. But what is the difference between them? I have found that in one the sky is black in other it is white. There is another type BY_MATERIAL_ID.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Film output types documentation

Post by Dade »

bartek_zgo wrote: Thu Mar 04, 2021 10:25 am is there a place where I can find documentation for film output types? I have found how to set selected color for material, and than I add film.output with type MATERIAL_ID or MATERIAL_ID_COLOR. And it looks to work. But what is the difference between them? I have found that in one the sky is black in other it is white. There is another type BY_MATERIAL_ID.
Here: https://wiki.luxcorerender.org/LuxCore_ ... ka_AOVs.29

- MATERIAL_ID is the ID of the material (it is set in material properties). The channel is an array of unsigned int, one for each pixel;

- MATERIAL_ID_COLOR is the ID of the material but the ID is interpreted as a RGB color, for instance, an ID of 0x00FF00000 is the red color. The channel is an array of 3 floats (i.e. RGB) for each pixel.

- BY_MATERIAL_ID will use only samples of a list of specified material IDs. It can be used to have the rendering only of a specified material(s).

MATERIAL_ID and MATERIAL_ID_COLOR can produce the same file out (it depends on what the file format supports or not).
Support LuxCoreRender project with salts and bounties
bartek_zgo
Posts: 116
Joined: Mon Oct 26, 2020 11:42 am

Re: Film output types documentation

Post by bartek_zgo »

Thanks Dade,
I think I will use MATERIAL_ID. It is more logical for me and will use less memory. I set material.id as unsigned int, so the channel that is an array of uint is more logical for me. Than I save it as png image.
One small thing. From my tests 0x000000FF is red. (less significant byte or right)
bartek_zgo
Posts: 116
Joined: Mon Oct 26, 2020 11:42 am

Re: Film output types documentation

Post by bartek_zgo »

Another question connected to this topic.
I define following outputs:

Code: Select all

film.outputs.0.type = "RGB_IMAGEPIPELINE"
film.outputs.0.filename = "/home/node/matadorNode/tmp/0_FI_68803_271618_0000.exr"
film.imagepipelines.0.0.type = "NOP"
film.imagepipelines.0.1.type = "INTEL_OIDN"
film.imagepipelines.0.2.type = "TONEMAP_LUXLINEAR"
film.imagepipelines.0.2.sensitivity = "100"
film.imagepipelines.0.2.exposure = 3.2
film.imagepipelines.0.2.fstop = 22
film.imagepipelines.0.3.type = "TONEMAP_LINEAR"
film.imagepipelines.0.3.scale = "0.39"
film.outputs.1.type = "MATERIAL_ID"
film.outputs.1.filename = "/home/node/matadorNode/tmp/0_FI_68803_271618_0000_idmaterial.png"
film.outputs.2.type = "OBJECT_ID"
film.outputs.2.filename = "/home/node/matadorNode/tmp/0_FI_68803_271618_0000_idobject.png"
film.outputs.3.type = "DEPTH"
film.outputs.3.filename = "/home/node/matadorNode/tmp/0_FI_68803_271618_0000_depth.exr"
MATERIAL_ID and OBJECT_ID files are saved and they are correct.
But I start the same render on many machines. So I want to merge many flm files and than export this files from merged flm file.
I can export MATERIAL_ID but it looks that flm file does not contain OBJECT_ID.
I made a simple loop threw all output types and channel types and call film.HasChannel and film.HasOutput to check what is inside flm file. This is what I get:
Available output types: OUTPUT_RGB, OUTPUT_RGB_IMAGEPIPELINE, OUTPUT_DEPTH, OUTPUT_MATERIAL_ID, OUTPUT_CONVERGENCE,
Available channels: CHANNEL_RADIANCE_PER_PIXEL_NORMALIZED, CHANNEL_RADIANCE_PER_SCREEN_NORMALIZED, CHANNEL_IMAGEPIPELINE, CHANNEL_DEPTH, CHANNEL_MATERIAL_ID,
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Film output types documentation

Post by Dade »

It is working fine here :?:

I did this test:

1) load a scene with the OBJECT_ID AOV in luxcoreui

2) saved the film

3) execute "python3 lib/pyluxcoretools.zip merge film.flm -a OBJECT_ID oid.png"

4) oid.png looks right
Support LuxCoreRender project with salts and bounties
bartek_zgo
Posts: 116
Joined: Mon Oct 26, 2020 11:42 am

Re: Film output types documentation

Post by bartek_zgo »

Thanks Dade,
I found my error. We are using C# wrapper for luxcore library. We didn't update FilmOutputType enum. The beginning of FilmOutputType didn't change. MATERIAL_ID had the same value in previous luxcore version but OBJECT_ID has changed.
Post Reply