Author Topic: Can CoronaSelectMtl hook up to Render Elements?  (Read 2959 times)

2020-10-14, 16:27:05

alexyork

  • Active Users
  • **
  • Posts: 699
  • Partner at Recent Spaces
    • View Profile
    • RECENT SPACES
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,
Alex York
Partner
RECENT SPACES
recentspaces.com

2020-10-14, 16:58:29
Reply #1

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12711
  • Marcin
    • View Profile
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?
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2020-10-14, 17:01:48
Reply #2

alexyork

  • Active Users
  • **
  • Posts: 699
  • Partner at Recent Spaces
    • View Profile
    • RECENT SPACES
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!
Alex York
Partner
RECENT SPACES
recentspaces.com

2020-10-14, 17:14:51
Reply #3

Frood

  • Active Users
  • **
  • Posts: 1903
    • View Profile
    • Rakete GmbH
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


Never underestimate the power of a well placed level one spell.

2020-10-14, 17:17:51
Reply #4

alexyork

  • Active Users
  • **
  • Posts: 699
  • Partner at Recent Spaces
    • View Profile
    • RECENT SPACES
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!).
Alex York
Partner
RECENT SPACES
recentspaces.com

2020-11-20, 14:47:40
Reply #5

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12711
  • Marcin
    • View Profile
Logged as a more general "easy rendering of variants via render elements" with some example use cases.

(Internal ID=598551377)
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us