Author Topic: Corona and same name materials  (Read 2221 times)

2018-06-01, 09:07:07

masterzone

  • Active Users
  • **
  • Posts: 165
  • CGI Generalist since 1998
    • View Profile
    • ZuccherodiKanna
Maybe you noticed that Corona (and not only Corona) doesn't recognize if in your scene you have some materials with the same name. If you paste in the scene some object with same name material (es: mat mat mat mat mat) when you paste it in other new scene with mat mat mat mat, it issue drive you crazy.
To avoid it, our software developer from c4dzone.com, created a simple script that check if you have same name materials and append a number. So before paste object in the scene, give to all mat the same name (es: boing) and the plugin give to all materials boing_01 boing_02 and paste object on your scene without problems. (you must move manually your texture to the target scene as well)

| www.c4dzone.com
| Italian Maxon Training Center
| www.zuccherodikanna.com
| Italian based CGI Studio

2018-06-01, 10:14:59
Reply #1

houska

  • Former Corona Team Member
  • Active Users
  • **
  • Posts: 1512
  • Cestmir Houska
    • View Profile
As you are correctly saying, this issue is caused by Cinema4D, not Corona. I looked at your script and it seems to be incorrect. As an example, if you'll have a list of materials called "boing_1, boing, boing", the script will rename the third material to "boing_1", so you'll end up with "boing_1, boing, boing_1".

2018-06-01, 10:16:44
Reply #2

masterzone

  • Active Users
  • **
  • Posts: 165
  • CGI Generalist since 1998
    • View Profile
    • ZuccherodiKanna
I forward your tips to our developer :)
| www.c4dzone.com
| Italian Maxon Training Center
| www.zuccherodikanna.com
| Italian based CGI Studio

2018-06-01, 14:39:21
Reply #3

masterzone

  • Active Users
  • **
  • Posts: 165
  • CGI Generalist since 1998
    • View Profile
    • ZuccherodiKanna
here the new script :)
| www.c4dzone.com
| Italian Maxon Training Center
| www.zuccherodikanna.com
| Italian based CGI Studio

2018-06-01, 14:47:34
Reply #4

houska

  • Former Corona Team Member
  • Active Users
  • **
  • Posts: 1512
  • Cestmir Houska
    • View Profile
Ok, so now 1 in 100000 renamed materials will have the same name :-D Ever heard of the Birthday paradox?
« Last Edit: 2018-06-01, 15:00:23 by houska »

2018-06-02, 00:55:20
Reply #5

indexofrefraction

  • Active Users
  • **
  • Posts: 110
    • View Profile
hum... how i understand it...
custom/scripted numbering of (un-identical) materials is not really related to corona

but if objects are copied from and back to a document corona materials duplicate.
this should not happen and this (identical) material doubling should be fixed,
"remove duplicate materials" should detect these materials, too.

anyway, i'm sure that has been reported already
« Last Edit: 2018-06-02, 09:34:09 by indexofrefraction »