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

2012-09-19, 12:09:30
Reply #45

Paul Jones

  • Active Users
  • **
  • Posts: 168
    • View Profile
Great script guys! ANyone got a script for deleting FOREVER materials that are not assigned to any object from Slate?

2012-09-19, 21:23:09
Reply #46

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
PaulJones: Unfortunately not, I had a quick look on the maxscript helpfiles and it should be possible, but no "one line solution" ;)
Javadevil: I downloaded the TheaRender demo and made a function for converting but... all those maxscript commands seem to be broken. I can get a list of all the commands I need but they are not accessible, or to be more precise, it does not recognize them when I try to read values ("Unknown property: "Diffuse" in...") Those materials and the whole exporter is a pain in the a** anyways... They really want 40 euros for that?!
Any sufficiently advanced bug is indistinguishable from a feature.

2012-09-20, 03:06:59
Reply #47

Javadevil

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

Javadevil: I downloaded the TheaRender demo and made a function for converting but... all those maxscript commands seem to be broken. I can get a list of all the commands I need but they are not accessible, or to be more precise, it does not recognize them when I try to read values ("Unknown property: "Diffuse" in...") Those materials and the whole exporter is a pain in the a** anyways... They really want 40 euros for that?!

Okay, I just remembered,  I'm using the beta plugin which is different to the free demo.
I'm guessing they have change the names of the commands.

The maxscript part of the exporter is temporary.
The plugin is slowly being re-written in C++.
Its pretty much the reason I don't use Thea often.

cheers

2012-09-20, 10:35:16
Reply #48

GroveR_GoL

  • Active Users
  • **
  • Posts: 28
    • View Profile
    • www.gg3dcg.ru
DeadClown what about translucency in vray material? I have not found any conversion of it.
maybe do something like this:
Code: [Select]
if vrmat.translucency_on != 0 then
(
cormat.TODOGlassMode = 1
cormat.TODOtranslucencyMult = amin #(1,vrmat.translucency_thickness/100.)
)
else
(
cormat.TODOGlassMode = 0
)

2012-09-20, 10:48:58
Reply #49

GroveR_GoL

  • Active Users
  • **
  • Posts: 28
    • View Profile
    • www.gg3dcg.ru
And this is about Vray2Sided material:
r=origMtl.frontMtl   
      try
      (
         trcolor = origMtl.translucency
         r.levelTranslucency = (trcolor.r+trcolor.g+trcolor.b)/765.
         r.colorTranslucency = origMtl.Translucency  -- translucency color
         r.texmapTranslucency = origMtl.texmap_translucency  -- translucency map
         r.texmapOnTranslucency = true
         r.texmapAmountTranslucency = origMtl.texmap_translucency_multiplier/100.
         if   (origMtl.backMtl == undefined)then
         (
            r.texmapTranslucency = origMtl.frontMtl.texmapDiffuse
            r.texmapAmountTranslucency = 0.5
         )
         
         
         r.GlassMode = 1
         
      )
      catch()
« Last Edit: 2012-09-20, 14:57:24 by GroveR_GoL »

2012-09-20, 13:20:41
Reply #50

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
I will have a look at translucency from VrayMtl, but I need to figure out how different those two behave. I made some major fixes on the converter script today and there is a lot to keep in mind - so i will need some time to do that.
Any sufficiently advanced bug is indistinguishable from a feature.

2012-09-20, 13:35:44
Reply #51

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
Ok, big improvements here, Some MAJOR fixes for finalrender and all of the other materials. Since it is possible to set corona material values above the spinner-ranges there is a lot of error catching needed. I added a internal debugmode which can be activated in the script by setting "CorConvDEBUGmode = false" to "CorConvDEBUGmode = true" right at the beginning. It will print out properties which will not fit into the corona material specs. If there are any things that are printed out please report it here.
I also added VrayCarpaint- and a very basic MR Carpaint conversion (blend material with base and coat mats). Since MR carpaint is quite different from Corona materials there is not that much conversion happening ;) If anyone has a better scheme to convert those materials please tell me :)
It's a very important update so you should replace the old script with this one.

This script uses updated maxscript commands, so it will only work with builds after 16th Sept 2012.

supported materials:
- Standard
- VrayMtl
- VRayBlendMtl
- VRayLightMtl
- VRay2SidedMtl
- VRayCarPaintMtl
- Vray-specific maps
- MR_ArchAndDesign
- MR_Carpaint (basic)
- fR_Advanced
- fR_Architectural

changelog:
*v0.075
  • fixed nasty Vray Error
*v0.07
  • added VRayCarPaintMtl
  • added basic MR_Carpaint
  • added better VrayCompTex conversion by gover_gol
  • Clamped several levels spinners (important fix)
  • added inversion of negative bump values (important fix)
  • Fixed several FinalRender Material issues (important fix)
  • changed selection conversion methods to instancing (removed debug)
  • added advanced debug mode for internal use (off by default)
« Last Edit: 2013-03-27, 16:50:02 by DeadClown »
Any sufficiently advanced bug is indistinguishable from a feature.

2012-09-23, 16:31:07
Reply #52

nowastar

  • Active Users
  • **
  • Posts: 13
    • View Profile
when I run the script writes an error

2012-09-23, 21:14:57
Reply #53

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
Since "enable_emission" was always written like that from the beginning i suggest this is not happening due to a incompatible version, but to clarify that: which corona build are you using and which script version did you run here?
Any sufficiently advanced bug is indistinguishable from a feature.

2012-09-24, 01:26:11
Reply #54

Javadevil

  • Active Users
  • **
  • Posts: 399
    • View Profile
Here's an error,
using the latest script 07.

2012-09-24, 09:38:16
Reply #55

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio
I too experience same error as Javadevil :)

2012-09-24, 10:10:44
Reply #56

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
arghhh... Sorry guys. That was a nasty typo. I thought I tested this before posting the new version. Anyways, edited the last post, 0.075 is definitely working now!
Any sufficiently advanced bug is indistinguishable from a feature.

2012-09-24, 13:35:54
Reply #57

Javadevil

  • Active Users
  • **
  • Posts: 399
    • View Profile
Thanks Deadclown, I'll try that.

Also one more request, can you add a reset material editor to corona materials ?

cheers



2012-09-24, 13:59:15
Reply #58

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
I'm not sure if this should really be in a material converter script, since it's not converting anything... but I it's a wish i will add a button in the next version ;)
Meanwhile you can use this simple script to do it :):
Code: [Select]
for i = 1 to 24 do(
meditmaterials[i] = CoronaMtl name:((formattedPrint i format:".2d") + " - CoronaMtl")
)
Any sufficiently advanced bug is indistinguishable from a feature.

2012-09-24, 23:47:43
Reply #59

Javadevil

  • Active Users
  • **
  • Posts: 399
    • View Profile
Sweet, I can't believe how simple that script is !!!

I really have to look into scripting

Thanks