Announcement

Collapse
No announcement yet.

Mask render tool

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mask render tool

    Hi,

    some times my design clients ask for masks to select object of a rendering for fineadjust or create variations of colors in postwork. At the moment VfR dosn't support any antialiased mask output.
    Today I got the idea for a script, that allow to select objects at a scene and to render this object white and all other objects black with all camera and output settings of the current scene.

    The script create copies of all objects, assign black and white emitter materials, add a big black sphere around the scene and render it. At the end, the masked object and the black sphere are deleted again.

    Prepare for usage:
    • save the MaskRenderTool.tb toolbar at the Rhino directory and drag&drop it to a Rhino task -> the toolbar will be installed
    • save the files BlackSphere.3dm, MaskBlack.vismat and MaskWhite.vismat at harddisk c:


    Befor starting the script, the mask materials must be load to the current Rhino file materials - use right mouse button. For mask render use the left mouse button.

    www.simulacrum.de/download/MaskRendering.zip

    Please use the tool at own risk.

    I'm glad to hear, if somebody know, how the tool can be improved. One problem is, that the white mask material could be to bright or to dark for some camera settings. I don't know an automatic solution. Manualy adjust of the output brightness (color mapping or physical camera) or adjust the white emitter material could help. Best, the rendered white material match the rendered color range.
    Update: if the white mask material dosn't match the current camera, than the easiest method to get the full range is, to disable "clamp output" to get a 32bit output and adjust the exposure of the frame buffer.

    Also, at the moment lights stay visible at the scene (not the lighting effect). I'm not sure it is good or not. If lights should not be visible at the mask, than best hide the lights befor.

    Rendered example


    Mask


    PS: My dream is, that a mask is rendered based on the Rhino display colors. This display colors wasn't needed by me and I suppose so, it's free for mask usage in the most cases. AIR support a render command like this
    Code:
    _AirRender _Outline=No _Surface _Shader constant _Enter _Colors=Yes _GiMode=Off _BGcolor=0,0,0 _PixelSamples=8 _Enter
    ... maybe something could be possible for VfR in the future. Or the Vray wireframe output channel could based on the Rhino display colors.
    www.simulacrum.de - visualization for designer and architects

  • #2
    Re: Mask render tool

    I forget the emitter materials and the sphere - now in the ZIP archive.
    www.simulacrum.de - visualization for designer and architects

    Comment


    • #3
      Re: Mask render tool

      Hi Micha,

      While this looks great and works fine,there is obviously something I am missing,when I need to have a selection for a particular material all I do, is set the alpha contribution to 0,in the material option,for that material.This gives me a perfect selection which I can then tweak in photoshop .

      Renee

      Comment


      • #4
        Re: Mask render tool

        Interesting idea.
        www.simulacrum.de - visualization for designer and architects

        Comment


        • #5
          Re: Mask render tool

          and much easier

          The selection is done at the time of rendering,so no xtra rendering time.

          Comment


          • #6
            Re: Mask render tool

            Yes, it works nice, if the alpha channel isn't used for something other and the background is filled. Press the "render mask" button is easy too ... ... but needs a few seconds for the rendering.
            www.simulacrum.de - visualization for designer and architects

            Comment


            • #7
              Re: Mask render tool

              Micha, I tryied to install this but it doesn't seem to work. I put the .tb file in rhini/plugins then drag and drop but nothing happens...

              Using latest rhino and vray

              What am I doing wrong?

              Thanks

              Gery

              Comment


              • #8
                Re: Mask render tool

                It seems to be that I saved the toolbar with toolbar visibility off. After drag&drop you should find the toolbar at the Rhino toolbar options, but turned off. Quick solution: enable it there.

                I fixed it at the download now.
                www.simulacrum.de - visualization for designer and architects

                Comment


                • #9
                  Re: Mask render tool

                  It works great, thanks a lot! It really saves some time

                  Comment


                  • #10
                    Re: Mask render tool

                    Originally posted by RVallieres
                    While this looks great and works fine,there is obviously something I am missing,when I need to have a selection for a particular material all I do, is set the alpha contribution to 0,in the material option,for that material.This gives me a perfect selection which I can then tweak in photoshop .
                    Last I useded the alpha contribution for an other use (I needed a whole in the image) and found, that a bug cause a wrong calculated GI some times - so be careful.

                    www.simulacrum.de - visualization for designer and architects

                    Comment


                    • #11
                      Re: Mask render tool

                      I believe this is known (it looks like I've seen this issue before), but when I talked to Joe about it he said that it was a limitation with how this option currently works. Basically, the material itself is set to have an alpha of 0, but that alpha is overridden when the initial camera rays hit the object so that it actually renders. IOW, its not just that the alpha channel is overridden, but the whole material. Therefore when any subsequent rays are cast (gi, light, reflections) the material is essentially invisible.

                      One work around I found for this was to precalculate the GI passes. That should help with the lighting side effects.
                      Damien Alomar<br />Generally Cool Dude

                      Comment


                      • #12
                        Re: Mask render tool

                        Last I used this workaround too - cost some extra time to find the "known" bug, but I got what I needed. I wished all bugs would be visible on an official list so that extra work late at night under a tight deadline could be avoided. :
                        www.simulacrum.de - visualization for designer and architects

                        Comment


                        • #13
                          Re: Mask render tool

                          I'd like that too, but there's reasons why these kinds of lists aren't made in the first place. They are typically very hard to maintain, tend to require much more information than "bug A, bugB", and generally cause more harm than good. Our internal methods for bug tracking really aren't any use to the end user, so its not something that we can just translate and post. I wish there were a real solution for this, but I'd rather spend the effort on fixing bugs rather than tell the world about them all

                          By the way, there's nothing preventing you from starting your bug list back up again. However, since your bug list hasn't been updated in more than 2 years, it goes to show that its not as easy to maintain as it seams. I'm not pointing fingers, I'm just saying that if it was so easy it would be already done.
                          Damien Alomar<br />Generally Cool Dude

                          Comment


                          • #14
                            Re: Mask render tool

                            From other forums I know a bug list is possible and there not the user write the bug list ...
                            Also, if the bugs are not fixed within a short time frame, than it would be a nice gesture to post a list.
                            www.simulacrum.de - visualization for designer and architects

                            Comment


                            • #15
                              Re: Mask render tool

                              Would you mind posting the links to those lists? I keep up with a number of forums and haven't seen any...I don't see a bug list on the Rhino wiki either.

                              To add, I did add a known issues section to the last SR, that at least has a list of some bugs. However, most people rarely take a look at the release notes.
                              Damien Alomar<br />Generally Cool Dude

                              Comment

                              Working...
                              X