Author Topic: Batch material edit  (Read 81683 times)

2016-08-24, 03:59:39
Reply #15

Christa Noel

  • Active Users
  • **
  • Posts: 911
  • God bless us everyone
    • View Profile
    • dionch.studio
Nice idea nik684, thanx :D

2016-08-24, 19:22:43
Reply #16

Nik

  • Active Users
  • **
  • Posts: 167
    • View Profile
    • HQ Details
v1.35

- In 1.3 script wasn't optimized for parsing thousands of objects or materials. Not it's MUCH faster.
I tested it on scene where I have 8000 objects, 625 CoronaMtls, 167 Multimaterials. Processing time of changing one property of all materials - 100-300 milliseconds.
3dsMax needs to redraw viewports, and this takes 1-2 seconds, but script itself is pretty fast. Processing time will be printed in Listener.

- IMPORTANT. Fixed error caused by invalid search.

- "All materials" and "Selected materials" buttons that starts changing property will be disabled when list is empty (if search is invalid) so you can't do anything useless anymore :)


And kinda roadmap:

v1.4 (soon will be finished)
- all bitmap and coronabitmap properties will be editable
- select and change more than 1 property, if all of them in one class (float for example)

v1.5
- ignore materials by some parameters:
   - by average diffuse color (based on colorDiffuse, not on maps inside Diffuse slot)
   - by Diffuse level value
   - by Refract and Reflect values
« Last Edit: 2016-08-24, 19:29:31 by nik684 »

2016-08-24, 21:06:46
Reply #17

johan belmans

  • Primary Certified Instructor
  • Active Users
  • ***
  • Posts: 761
    • View Profile
    • belly.be

2016-08-25, 20:09:52
Reply #18

antanas

  • Active Users
  • **
  • Posts: 269
  • Hmm ...
    • View Profile
Nice indeed, glad to see my ramblings were not in vain ))
 About - ignore materials by some parameters:- by average diffuse color (based on colorDiffuse, not on maps inside Diffuse slot) - yeah, my bad, forgot to specify\suggest that this should only work on Diffuse color as even I (being totally nonprogrammer type) can understand, what, even if it could be done by analyzing maps or even worse, some combinations of maps done through coronaAo\mixes\composites\etc. it would take ages for a script to do it's work, so sorry about that somewhat unspecific\erratic way of expressing my thoughts )

2016-08-26, 02:26:48
Reply #19

astudio

  • Active Users
  • **
  • Posts: 172
    • View Profile
    • A-Studio
"Select objects by MaterialID" button would be very useful as for me...

Look at this http://www.scriptspot.com/forums/3ds-max/general-scripting/select-multiple-objects-by-material-id#comment-19340

2016-08-26, 10:21:27
Reply #20

Nik

  • Active Users
  • **
  • Posts: 167
    • View Profile
    • HQ Details
I'm afraid this feature is irrelevant to batch material editing, so I can't add it to this UI.

Anyway Miauu has wrote it, right? :) He has more script skill than me.

2016-08-27, 23:48:35
Reply #21

Nik

  • Active Users
  • **
  • Posts: 167
    • View Profile
    • HQ Details
Well, it seems I have wrote something good :)

v1.4

- Properties now sorted by class and name. Class is visible in list

- You can filter them via filter class presets buttons or/and by name

- Now you can select multiple properties IF all of them share similar output values

- Bitmap and Coronabitmap properties.
Not all properties were added to UI cause I'm not sure somebody will batch edit them.
When you change some property it will be enabled automatically (you can disable it if you don't want to change it) and when you're ready click GO and...
All bitmaps in all selected materials in all selected slots will change all enabled properties. This can take a long time in big scenes. Maybe even 1 or 2 seconds! :)

- I suppose script again could be faster than before because I rewrote all of it

Actually I didn't test this version too much, so if you'll find some erorrs - post it here immidiately.

Enjoy

2016-08-28, 18:28:03
Reply #22

Nik

  • Active Users
  • **
  • Posts: 167
    • View Profile
    • HQ Details
v1.5 is ready

- Ignore materials by some properties. Works with CoronaMtl and VrayMtl
- VrayMtl is tested without Corona installed

2016-08-29, 15:38:28
Reply #23

antanas

  • Active Users
  • **
  • Posts: 269
  • Hmm ...
    • View Profile
Well, great job ! It already helped me a lot when dealing with some multitexture material filtering setups I needed to do today - even that seemingly simple feature can be quite a huge time saver in some cases - thanks for adding that too. Later I will test ignore materials by properties and will report on how they fare - it seems I've got just the right scene for testing that )) 

2016-08-29, 15:49:38
Reply #24

Nik

  • Active Users
  • **
  • Posts: 167
    • View Profile
    • HQ Details
Ignored materials - materials that matches all enabled criteria in list, not one of them.
"criterion 1 and criterion 2" but not "criterion 1 or criterion 2"

I.e. if you'll enable Diffuse avg and Reflect Ior criteria, then materials with diffuse avg value more/less than something AND reflect ior more/less than something will be ignored. But if material have diffuse value in valid range then it wont be ignored.

I'm not sure I can explain it better :)
Just try this feature

2016-10-01, 23:24:28
Reply #25

Nik

  • Active Users
  • **
  • Posts: 167
    • View Profile
    • HQ Details
Posted 1.6 with some nice new features

2016-10-01, 23:39:14
Reply #26

Dionysios.TS

  • Active Users
  • **
  • Posts: 766
    • View Profile
    • Evolvia Imaging
Fantastic stuff, well done!!!

Dionysios -

2016-10-02, 12:07:51
Reply #27

johan belmans

  • Primary Certified Instructor
  • Active Users
  • ***
  • Posts: 761
    • View Profile
    • belly.be
It is getting better and better. Keep up the good work!

2016-10-02, 15:03:05
Reply #28

Nik

  • Active Users
  • **
  • Posts: 167
    • View Profile
    • HQ Details
Angle W bug fixed.
Version is the same. Please redownload.

I'm sorry but for now CoronaLayered materials are not supported in "Selected objects" mode.
I'm working on next version where I will fix that and add "Medit Selection" mode for Compact and Slate material editors.

UPD.
Materials selection from Slate is nearly impossible. Thx to Autodesk.
Maybe I'll add Compact medit slot selection for those people who need edit multiple bitmaps inside specific multimap.
CoronaLayeredMtl could be added for editing bitmaps in masks. I don't see other usable properties in LayeredMtl.
« Last Edit: 2016-10-03, 00:23:49 by nik684 »

2016-10-05, 12:07:38
Reply #29

Nik

  • Active Users
  • **
  • Posts: 167
    • View Profile
    • HQ Details
I decided to remove ChangeLog on top, so this message is just for history :)

v1.6:
- Added. Randomization of any float and color values.
- Added. Size, offset, angle parameters for Bitmaps and CoronaBitmaps.
- Added. Clear all maps in selected parameters (map slots). You can undo that