Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] Feature Requests => [Max] Resolved Feature Requests => Topic started by: archimi on 2018-06-21, 16:07:11

Title: VFB does not change when ObjectID change
Post by: archimi on 2018-06-21, 16:07:11

Hello,

when I change the ID of the object (G-Buffer), the VFB does not change. It is not very practical because I have to stop and restart it every time I change the value.
Is it possible to change this or is it a limit of 3dsMax ?
Title: Re: VFB does not change when ObjectID change
Post by: maru on 2018-06-28, 14:04:51
I think this is a 3ds max limitation, but we will see what can be done about it.
Title: Re: VFB does not change when ObjectID change
Post by: pokoy on 2018-06-28, 14:07:48
As far as I know the Object Properties dialog doesn't send any notifications on changes and is only queried on render begin - this is a Max limitation.
You can use Object Properties 2.0 however, this one will properly update with IR (and it's non-modal so can be open while working with Max) - http://www.scriptspot.com/3ds-max/scripts/object-properties-2-0 (http://www.scriptspot.com/3ds-max/scripts/object-properties-2-0)
Title: Re: VFB does not change when ObjectID change
Post by: Ondra on 2018-07-02, 15:41:27
even if max sent notification, this would be impossible for us without re-rendering, sorry
Title: Re: VFB does not change when ObjectID change
Post by: archimi on 2018-07-23, 12:42:06
Thank you for your answers !
The solution proposed by Pokoy does not work, but it seems to be a good way to develop a script to do that.
Title: Re: VFB does not change when ObjectID change
Post by: pokoy on 2018-08-13, 10:04:14
Sorry for the late replay, missed your post. I know from testing that Object Properties 2.0 worked fine with IR opposed to the max internal properties dialog.
If you wanted this to work with regular rendering, that doesn't work for obvious reasons.
Title: Re: VFB does not change when ObjectID change
Post by: archimi on 2018-08-15, 12:02:17
It's weird what you're telling me, because I've just tried again, and when I change the ID value with this program (Object Properties 2.0), it does not update the interactive rendering.
I had to add this line of code for it to work:

Code: [Select]
fn Updateobj theprop theState =
(
with redraw off
(
local s = ("Object Properties - " + theprop as string)
undo s on
for o in selection do setproperty o theprop thestate
)

if CoronaRenderer.CoronaFp.getRenderType () > 1 then CoronaRenderer.CoronaFp.reparseInteractive () -- add by me !

)

In the end I preferred to make a script more adapted to my way of working (see attached file)
I made a short video to show how it works.
I hope this script can help other users who like me work a lot with IDs !

Michel
Title: Re: VFB does not change when ObjectID change
Post by: pokoy on 2018-08-15, 13:36:14
Ah sorry, I totally forgot the original script had to get an extra line of code to update properly (which the creator of that script added on request on another forum) - my apologies!
Glad you have it working now.
Title: Re: VFB does not change when ObjectID change
Post by: archimi on 2018-08-15, 15:38:53
There is no problem. It will have allowed me to develop my own tool and learn things ! ;-)

Which forum are you talking about?
Title: Re: VFB does not change when ObjectID change
Post by: pokoy on 2018-08-15, 15:49:08
Honestly, I forgot. I only remember there was a thread about the legacy properties dialog and we got some help from him.