Delete lots of Materials

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 02 February 2004   #1
Delete lots of Materials

Hi,

need to know how to delete all local material nodes in a complex
multi object model cause i want to replace them by one group
material... there must be a solution

thanks in advance
fex
 
Old 02 February 2004   #2
not sure I understand, the group will overide the local materials anyway.
 
Old 02 February 2004   #3
not sure whta you mean but select your object and just apply a new shader , this will rid of all nodes . but also check your clusters and delete any unwanted clusters, they tend to get in the way sometimes
__________________
artstuff
 
Old 02 February 2004   #4
Yeah, grouping your objects together and applying a material will propogate it throughout the enclosed elements. Or if you wanted to, you could create a new Pass and just apply a new Material.
 
Old 02 February 2004   #5
no group materials dont override local ones. its the inverse. Child nodes inherit properties unless they have the property locally.

Run these 2 lines in the script editor, itll select all materials in your scene, including cluster and group materials. then just hit the delete key.

SelectObj "*.Material"
AddToSelection "*.cls.*.Material"
 
Old 02 February 2004   #6
you are better off with

Quote: for each oItem in Selection
deleteobj oItem.material
set oClusters =oItem.ActivePrimitive.Geometry.Clusters
for each oClust in oClusters
deleteobj oClust.material
next
next


if you only have local materials.
this only works on the selection and won't touch the rest of the items in the scene.

I wrote it off the top of my head but it should work.
__________________
Come, Join the Cult http://www.cultofrig.com - Rigging from First Principles
 
Old 02 February 2004   #7
Ya i too dont really understand what your getting at. Ray says delet clusters, definately do that. it gets rid of alot of sub-materials on poly clusters as well as problems and confusion. and if you want to just erase all the materials on a group of objects. select them all, first delete all the clusters, then asign the same material to all of them and it will reset your render trees for all objects. is that what your wanting to know ??


XsifoX
__________________
Chad Fox
Linked-In
 
Old 02 February 2004   #8
Quote: Originally posted by zen
[B]no group materials dont override local ones. its the inverse.

no, not if they are member of the group. "If an object is a member of a group, then any properties applied to the group take precedence over local and branch properties."

but yes local does overide inherited. I understand now why he'd want to delete them instead of grouping all of them.

Last edited by ggg : 02 February 2004 at 10:10 PM.
 
Old 02 February 2004   #9
Quote: Originally posted by ggg
no, not if they are member of the group. "If an object is a member of a group, then any properties applied to the group take precedence over local and branch properties."


That statement can be confusing. It's stated that way in the manual as well.

If an object has a shader on a cluster level then the group will NOT override its shader.

The trick is to either delete the cluster or explicitly add the cluster to the group.

To confuse things further, the defininiton of Local is used quite loose by many folks including SI Reps and myself.

Here's the word from the manual:

# Scene Default: This is the weakest source. If an object does not inherit a property from anywhere else, it uses the scene’s default values. For example, if an object has never had a material applied to it, it uses the scene default material.

# Branch: If a parent has a property applied when it is branch-selected, its children all inherit the property.

# Local: If a child inherits a branch property from its parent, but has the same property applied directly to it, it uses its local values.

# Cluster: Materials, textures, and other properties applied to a cluster take precedence over those applied to the object.

# Group: If an object is a member of a group, then any properties applied to the group take precedence over local and branch properties. Similarly, if a cluster is a member of a group, any properties applied to the group take precedence over those applied directly to the cluster.

# Layer: Any properties applied to an object’s layer take precedence over group, local, and branch properties.

# Partition: Properties applied to a partition of the current render pass have the highest priority of all.

/R

Last edited by RickW : 02 February 2004 at 02:11 AM.
 
Old 02 February 2004   #10
Quote: Originally posted by RickW

The trick is to either delete the cluster or explicitly add the cluster to the group.
and therefore as a member of the group the properties of the group take precedence
 
Old 02 February 2004   #11
Quote: Originally posted by ggg
and therefore as a member of the group the properties of the group take precedence :)


Yes, I'm not saying you're wrong :)

I'm saying that most folks assume that if an object has a cluster material and if the object is assigned to the group, they expect the group assignment to override the cluster material.

This thread demonstrates that :)

One may say local materials is a shader on the object itself.
Another may say a local material is a shader assigned to a cluster on the object.

When I had some problems with clusters and render passes in XSI 1.5, SI support told me that "local" materials have problems with render passes.

If we say groups override local materials, one can be led to believe that if the object is assigned to the group then all local materials (including clusters) will be overriden. Ignoring the terminology mixup.

/R
 
Old 02 February 2004   #12
I agree, it's confusing.

Matt Lind had a good description of this too on Highend but I think he deleted it, maybe for future release.
 
Old 01 January 2006   #13
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 06:36 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.