Author Topic: Corona Material/Lights Converter (legacy)  (Read 1088879 times)

2014-10-18, 14:56:45
Reply #315

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
Thanks for the new update, also i would like to see a  conversion button for CoronaNormatex instead of simple Normal map in the scene to avoid the alert message.

Alert message? There should not be any message at all, if there is it is likely that it's a maxscript error (a bug). I also don't understand what you are proposing, there should be no user interaction needed for anything normal map related - it should all convert automatically.

The way it is always creates incorrect stuff with maps that are 1=100 for reason, like normal map. After conversion, it ends up being 3.333, 330perc. stronger than it should be.
That's right, I didn't think about that - a good reason to change the behavior. Will be updated in the next version. Thanks for noting :)
Any sufficiently advanced bug is indistinguishable from a feature.

2014-10-18, 15:46:21
Reply #316

Chakib

  • Active Users
  • **
  • Posts: 787
  • Corona Omnomnomer !
    • View Profile
Thanks for the new update, also i would like to see a  conversion button for CoronaNormatex instead of simple Normal map in the scene to avoid the alert message.

Alert message? There should not be any message at all, if there is it is likely that it's a maxscript error (a bug). I also don't understand what you are proposing, there should be no user interaction needed for anything normal map related - it should all convert automatically.


Well I used v20 to convert the scene and the normal map alert message still appear.

2014-10-18, 15:57:41
Reply #317

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
That's odd since the code for the warning has been deactivated back in v0.14 and even been removed later. There is no way it could happen in v0.20. Are you sure you are using the correct scriptfile?

The only warning / message box that is still in there is for Autodesk Materials.
Any sufficiently advanced bug is indistinguishable from a feature.

2014-10-18, 16:04:32
Reply #318

Chakib

  • Active Users
  • **
  • Posts: 787
  • Corona Omnomnomer !
    • View Profile
That's odd since the code for the warning has been deactivated back in v0.14 and even been removed later. There is no way it could happen in v0.20. Are you sure you are using the correct scriptfile?

The only warning / message box that is still in there is for Autodesk Materials.

I've used some Railclone sidewalk models ( vray mat ) and then converted with v20 and the Normal map still in their mats.

i'll try again in a new simple scene with these models and let you know.
« Last Edit: 2014-10-18, 16:09:56 by Chakib »

2014-10-18, 16:14:03
Reply #319

Chakib

  • Active Users
  • **
  • Posts: 787
  • Corona Omnomnomer !
    • View Profile
Ok after testing the same model in a new empty scene, v20 did convert it correctly with the Coronanormaltex, well that's weird because i did the same in an exterior scene ( roads car palms dunes etc ) and it converts only to Corona mat but it kept Normal map in bump slot :/

2014-10-18, 16:21:01
Reply #320

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
I thought about it and there might actually be a problem =/
I don't have any experience with railclone so far but for example forestpack is referencing it's materials in a way that the converter can not always convert them. If they're explicitly assigned to the material slots in forestpack then they are somehow not caught by the routines I use to grab every (other) material / map in max. You can pass this problem by clearing out the material slots in fp (so they take the ones that were assigned to the scatter objects) but I don't know how railclone is handling it.
It could also be the case that it works as long as those materials are still in some material editor slots. Problem is: I can't do much about it..
Any sufficiently advanced bug is indistinguishable from a feature.

2014-10-18, 18:22:44
Reply #321

Chakib

  • Active Users
  • **
  • Posts: 787
  • Corona Omnomnomer !
    • View Profile
I thought about it and there might actually be a problem =/
I don't have any experience with railclone so far but for example forestpack is referencing it's materials in a way that the converter can not always convert them. If they're explicitly assigned to the material slots in forestpack then they are somehow not caught by the routines I use to grab every (other) material / map in max. You can pass this problem by clearing out the material slots in fp (so they take the ones that were assigned to the scatter objects) but I don't know how railclone is handling it.
It could also be the case that it works as long as those materials are still in some material editor slots. Problem is: I can't do much about it..

Well before converting the railclone model's materials with the script i've converted them all to edit poly so it won't be any link with the plugin, normally it should convert it successfully, anyway thanks for the new update  !

2014-10-19, 12:12:37
Reply #322

higgledyhiggles

  • Active Users
  • **
  • Posts: 63
    • View Profile
Many thanks for continued support of this script..
What`s the chance it could also cap the white levels of diffuse colour since in the performance wiki it says try to keep to 180 max.??
cheers,
higgles

2014-10-19, 13:11:40
Reply #323

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
Zero ;) . First of all, it would only work with colors, no textures, since each of those would have to be sampled individually (you can imagine how slow it would be). But even if it were possible or if you only would clamp colors it wouldn't make much sense in my opinion. You can't simply make things darker or clamp channels. You could clamp colors like "pure red" or just make every color 180 max in magnitude, but it's not what you should be doing if you're trying to achieve useful albedo. Your brighter colors would clamp to 180 max but all the colors close to 180 would stay exactly the same, probably resulting in washed out renderings. If people want to do it... well.. not very difficult via scripting, but I won't include that in the converter, sorry ;-)
Any sufficiently advanced bug is indistinguishable from a feature.

2014-10-20, 09:57:17
Reply #324

higgledyhiggles

  • Active Users
  • **
  • Posts: 63
    • View Profile
Damn, I`ve been spanked. I`ll get my coat.

2014-10-22, 13:37:56
Reply #325

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
New version. Bump values are now converting 100.0 -> 1.0 (e.g. default VrayMtl goes to 0.3)

changelog:
*v0.22
  • overhauled bump map conversions. Resulting values are more consistent with user expectations
  • removed conversion modes
Any sufficiently advanced bug is indistinguishable from a feature.

2014-10-24, 16:53:05
Reply #326

Juraj

  • Active Users
  • **
  • Posts: 4743
    • View Profile
    • studio website
Can this version be used for 7.1 public users or only dailies ? (asking because of GGX).
Please follow my new Instagram for latest projects, tips&tricks, short video tutorials and free models
Behance  Probably best updated portfolio of my work
lysfaere.com Please check the new stuff!

2014-10-24, 17:03:29
Reply #327

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
Should be working for 7.1 :)
Actually, I would appreciate if some people test it. Normal maps etc will still convert the old way if not a daily build (fallback mode) but apart from that, everything should be working fine :)
Any sufficiently advanced bug is indistinguishable from a feature.

2014-10-24, 17:22:37
Reply #328

Juraj

  • Active Users
  • **
  • Posts: 4743
    • View Profile
    • studio website
Thank you :- ) good. Well perhaps then I can ask for future maybe conversion from Ashikmin to GGX (and switch legacy shading also off in advancement tab), since now the materials that were previously made before GGX-Daily builds are left alone.
I convert these manually but it takes a lot of time.
Please follow my new Instagram for latest projects, tips&tricks, short video tutorials and free models
Behance  Probably best updated portfolio of my work
lysfaere.com Please check the new stuff!

2014-10-24, 18:20:20
Reply #329

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
I convert these manually but it takes a lot of time.
Don't! :D That's why I always urge people to learn at least basic scripting (which you could actually learn in a fraction of the time you're spending to fix those kind of issues ;) )

Paste this in the pink textbox in the left bottom corner and press enter:
Code: [Select]
for o in (getclassinstances CoronaMtl) do o.bsdf = 32 : Ashikhmin-Shirley
3: GGX

You can already switch the legacy/new energy conservation mode in the script. I will also add BSDF in the next version.
Any sufficiently advanced bug is indistinguishable from a feature.