Itoo Software Forum

Author Topic: render mask  (Read 9416 times)

LE3877

  • Newbie
  • *
  • Posts: 4
render mask
« on: April 01, 2014, 03:48:01 AM »
how to render mask/alpha for forest pro object? let say i got a forest, after render i need adjust tree color, so i want quick render mask for that, how to do that?
using "render mask" plugin cant render it out, just show black.

Michal Karmazín

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2447
Re: render mask
« Reply #1 on: April 01, 2014, 10:07:15 AM »
Hi,

There are many ways how to get the "mask" for the object rendered. One of most universal ways is by assigning Object ID. By right click on selected object please select in Quad menu Object properties ... then in General tab in G-Buffer section you can change the Object ID from 0 to any different. Then by adding Object ID in Render Elements list you'll get it (in case of VRay it's called VRayObjectID). Please check attached screenshots. It´s showing settings for VRay renderer but in case of Object ID, is very universal and the workaround is always almost the same.

As V-Ray user I should mention that in 3.0 version there is new very powerful feature Render mask which allows you rendering just of parts needed. You can check it here.

I hope it helps you.

3dpixel

  • Newbie
  • *
  • Posts: 6
Re: render mask
« Reply #2 on: April 09, 2014, 01:59:01 PM »
HI,

Dos anyone know why the RenderMask plugin is not working anymore with Forest Pro? I don't know when it change but it used to work fine with trees and grass :-)

As LE3877 says selecting a Forest Pro object with the RenderMask plugin only turns out a black render. However putting like a box on a grass field, selecting the box, RenderMask will mask out the grass in front of the box so somehow it can still see the grass??

Using the new Render Mask feature in Vray 3.0 is not an option as it's way to slow!

/3dpixel

Michal Karmazín

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2447
Re: render mask
« Reply #3 on: April 10, 2014, 12:52:17 PM »
Hi,

We did some testing with RenderMask plugin to see why it´s not working properly for Forest objects. The way how the Render Mask plugin works is by modifying object's materials.

Unfortunately this is not possible for Forest object as it's using it's proper material which can´t be accessed by the script. Once instanced with Forest Tools all works fine as the material is no more "blocked".

I'm afraid actually there is not a workaround for this problem. Sorry for any inconvenience caused.

Kind regards,
« Last Edit: April 10, 2014, 01:16:05 PM by Michal Karmazín »

3dpixel

  • Newbie
  • *
  • Posts: 6
Re: render mask
« Reply #4 on: April 10, 2014, 03:02:47 PM »
Hi Michal!

Thanks for testing out RenderMask! Sadly enough the RendeMask plugin is a big part of our workflow.

So the reason that some scatter objects from FP works with RenderMask is that they are custom objects? Would it be possible to have some kind of "FP material" that one could  apply to the FP object before rendering with RenderMask?

The workaround with Forest Tools works ok for small areas with scrubs/ trees but for grass it's not an option.

Howevere we did find a workaround for FP grass that works in some situations. While Rendermask dos mask out in black, objects behind the grass we just use a plane and render that gives us a negative mask.

/3dpixel


Michal Karmazín

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2447
Re: render mask
« Reply #5 on: April 10, 2014, 05:48:37 PM »
Hi,

There IS possible workaround to get the RenderMask plugin to work with Forest Pack objects. It can be archived by unchecking the Consolidate Materials option. This deactivate the automatic rebuild function for the material applied on Forest object. This is the reason why the RenderMask is not working - Forest object always automatically rebuild it's material and assign it on itself.

But please note that now with Consolidate Materials disabled after applying any change in Geometry list the material needs to be "manually" rebuild and reassigned so you need to repeat the process on every change in the Geometry list.

Hope this helps you.

Kind regards,
« Last Edit: April 10, 2014, 05:56:09 PM by Michal Karmazín »

3dpixel

  • Newbie
  • *
  • Posts: 6
Re: render mask
« Reply #6 on: April 11, 2014, 12:20:46 PM »
Hi Michal!

This is definitely a workable solution! ...Thanks!

...so the inventor of Render Mask can "solve" the problem by adding to the script to tick off "Consolidate Materials" before render start and then back on after render end?

/3dpixel

KL4762

  • Newbie
  • *
  • Posts: 6
Re: render mask
« Reply #7 on: November 10, 2014, 06:32:49 AM »
Hi Michail,
Sorry, we tried to use your suggestion with Object ID and VrayObject ID element as well MiltiMatte Element but didn't get any results.
Could you please confirm that your option still works?
We are using 3ds max 2014, Vray 3.00.07  and Forest Pro 4.2.5
Thanks
Dmitry

Michal Karmazín

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2447
Re: render mask
« Reply #8 on: November 10, 2014, 11:43:24 AM »
Hi Dmitry,

Just have done testing with the same configuration and all works as expected. You can do a quick test with the VRayWireColor element, if that's working, most probably you don't have your Object IDs assigned. If you don't want to do it manually, there are several handy scripts like IDTool.

Kind regards,

KL4762

  • Newbie
  • *
  • Posts: 6
Re: render mask
« Reply #9 on: November 10, 2014, 12:54:39 PM »
Hi Michal,
Thanks for your quick reply.
I am attaching the screenshot from our test with 3 different VRay render elements such as VRayObjectID, VRay MultiMatteElement and VRayWire Color.
We have selections of original geometry only
Are we missing anything?
Thank you in advance
Dmitry

Michal Karmazín

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2447
Re: render mask
« Reply #10 on: November 10, 2014, 01:18:49 PM »
Hi Dmitry,

From your screenshot I suppose, you want the Forest object to inherit object IDs from its items.

The Object ID needs to be assigned for the Forest object, as in V-Ray, Forest is handled as an unique object with its own ID, and it's not possible inherit or assign multiple IDs.

Kind regards,

KL4762

  • Newbie
  • *
  • Posts: 6
Re: render mask
« Reply #11 on: November 11, 2014, 02:08:18 AM »
Ohh, I see.
Thanks for explanation.
So the only case to inherit IDs is to assign Material IDs to materials of the original geometry.
That might be problematic sometimes when the original geometry is complicated (Group, another Forest object or Complex geometry like a vegetation, what we are working on now)
Any other solutions may be?
Thanks

Michal Karmazín

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2447
Re: render mask
« Reply #12 on: November 11, 2014, 06:13:47 PM »
Hi,

Actually, in the new Forest Pack 4.3 it'll be possible with help of Forest Tools. Forest Tools->Instantiate will copy User Properties, Object ID and wireframe color from the source object.

Kind regards,