PDA

View Full Version : How to change lots of materials at once from phong to constant?


frangelico
02-28-2008, 02:56 AM
I did import textured models from sketchup (via crosswalk, unzip, .dae) to xsi. Now I would like to change all the materials from "phong" to "constant" at once. Is there any possiblity to do this? Is it possible to import directly to "constant" (perference settings)?

Thank you very much ....
fran

JDex
02-28-2008, 05:13 AM
One of the simplest ways would be to create a cube (or something) and add a constant material to it w/ the settings you want. Then select all of the objects you want to add that shader to and then Get>Material>Assign Material and choose the cube w/ the material you want. Then they all have this same material on it. Then if you want to modify the material for all, just edit it from any object w/ that material, or if you want to change just one objects material, select that object and Get>Material>Make Local.

If all of these objects have textures... this probably won't help though, because you'll still have to go through and hook up the textures to each.

frangelico
02-28-2008, 05:36 AM
... thank you for the quick answer. Unfortunatly there are textures I want to keep. I thought there is an easy way to change all the material nodes to "constant" an once.

miga
02-28-2008, 01:56 PM
You could try my "Shared Material" script:
http://migaweb.de/downloads.php?id=19

But there is a small problem with the constant, it will create one material for all objects but apperently it creates a wrong constant (everything else works fine). So you have to open the shader network, delete the constant and create a constant node and connect it, then its fine. Still have to fix that problem ;)

Reini
02-28-2008, 02:48 PM
Miga, he doesn't want to have one material for all his objects but have all the phongs in n materials changed into constants! - with all their inputs
Time for another script.. :D
I already gave it a short try but it's not that easy to access the inputs of a material-node. (If they were all named "image" and are plugged into the diffuse-port, it was..)

Reini

Edit: Doesn't even matter whether they're plugged into diffuse or anywhere else..

miga
02-28-2008, 03:57 PM
Oh ok, I see now :) Sorry, then my script is not usefull :)

frangelico
02-29-2008, 04:31 AM
Thank You again ... Now I know at least that I have to start scripting ....

Ewald
02-29-2008, 11:49 AM
Try viewport capture from the desired viewport,and set the display to texture decall.
All textured materials appear constant.

korzon44
11-19-2008, 11:37 PM
Try this. Select objcets and Get/Shader/Surface/Constat and mnualy reconect textures.