ctrl_buffers


#281

Hi Fran,

Thanks for this, I can get both the framebuffers and coverage/tags example scenes working. However I was wondering if its is possible to use both together?

matt


#282

its is possible to use both together?
ehy, that’s the point ! the answer is - yes.
just for your user framebuffers use the buffer_write
to output them to file. to get instead the coverage
and label use the maya buildin mechanism by adding
an output pass. while buffer_write will take care also
of your files during animations… the maya build not;
so you’ll have to use an expression to output different
cov and label files on an anim. I will add maybe
something to get also this done internally and more
user friendly.

ciao
francesca


#283

once again thanks francesca.


#284

I don’t have a render farm here
Can someone confirm TRUE or FALSE on latest MI software for this:
Last year when I checked with Mental Ray via XSI the tag-label-objectId thing was getting reinitialized on the different render nodes. That is an object label would change across your rendered sequence if not rendered on the same machine.

Pierre
www.revisionfx.com
pierre@revisionfx.com


#285

Thanks Fran, it was the expressions I overlooked

great work!

matt


#286

pierre: FALSE.
the tag-label-objectId is not used and not
generated directly by mentalray .
it is the translator that generally put a different
tag on each obj. you can do it as I did also with
a simple geoshader custom traversing the whole
scene doing it manually but also there it is in
the preprocessing scene that happens this and
so anyway only on the master machine that will
fill the scene DB broadcasted to slaves. I mean
there’s a centralized place where obj get/put
their properties. this as distributed renderings.
on render nodes you could encounter the
problem that maybe batch rendering the scene
on different hosts xsi will put different random
tags… maybe render to standalones or to a
dedicated machine the whole tag animation,
or use a custom geoshader to get a solid
tag convention. but you see as the tag creation
is done by the dcc in this case it is more SI than
a MI issue.

ciao
francesca


#287

Thanks for enlightening me as to the setup of coverage and tag. However, it doesn’t seem like I’m able to add an expression to increment the frame number of the output files. Does anyone have a suggestion? Thanks, T.


#288

just wanted to say my thanks for this great node. Ive only been playing with Networks in Maya a short while and with this shader (mix8layer)it makes everything alot easier and stable. Cheers. Here’s a network i made with it.

I know its really simple. But thats how i like it. :smiley:

Thanks again for all the great work you are doing, I along with probably everyone else appreciate it.


#289

ehy Andrew nice to see a maya mac (style) interface… :slight_smile:
if you think that all the mix8layer parameters are not
so cool to be seen in the channel editor you can just
edit with your own names. the shader wil does not care
about them along you maintain the same order.

       back to ctrl.buffers.
     we implemented all the build-in buffers like coverage
       label and so on to get completely worked out by
       the ctrl.buffers pack. basically it is now a total
       custom solution to overcome the unfriendly alias
       solution for framebuffering in mrmaya. so I begin
       to see also a possible linux version as we are 
       approaching a final release. :)
     
      
       
       how it works. 
       
       as before for the user frame buffers.
       
       to get the most out also from buildin buffers.. just
       enable those that you are interested to see as outputs
       in the buffer_api.. and then enable also the writing
       process in the buffer_write, under buffer.options.
       
       in this manner you can apply for example a coverage
       buffer to get filtering on secondary buffers without
       having it to be wrote down each time if you don't 
       need it. 
       
       we added also a force.correct.file.format option that 
       will take care to get to your internal buffers the right 
       extension and file format. otherwise all the buffers
       will have the same extension and format and mr will
       generate a warn while converting its internal buffers
       to unsupported formats, but the imgs are anyway valid.
       
       also build-in buffers will follow the filepath name convention
       and padding.
       
       a little thing is that mr at the end of the verbose just after
       the main rgba image verbose output will display also the 
       writing for the buildin buffers.. but it will not write them
       effectively.. you'll already wrote them via the buffer_write.
       a fictitious C:/label_NULL.tt will appear for example. no 
       problems at all we just cheated our lovely renderer.

