Help needed on finding and replacing maps

Hi, Sorry if in case i have posted this in wrong place

I am new to this scripting............. i searched allover the forum to the script i wanted, i also tried to write but it wont work for me....... :(
so can any one help me in this,

That is i have a scene which contains millions of polygons and thousands of materials, in that few materials contain displacement, it is creating problem while rendering, i want to remove that particular displacement map from the materials (only displacement will need to be off). so that i can save time by avoiding going to each and every material in the scene just to check if it contains displacement enabled.

One more thing i am using V-Ray....

Thanks in advance.........

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
izztti's picture

uncheck

only thing I can say is to uncheck the geometry displacement mode from vray global switch.
or in maxscript try
vr.options_displacement =False

and this will not disable it from your materials. only on render it will disable the displacement.after a while if you want it back, check it again

and if you want to disable it from the material slot:

delete it from the material:

for obj in rootScene.world.children do (
obj.material.texmap_displacement = undefined
)

or
disable it from the material slot:
for obj in rootScene.world.children do (
obj.material.texmap_displacement_on = off
)

AttachmentSize
uncheck.jpg 67.42 KB
mertens3d's picture

well this may or may not be

well this may or may not be a complicated task.
I'm assuming all the materials are Vray materials..correct?
Are all the materials simple materials, or rather are any of them materials, or shellacs, etc.? If so, then you'll have to test for each of those and account for all of that.

I can't get to my max right now but...

if simple basic material then you can get all the materials in the scene with scenematerials

loop through each of those and test if it's typeof is 'vray' (i think that's the type)

if so, then simply set that_material.texmap_displacement_on = false

you can use the showProperties() function to find out what has been exposed.

sorry if this is a little vague...like i said i can't get to my comp right now. If you can't get it to work, reply and i'll try to be a little more specific.

...gregory

mertens3d.com - recent architectural rendering

msanandkumar's picture

I can do that but the

I can do that but the problem is, if i do that grass displacement will go off (for grass i am using vraydisplacement method modifier, but i want to retain that). I want to remove the displacement which will be in materials map section..........

Please suggest for this.....

titane357's picture

Just say to Vray not to

Just say to Vray not to render displacement :-)))

msanandkumar's picture

No one to help me?????

No one to help me?????

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.