Author Topic: [DEPRECATED] Material Converter  (Read 34035 times)

2012-09-11, 13:20:16

GroveR_GoL

  • Active Users
  • **
  • Posts: 28
    • View Profile
    • www.gg3dcg.ru
This thread is for archive purposes only, use the convertor here: http://corona-renderer.com/forum/index.php/topic,126.0.html

Hi everyone. I decided to create material converter from Vray materials to corona.
So here is the first version.
Script converts all scene materials which are:
VrayMtl
VrayLightMtl
Vray2SidedMtl
MultiMaterial
Be carefull and save your scene before converting script may crash max.
« Last Edit: 2013-03-28, 11:05:02 by Keymaster »

2012-09-11, 13:31:42
Reply #1

DeadClown

  • Global Moderator
  • Active Users
  • ****
  • Posts: 1434
    • View Profile
    • racoon-artworks
It would be nice if you could leave your code unencrypted. Related to their "TODO" naming, Corona Material maxscript functions will sure be changed somewhat soon and it would be much easier if such a converter could be improved by several people.
I started writing a converter too this weekend but there are 1 or 2 map slots which are not working properly and I'm not finished supporting finalRender and MentalRay materials. I also included converting maps (like vraydirt, vraycolor, etc) but there seem to be some native max maps which will lead to a crash with corona. I'm still trying to figure out which ones.
Any sufficiently advanced bug is indistinguishable from a feature.

2012-09-11, 13:40:59
Reply #2

Javadevil

  • Active Users
  • **
  • Posts: 356
    • View Profile



Dead Clown if you can convert Arch&Design to Corona that would be awesome !

I've converted so many scenes over the last couple of months and its a pain.

I've been after a material converter for months now.

I'm not to fussed about material settings, just mainly mapping paths.

Nice work GroveR, I'll test this out with the couple of Vray scenes I have.


thanks

2012-09-11, 13:45:08
Reply #3

GroveR_GoL

  • Active Users
  • **
  • Posts: 28
    • View Profile
    • www.gg3dcg.ru
Ok, here is unencrypted code:

2012-09-11, 13:56:40
Reply #4

DeadClown

  • Global Moderator
  • Active Users
  • ****
  • Posts: 1434
    • View Profile
    • racoon-artworks
Javadevil: I'll try to get Arch&Design mats done next weekend, currently there's no time for scripting ;)
GroveR_GoL: Thanks! :)
Any sufficiently advanced bug is indistinguishable from a feature.

2012-09-11, 15:46:41
Reply #5

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 8830
  • Turning coffee to features since 2009
    • View Profile
Hi,
this is great! If you need any support from my side, let me know. I can also distribute it bundled with future builds.

BTW: I'll be renaming and documenting all the parameters for the next build, so they have consistent meaningful names.
Rendering is magic.
Private scene uploader | How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2012-09-11, 15:57:06
Reply #6

DeadClown

  • Global Moderator
  • Active Users
  • ****
  • Posts: 1434
    • View Profile
    • racoon-artworks
Very good :) If you could provide a little "before and after" naming scheme it would be really helpful for us to replace all those already used properties in our scripts.
Any sufficiently advanced bug is indistinguishable from a feature.

2012-09-11, 17:38:09
Reply #7

DeadClown

  • Global Moderator
  • Active Users
  • ****
  • Posts: 1434
    • View Profile
    • racoon-artworks
[edit] v0.07: latest version here: http://corona-renderer.com/forum/index.php/topic,66.msg522.html#msg522

Ok, I added some notes and versioning information to my Script for a first testrun.
I started with Vrays Scene converter script which delivered some good base-functions but there's of course not much left now ;)
MR ArchAndDesign material is not really tested yet, that would be a perfect job for Javadevil ;-)

Currently the Script is able to convert:
- Standard mat
- VrayMtl
- VRayBlendMtl (just taking the basemat)
- VRayLightMtl
- VRay2SidedMtl (uses material 1 and sets translucency to values/maps from 2Sidedmtl)
- MR_ArchAndDesign
- Vray-specific maps

There are two available settings:
- convert Specular settings from Standard Material to reflection in Corona
- An experimental function to convert Vrays Glossy values to "more or less" similar looking glossys in Corona

RefractionIor mapslot is currently not wired correctly - Coronas map slot is pointing to the reflection ior slot, so I'm unable to convert this.
Be careful with Vray Light materials, it will try to convert those settings and generate an emission slot but this will crash 3dsmax when rendering (coronas emission slot bug). You might want to comment this out while the bug exists.
« Last Edit: 2013-03-27, 16:53:12 by DeadClown »
Any sufficiently advanced bug is indistinguishable from a feature.

2012-09-11, 17:40:00
Reply #8

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2559
  • Just another user
    • View Profile
    • My Portfolio

2012-09-11, 21:33:26
Reply #9

DeadClown

  • Global Moderator
  • Active Users
  • ****
  • Posts: 1434
    • View Profile
    • racoon-artworks
little update
- restructured conversion functions, much better now
- fixed translucency and anisotropy bugs in ArchAndDesign function
- added a sorted list of all material functions as a start point for other materials (at the end of the file)
« Last Edit: 2013-03-27, 16:53:21 by DeadClown »
Any sufficiently advanced bug is indistinguishable from a feature.

2012-09-11, 22:51:27
Reply #10

Paul Jones

  • Active Users
  • **
  • Posts: 169
    • View Profile
fantastic work guys :)

2012-09-11, 23:32:58
Reply #11

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 8830
  • Turning coffee to features since 2009
    • View Profile
Have you considered using more standard OSS tools, for example versioning & publishing the script somewhere like github or sourceforge?
Rendering is magic.
Private scene uploader | How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2012-09-11, 23:47:47
Reply #12

DeadClown

  • Global Moderator
  • Active Users
  • ****
  • Posts: 1434
    • View Profile
    • racoon-artworks
mhh... Never used any of these things. All my "bigger" Scripts are inhouse tools so I've never considered such things. Furthermore, I'm just a self-taught maxscripter, never done any serious programming yet ;)
Btw, just finished fR_Advanced and fR_Architectural ;) I just don't have finalRender for 2012 installed, so I can't test it until tomorrow. So prepare for another version ;) But it will be the last one until the new maxscript function names will be released (unless there are some serious bugs of course)
« Last Edit: 2012-09-11, 23:55:45 by DeadClown »
Any sufficiently advanced bug is indistinguishable from a feature.

2012-09-12, 00:05:47
Reply #13

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 8830
  • Turning coffee to features since 2009
    • View Profile
I haven't either, but it looks like good idea, and helps you to keep track of the releases/lets other download it easily. You should also specify a licence, so the scripts can be safely used. I recommend Apache licence, if you dont mind other making their own versions of the script ;)
Rendering is magic.
Private scene uploader | How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2012-09-12, 00:35:33
Reply #14

Javadevil

  • Active Users
  • **
  • Posts: 356
    • View Profile

Dead clown,


I'll add errors I get here.

Heres the first Exception.

1 - Unable to convert : 1.4 type boolean.


If you  add an option to convert a selection instead of the whole scene it would make it easier to find the material thats causing the exceptions.

@Rawalanche haha, thats pretty much how I felt.