Announcement

Collapse
No announcement yet.

search for material type?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • search for material type?

    I need to search a max file for all objects containing the Egz glass material, but my scene has perhaps 1000 or more materials in it (30 + office buildings).

    Basically, I need to get rid of any reference to Egz - any suggestions?
    Kind Regards,
    Richard Birket
    ----------------------------------->
    http://www.blinkimage.com

    ----------------------------------->

  • #2
    I had a similar issue with brazil mats. I think the only efficient way is to write a script that would call for egz id in mats and load them into mat editor. I had my coworked write this script for me,
    so i've modified this script it loads all the egz mats into mat editor (i suggest you clear it first)

    brazil_bitches = #()

    fn material_ruler mat =
    (
    try
    (
    if iskindof mat egzVRayGlass == true then
    append brazil_bitches mat
    if iskindof mat egzVRayWax == true then
    append brazil_bitches mat
    if iskindof mat egzVrayLight == true then
    append brazil_bitches mat
    if iskindof mat egzVRayCarpaint == true then
    append brazil_bitches mat
    )
    catch()

    if mat.numsubs != 0 then
    (
    for i = 1 to mat.numsubs do
    (
    if mat[i] != undefined then
    (
    if iskindof mat[i] egzVRayGlass == true then
    if iskindof mat[i] egzVRayWax == true then
    if iskindof mat[i] egzVrayLight == true then
    if iskindof mat[i] egzVRayCarpaint == true then
    (
    append brazil_bitches mat[i]
    )
    )
    material_ruler mat[i]
    )
    )
    )
    for t in scenematerials do material_ruler t



    q=0
    for m = 1 to brazil_bitches.count do
    (
    q=q+1
    if q > 24 then q = 24
    setMeditMaterial q brazil_bitches[q]
    )
    Dmitry Vinnik
    Silhouette Images Inc.
    ShowReel:
    https://www.youtube.com/watch?v=qxSJlvSwAhA
    https://www.linkedin.com/in/dmitry-v...-identity-name

    Comment


    • #3
      my computer doesnt seem to understand the syntax 'brazil_bitches.'
      LunarStudio Architectural Renderings
      HDRSource HDR & sIBL Libraries
      Lunarlog - LunarStudio and HDRSource Blog

      Comment


      • #4
        Could you just bring up the material editor browser, and scan down thru the material list and see which ones have the egz glass.
        Should take long, and if you find them drag them into the materail edit as instance (obviously) and change the material type.

        I remember somewhere that there was a way to convert egz glass materials into the vray material equivilent. Not sure if it was a script or just the usualy sdcene convert... cant remember.

        For instance say your entire scene was using vray materials except for the egz glass I think you could just use the scene converter to convert the egz materials into vray materials.

        Comment


        • #5
          Originally posted by jujubee
          my computer doesnt seem to understand the syntax 'brazil_bitches.'

          Just tell it they are a lot like fR_s-o-b's
          Eric Boer
          Dev

          Comment


          • #6
            Originally posted by DaForce
            Could you just bring up the material editor browser, and scan down thru the material list and see which ones have the egz glass.
            Should take long, and if you find them drag them into the materail edit as instance (obviously) and change the material type.
            Please oh please don't do that... Repetitive actions like that just make me start to twitch, whatever happened to the computer doing the work for us?

            Here's a simple script that will look through your selection of objects and convert any egz mats to their respective base mats (vraymats or shellac). Won't work on crazy nested materials, but for the vast majority of your mats it'll work...

            ---------------

            Caveats:
            - Doesn't search into deep nested materials, for instance if you're using a blend material with an EGZ in it, the script won't find it. It only searches through multi-subs and std egz mats
            - In order to maintain material instancing, it converts your original material, thus the only way to get your EGZ mat back is to undo the conversion, which fortunately, the script is undoable...

            Usage:
            - Select all or some of the objects in your scene you want to look for EGZ mats on...
            - Run the script (Maxscript / Run Script and pick this script wherever you downloaded it to...)

            Installation:
            Nothing special, just save the script somewhere on your hd, could be in your 3dsmax scripts folder, your desktop, wherever...

            ---------------

            The script can be downloaded on scriptspot or via the direct link here:

            http://www.scriptspot.com/download.asp?ID=3284&inf=1
            Christopher Grant
            Director of Visualization, HMC Architects
            Portfolio, ChristopherGrant.com

            Comment


            • #7
              cheers guys - most helpful
              Kind Regards,
              Richard Birket
              ----------------------------------->
              http://www.blinkimage.com

              ----------------------------------->

              Comment

              Working...
              X