Forum

#1 2012-07-19 18:20:46

francoishogue
Member

ID pass

Bonjour,

GuerillaRender seems to be geared to generate ID passes... Maybe I'm wrong, but that's in the impression I got looking at the suggested AOV's in the layer node.
What would be a clever way to generate that pass where every geo would have a different color? Do I have to add manually a AOV in every material?
If there's already some info on this, I would love to know! Thanks for your help.

Offline

 

#2 2012-07-19 18:51:18

Ben
Guerilla dev, the guy to hug

Re: ID pass

Hi,

A simple setup for IDs:

- Add an 'Id' output in the RenderLayer
    - add a new output in the RenderLayer, call it Id (or whatever you want)
    - with the drop down, choose the 'Id' pass

http://www.guerillarender.com/images/ids1.png

- Add an 'Id'' dynamic attribute to the primitive you want to generate an Id to, and set the color!
   - select the geometry you want to render with an id
   - in the properties, Primitive > Dynamic Attributes
   - add a color attribute name 'ID'
   - change the color to anything (red, green or blue, basically)

http://www.guerillarender.com/images/ids2.png
http://www.guerillarender.com/images/ids3.png

Render... Magic happens...

http://www.guerillarender.com/images/ids4.png

One nice thing about RenderLayers is that you can define default aovs -- for instance, it is painful to add a Normal output in every shader, when basically you just want to output the N value for all. So, when you add an output to a RenderLayer, when you plug something in it, then this will be the default value for this output. Simple and efficient.

If you have a closer look at the RenderPass (drag'n drop the RenderPass to a browser), you will notice the RenderLayer Id output is connected to a 'RenderAttr' node. The RenderAttr node gets any value which is attached to the geom being rendered. By default, the RenderAttr is set to 'Id', which explains why, when you add an 'Id' dynamic attribute, it renders the Id color.

You can easily create more Id passes, just copy/paste the Id node, change the attribute to anything you like (Id1, Id2, ...), and add as many dynamic attributes to your geometry

Hope that helps !

Ben


Benjamin 'Ben' Legros
Guerilla developer
http://www.guerillarender.com

Offline

 

#3 2012-07-20 15:26:37

francoishogue
Member

Re: ID pass

Bonjour,
Thanks for your help. I'm looking for a pass that I would use with a Nuke plugin that can extract Color IDs. http://www.nukepedia.com/gizmos/plugins/other/j_ops/
The problem I'm facing now with this render is that there is some noise in it. The color is not perflectly identical in every pixel and I wonder if it's something I did on my side or if it's simply normal. The render seems fine when I use a pure color, but is not when the color is randomly chosen.

Last edited by francoishogue (2012-07-20 15:36:08)

Offline

 

#4 2012-07-20 15:51:44

PascalB
Member

Re: ID pass

Didn't you save an 8bits/channel image while you specified an rgb value in float ? That might produce a dithering effect.

Last edited by PascalB (2012-07-20 15:52:14)

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2008 PunBB