Justin Hunt Posted September 3, 2008 Share Posted September 3, 2008 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 More sharing options...
anton Posted September 3, 2008 Share Posted September 3, 2008 If you upload the script I will take a look at it. Seems to be pretty straight forward. Thanks, Anton Link to comment Share on other sites More sharing options...
Justin Hunt Posted September 3, 2008 Author Share Posted September 3, 2008 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 More sharing options...
Dave Buchhofer Posted September 3, 2008 Share Posted September 3, 2008 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 More sharing options...
anton Posted September 3, 2008 Share Posted September 3, 2008 Nice cleanup of the code and now there is no need for the interface anymore! Cool stuff Dave! Link to comment Share on other sites More sharing options...
Justin Hunt Posted September 4, 2008 Author Share Posted September 4, 2008 Thanks so much, always knew the code was a mess. I'll give it a go soon jvh Link to comment Share on other sites More sharing options...
Justin Hunt Posted September 4, 2008 Author Share Posted September 4, 2008 I get an error reading ..Unknown property:"shaderType"in #Multi/Sub=Object:rpc_Aaron01(Standard:rpc_Aaron01) It seems the script cant drill down to the second level of the multisub material of the RPC's jhv Link to comment Share on other sites More sharing options...
anton Posted September 4, 2008 Share Posted September 4, 2008 I haven't used RPC's in years and from what I remember, the RPC plugin was shipping with max but I cannot seem to find it. If you have any idea where I can find it let me know so I can install it and test this. Link to comment Share on other sites More sharing options...
Justin Hunt Posted September 4, 2008 Author Share Posted September 4, 2008 http://www.archvision.com I am using maxDesign2009 which you have to pay for the plugin- but its free to download and install, just the RPC's will be water marked. Thanks jhv Link to comment Share on other sites More sharing options...
anton Posted September 4, 2008 Share Posted September 4, 2008 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 More sharing options...
Justin Hunt Posted September 4, 2008 Author Share Posted September 4, 2008 (edited) do these work ? http://http://www.archvision.com/democontent.cfm it appears not. pm me and I can email you one to test Edited September 4, 2008 by Justin Hunt Link to comment Share on other sites More sharing options...
anton Posted September 4, 2008 Share Posted September 4, 2008 Those are the ones I've tryed to download but none of them is working... Link to comment Share on other sites More sharing options...
Justin Hunt Posted September 4, 2008 Author Share Posted September 4, 2008 pm your email and I will send you one Link to comment Share on other sites More sharing options...
anton Posted September 4, 2008 Share Posted September 4, 2008 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 More sharing options...
Justin Hunt Posted September 5, 2008 Author Share Posted September 5, 2008 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 More sharing options...
anton Posted September 5, 2008 Share Posted September 5, 2008 Actually the recompiling was done by Dave, I just tested it and made it work with the rpc material! Thanks for posting it for everybody to use! Link to comment Share on other sites More sharing options...
Dave Buchhofer Posted September 6, 2008 Share Posted September 6, 2008 Ahh good check, I didn't actually have max here to see if the code actually worked and similarly haven't used rpcs ever since they adopted that godawful content manager scheme a few years back. Link to comment Share on other sites More sharing options...
Justin Hunt Posted September 7, 2008 Author Share Posted September 7, 2008 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now