Page 1 of 3

material id

Posted: Wed Sep 12, 2018 1:47 pm
by pepe
Hello, ... I am testing blendluxcore and material id channel did not behave as expected. I get only black for id 0 and white id -1 in both versions 2 and 2.1 alpha 3. I expect to get for id -1 a different color [as in tool tip]. Thanks.

Re: material id

Posted: Wed Sep 12, 2018 2:27 pm
by B.Y.O.B.
Blender shows values that are greater than 1 as white in the image editor.
Since most random material IDs will be something like 345459845, the whole image is usually white.

However, if you hover your mouse over the material ID pass, then press and hold left mouse button, the actual value will be shown on the bottom.
This way you can find out the randomly assigned ID.

You can extract the ID that you want with a Blender node in the compositor:
https://docs.blender.org/manual/en/dev/ ... _mask.html

Re: material id

Posted: Wed Sep 12, 2018 5:13 pm
by pepe
Thanks for answer.

OK. I save the Material ID channel as exr, loaded in GIMP play with levels and this is what I got. [black is what materials id is -1, shades of grey is what I assign as id 1,2,3 etc].

My pipline is to get the render image and a material color image to be able to easy select the material from the render in Photosop - kind of the old luxrender Material ID.

Is possible to get a simple color material channel?

Re: material id

Posted: Wed Sep 12, 2018 6:18 pm
by B.Y.O.B.
Can't you use the color picker with 0 tolerance in the image manipulation program?

Re: material id

Posted: Wed Sep 12, 2018 6:58 pm
by Dade
Material mask AOV may be what are you looking for :?:

Re: material id

Posted: Wed Sep 12, 2018 7:55 pm
by B.Y.O.B.
Dade wrote: Wed Sep 12, 2018 6:58 pm Material mask AOV may be what are you looking for :?:
Unfortunately this one is not yet available in the addon. :|

Re: material id

Posted: Wed Sep 12, 2018 8:14 pm
by pepe
I did further testing and I can't get random value for id -1, however I can get the value I introduce as id, the difficult part is that I can't see during the rendering which material does not have a value [rather than -1] and the image is not aliased [creating a unreal selection compare width the render image around the edges].

Re: material id

Posted: Wed Sep 12, 2018 9:43 pm
by Dade
pepe wrote: Wed Sep 12, 2018 8:14 pm and the image is not aliased [creating a unreal selection compare width the render image around the edges].
Aliased selection is available only trough Material ID mask AOV where it is returned the mask of a single Material ID and the values are between [0.0, 1.0] (for obvious reasons, you can not anti-alias integer values with Material ID AOV).

Re: material id

Posted: Wed Sep 12, 2018 10:33 pm
by pepe
I was thinking to be able to have the same workflow as with vray - rendering a color image base on materials [basically every material having a flat color] and using this just for selection - having the image on a different layer in photosop or gimp - and the flat color image to be aliasing for accurate selection - see below.

If I have to change a little the materials [ let's say to make the main brick a little lighter] I don't have to rerender the hole image.

However the tool is there. LuxCoreRender with denoising is really good.

Thank you guys for answering.


Block.png

Re: material id

Posted: Wed Sep 12, 2018 11:36 pm
by Dade
pepe wrote: Wed Sep 12, 2018 10:33 pm I was thinking to be able to have the same workflow as with vray - rendering a color image base on materials [basically every material having a flat color]
But the edge between two different materials will be a mix of the 2 flat colors (i.e. the anti-aliased edge). How can you work on that set of pixels ? The Photoshop/gimp pick tool will not handle correctly the edge :?:

LuxCore doesn't currently have such AOV but would be quite easy to add however I don't understand how it can be used for your task.