Jump to content

GUI for a macro-script, help


Justin Hunt
 Share

Recommended Posts

Just a quick one,

 

I have developed a max script to tweak RPC materials. Not knowing much about scripting I used the Macro-recorder. It does the job but I would like to incorporate it into a GUI and have it affect all selected RPC's. At the moment I have to manually load each rpc material one at a time.

 

Would anyone be willing to help me finish this off.

 

Once its completed I will share it for all to use.

 

Thanks

Link to comment
Share on other sites

Great thanks

 

here's the text

 

meditMaterials[1].material1.shaderType = 4

meditMaterials[1].material1.adTextureLock = on

meditMaterials[1].material1.diffuseLevelMap = Ambient_Reflective_Occlusion__3dsmax ()

meditMaterials[1].material1[#Maps][#Diffuse_Level__Ambient_Reflective_Occlusion__3dsmax____Ambient_Reflective_Occlusion__3dsmax].max_distance = 1000

meditMaterials[1].material1[#Maps][#Diffuse_Level__Ambient_Reflective_Occlusion__3dsmax____Ambient_Reflective_Occlusion__3dsmax].bright = color 179 179 179 255

meditMaterials[1].material1.selfIllumAmount = 0

 

 

It would be great if there was a way to specify the Ambient Occlusion Max distance and bright colour. First things first the ability to apply to selection

 

Thanks

 

jhv

Link to comment
Share on other sites

heres the real basics.. just to make it work on a selection instead of the material editor

 

for rpc in selection do
(
rpc.material.shaderType = 4
rpc.material.adTextureLock = on
rpc.material.diffuseLevelMap = Ambient_Reflective_Occlusion__3dsmax ()
rpc.material.diffuseLevelMap.max_distance = 1000
rpc.material.diffuseLevelMap.bright = color 179 179 179 255
rpc.material.selfIllumAmount = 0
)

 

no error checking at all, but should be it, unless i spelled something wrong ;) will give it a go in a bit.

Link to comment
Share on other sites

I just installed the plugin but it doesn't come with any test RPC's and the demo ones on archvision.com are not working anymore... Do you happen to have any of the demo ones?

I bought a couple years back some people from them but I have no idea where I have them...

Link to comment
Share on other sites

You were right, it was not going down to the material so here is the adjusted code:

 

for rpc in selection do
(
rpc.material.materialList[1].shaderType = 4
rpc.material.materialList[1].adTextureLock = on
rpc.material.materialList[1].diffuseLevelMap = Ambient_Reflective_Occlusion_3dsmax()
rpc.material.materialList[1].diffuseLevelMap.max_distance = 1000
rpc.material.materialList[1].diffuseLevelMap.bright = color 179 179 179 255
rpc.material.materialList[1].selfIllumAmount = 0
)

Link to comment
Share on other sites

Many thanks, I had to tweak the ambient occlusion line to get it to work.

 

Its workg great so for all those who would like to try it I have uploaed the script.

 

In its basic form it makes sure that the self-illumination is set to 0. For some RPC's even if it is set to 0 in the Mass Edit the material itself still has self illumination set to 55.

 

By adding AO, it helps to tone down the over bright apperance when using final gather.

 

Many thanks to anton for compiling my rather messy script, I owe you a beer.

 

cheers

 

jhv

Link to comment
Share on other sites

Big thanks to Dave as well.

 

RPC's do suck, but with a little trickery they can look ok, not great but ok.

 

Personally I think the parking lot car are the only real reason for keeping them in our workflow, especially so as large scale shopping centres are our main stay.

 

Thanks once again to everyone who helped

 

jhv

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...