Chaos Corona Forum

General Category => General CG Discussion => Topic started by: Charlie Nicols on 2017-04-05, 17:48:20

Title: IDTool for Corona?
Post by: Charlie Nicols on 2017-04-05, 17:48:20
Use a script for MAX to set up all my object ID's and someone developed it to also add the Vray elements. Would anyone be able to make a corona version? Would be amazing.

http://tepavicharov.com/?p=49
Title: Re: IDTool for Corona?
Post by: Nik on 2017-04-10, 09:31:34
It works for any renderer because it changes 3dsmax native property "gbuffer object id". I use this script with Corona and had no problems
Title: Re: IDTool for Corona?
Post by: Charlie Nicols on 2017-04-10, 12:19:42
The tool work yes, but not in its entirety.

There is a button at the bottom of the script that automatically creates the VRAY render elements to correspond with the ID's.Having this for corona would be great.
Title: Re: IDTool for Corona?
Post by: Nik on 2017-04-10, 12:24:29
So how it should work? There is no object ID render element in Corona. We have only Cmasking_mask where we can get 3 object IDs maximum.
Title: Re: IDTool for Corona?
Post by: Charlie Nicols on 2017-04-10, 12:32:40
Well basically say you use the tool to make 13 object ID's it then creates multiple Vray elements with ID'd from 1-13. For corona it would do the same just using the corona mask element. 
Title: Re: IDTool for Corona?
Post by: Nik on 2017-04-10, 12:36:08
Okay I can do that. Later.
I will post it here
Title: Re: IDTool for Corona?
Post by: Charlie Nicols on 2017-04-10, 12:40:28
Great! Thanks.
Title: Re: IDTool for Corona?
Post by: Nik on 2017-04-10, 15:29:27
It seems I did what you want.
I added one more button that creates mask CMasking_Mask elements. One element for one Object ID.
And for example if element "Object ID 7" is already created then id 7 will be skipped and won't create duplicate.

Macro is attached.
Title: Re: IDTool for Corona?
Post by: Charlie Nicols on 2017-04-10, 15:40:47
Humm when I try to create the Corona Masks it gives me the error "Use Corona Render"

Currently it is - Corona 1.5(HF 2)
Max 2016
Title: Re: IDTool for Corona?
Post by: Nik on 2017-04-10, 15:51:33
Sorry, name pattern was changed after 1.5 :) Fixed and updated. Same attachment in previous post
Title: Re: IDTool for Corona?
Post by: Charlie Nicols on 2017-04-10, 16:01:06
Nik that's great! Thanks a lot, Works a charm. Hope it gets posted somewhere so others can enjoy.
Title: Re: IDTool for Corona?
Post by: Giona on 2017-04-12, 16:02:52
It seems I did what you want.
I added one more button that creates mask CMasking_Mask elements. One element for one Object ID.
And for example if element "Object ID 7" is already created then id 7 will be skipped and won't create duplicate.

Macro is attached.

Hello Nik, is it possible to have a button that create several CMasking_Mask elements in RGB mode instead of Monochromatic?
In this way will be easier to select masks and there will be less masking elements if we set a lot of different IDs.

Thanks for your help!
Title: Re: IDTool for Corona?
Post by: Nik on 2017-04-12, 16:07:53
maskelement1: R-id1, G-id2, B-id3
maskelement2: R-id4, G-id5, B-id6
etc

Like this?
Title: Re: IDTool for Corona?
Post by: Giona on 2017-04-12, 16:10:50
Exactly. It would be perfect this way!
Title: Re: IDTool for Corona?
Post by: Nik on 2017-04-12, 19:22:14
Try this. In attachment.

I've made two buttons for Mono and RGB.
If some IDs are already used in RGB or Mono Masks then these IDs will be skipped.
And element naming is changed a little.

Author would make such features different or even better, but I guess he's not interested in updates now. Maybe not.
Anyway, I don't mind to update this script from time to time and I enabled notification in this topic.
Title: Re: IDTool for Corona?
Post by: Giona on 2017-04-12, 22:24:21
Nik, it works perfectly!
Thank you for your time. It will be usefull for a lot of people here!
Title: Re: IDTool for Corona?
Post by: Eder_Xavier on 2017-04-13, 05:48:21
Great tool, tnx a lot :) :)
Title: Re: IDTool for Corona?
Post by: alias_marks on 2018-05-25, 20:33:50
Just ran across, this.  Super helpful.  Thanks Nik!
Title: Re: IDTool for Corona?
Post by: JViz on 2018-10-05, 08:45:18
this script is very very helpful. thanks man!
Title: Re: IDTool for Corona?
Post by: Place on 2018-10-05, 15:56:09
Amazing!
Do you think is it possible to add the id and render elements for all the scene materials?
I think it would be just perfect with this feature

Thank you very much for your work!
Man