Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] Feature Requests => Topic started by: alexyork on 2020-10-14, 16:27:05

Title: Can CoronaSelectMtl hook up to Render Elements?
Post by: alexyork on 2020-10-14, 16:27:05
Hey devs,

Maybe I can't find out the method if it does exist, but can the CoronaSelectMtl (or SelectMap...?) be hooked up/exposed to a Render Element somehow, so we can automate the rendering of variants of an object/collection of objects, each with a different Select ID?

Example: I have a client's designed tea pot with 5 diff colour options the client wants to see. I would like to add a render element (maybe a variant of the Beauty render element?) and tell it to use SelectID 1. Same again for ID2, same again for the rest etc.  Or something along these lines...

Cheers,
Title: Re: Can CoronaSelectMtl hook up to Render Elements?
Post by: maru on 2020-10-14, 16:58:29
The idea is to render those different variants in one go? If so, I don't think that's possible, because the shading is dependent on the texture. So if there is some light shining on the teapot, and bounced back onto the table, the bounced light will have a different color depending if you are rendering the teapot with a blue or red diffuse texture. So it would require something like LightMix, but not just for lights...

You can create multiple CTexmap render elements and drop different textures in them. Maybe you can somehow use these CTexmap elements to replace your textures in the beauty composition?
Title: Re: Can CoronaSelectMtl hook up to Render Elements?
Post by: alexyork on 2020-10-14, 17:01:48
Hey Maru. Yep that's the idea. It's not necessary that it would all work for multiple IDs within one single element, if that's impossible. But calling out an element per ID would be awesome...

Your work-around we tried but CTexmap seems to just apply a uniformly-shaded lighting effect over everything (which is awesome for certain tasks - we use this a lot!) but wouldn't work here. The general idea is to be able to semi-automate different material options in a single set of elements. The SelectMtl seems like such a powerful tool but we can't quite harness that power!
Title: Re: Can CoronaSelectMtl hook up to Render Elements?
Post by: Frood on 2020-10-14, 17:14:51
But if it is more about automating stuff and no need to render only once particularly, then just animate the state of the select material(s) (autokey on, move to another frame, change state). And render a frame sequence of five frames -  maybe in combination with any "render selected" variant (pot selected) to speed it up?


Good Luck


Title: Re: Can CoronaSelectMtl hook up to Render Elements?
Post by: alexyork on 2020-10-14, 17:17:51
But if it is more about automating stuff and no need to render only once particularly, then just animate the state of the select material(s) (autokey on, move to another frame, change state). And render a frame sequence of five frames -  maybe in combination with any "render selected" variant (pot selected) to speed it up?


Good Luck

This is a really good idea. Thanks! (Request to have SelectMtl/Map hooked up to a render element somehow still stands tho!).
Title: Re: Can CoronaSelectMtl hook up to Render Elements?
Post by: maru on 2020-11-20, 14:47:40
Logged as a more general "easy rendering of variants via render elements" with some example use cases.

(Internal ID=598551377)