now if you need only the buildin buffers and not the
user framebuffers just put -1 as minbuffer range.
the same in the buffer_api, if you don’t need extra buffers
to be enabled for writing. also take care that is not a great
problem if the ranges does not match exactly… I mean if ya
are testing things just enable a larger range in the buffer_api
and tweak only the writing range in the buffer_write.

    a couple of scenes included.
  
        here a screenshot for those interesteed.
    [[img]http://img443.imageshack.us/img443/5310/ctrlbuffersv158ni.th.jpg[/img]](http://img443.imageshack.us/my.php?image=ctrlbuffersv158ni.jpg)
 **
  
 maya7.0 only.
 
 
 
  ciao
       francesca

#290

Seems like christmas is coming early this year… Thank you so much!

Also, :thumbsup: for the linux version.


#291

I know you’re really hard working on the ctrl_buffer script its amazing, so thank you for that!
Would be nice if the linux guys could use it too soon.

greets


#292

Francesca,

The coverage image you show seems wrong in terms of usability. It should show intra object coverage as well. Look at the larger pot. There should be some grey dots on the pot top (where the front face intersects with the back face). The Max native render looks like it does the right thing if you compare (check the coverage for the RPF output). The idea is supposed to be when you render things like Z to be able to flag “trouble” pixels, whether the fb is aliased or not is the same thing, the value where coverage is not 0 or 1.0, means this is to be handled differently. For example if you render surface normals for later reuse, you want to know that so you can figure out something there.

It looks like it is tied to miLabel right now or something in your example. I am not sure what the correct algorithm is to properly compute Coverage but it would be along the line way of micro-geometries contribution (triangle, quads,…?) that are not adjacent.

I think Coverage was introduced by Kurt Ackely (et al) - the SGI siggraph Reality Engine paper back then, on these graphics card, Coverage was represented by an array of 0 or 1 bits, allowing a form of sub-pixel precision if doing zbuffer operations, then in Max they transformed that into a form of % density of the nearest object hitting the pixel or something like that. It looks as well as Mental Ray doc now says “the dominant object” as opposed to the “Nearest to Image Plane” contributor.

Pierre
www.revisionfx.com


#293

The coverage image you show seems wrong…

pierre, the coverage buffer is a build-in mentalray buffer.
what you see there is what internally mr uses to get a lot
of things probably, one for all, -filtering on user framebuffers.
that’s what it is. personally I just exposed this to the shaders.
I never used a coverage buffer in my life, but I wll. strange
that you didn’t try yourself so you could get also a contribution
to this thread; because wrong, in my opinion, is only what
it is not tried, left to opinions and speculations.

francesca


#294

See attachment:

Now, we seem to have an alignment problem of the Coverage output with the other things
Here I just mult in Shake Coverage and Tags
Have you seen this?

Pierre
www.revisionfx.com


#295

I noted that.
for example on the gardening scene
I have also a black strip on the left
of the cov image. well if I align that
border with the left border of the tag
img the alignment will match exactly.
you see it also from the imgs I posted.
just grab them and in shake, nudge the
cov img on the left until the black border
is gone… it will then collimate perfectly
with the tag img.

 ciao
 francesca

#296

You are right, there is a 4 pixels horizontal offset on my 640x480 test
I will investigate and report back later –

Pierre
www.revisionfx.com


#297

RE:Coverage
We did a bit more testing

I might be out of thread topic, if so please send me to the proper place - forum… :slight_smile:

So the Coverage is only silhouette boundaries right now.
What I need is Interior Boundaries as well (to use Toon shader terminology)

I looked a bit more closely at what Max does for Coverage in their native renderer.
It appears they store per sample one G-Buffer layer and the layers are depth sorted so the nearest sample is layer 1. (Why an RPF file has multiple layers, and why no one supports RPF correctly btw). As per that process somehow the first layer has greyscale values for interior boundaries representing closest ray coverage. This is not a weighted fragment, for example if you add all the coverage layers it can be over 1.0. As per that process then if you have a teapot (MAX) with an handle facing the camera, there will be greyscale values on the edges of the handle. The purpose of all that is once you rasterize things like surface normals, knowing where inner edges are allows you to handle these pixels differently…

Looking at the Contour shading storage mechanism (and not having much experience with Mental Ray and having never used a contour shader) it looks like maybe something is possible. The question is is there already a contour shader out there that can provide interior object boundaries. Conceptually, something like finding the nearest sample to camera and from that figuring out the number of samples that belong to adjacent triangles and dividing that by the number of samples would be a starting point.

Pierre
www.revisionfx.com


#298

Another Buffer render for stand alone…

http://www.puppet.cgtalk.ru/download/megatk_e.shtml

or

http://www.puppet.cgtalk.ru/download/buffer_writer_e.shtml

Great too…


outch…

Sorry I did’nt read that the Puppet himself was here :slight_smile:


#299

Sorry I did’nt read that the Puppet himself was here

ehehe… and you didn’t read also that this thread is about ctrl.buffers ??
I’m joking… :slight_smile: and puppet is a great guy !

ciao
francesca


#300

Sorry… :wink:

One question Franescaluce :

Does the p_Megatk work with maya_bumpCombiner and mix8.Layer…

I haven’t test yep, but I have to… Maybe you test it ?


PS: You’ve done a great contribution to MentalRay too …