z-channel with alpha maps
i am very interested in a script, that adresses the following problem: correct Z-channel images with alpha Maps.
In my scenes are several planes with bitmaps mapped with their corresponding alpha channels.
When i try to render the z-channel, the planes are being rendered as geometry rather than masked images with alpha maps.
I found something (see for screenshots of that problem too) :
Sadly that script works only the SECOND time i run it. (!?!)
An error occurs in line "tofalloff(materiobj)".
The second time i try, it works. So far so good.
Put a falloff map in the diffuse, set up 100 pro selfillumination, leave the opacity untouched.
This one works with a standard material:
rollout Z_channelRollout " Z CHANNEL FAKE HELPER" width:200 height:140
label lbl_use "use in scenes with alpha maps" pos:[20,10] width:170 height:40
label lbl_a "obj need a standard mat to work" pos:[20,30] width:170 height:72
label lbl_b "...select Objects..." pos:[20,70] width:144 height:72
button Makebtn "GO!" pos:[16,90] width:148 height:32
on Makebtn pressed do
for obj in selection do Obj.material.diffuseMap=falloff ()
for obj in selection do Obj.material.diffuseMap.type = 4
for obj in selection do Obj.material.diffuseMap.nearDistance = 0 -- in eine einzutippende variable umwandeln?
for obj in selection do Obj.material.diffuseMap.farDistance = 100 -- das auch
for obj in selection do Obj.material.selfIllumMap=SolidColor ()
for obj in selection do Obj.material.selfIllumMap.color = color 255 255 255
for obj in selection do Obj.material.selfillumMapAmount = 100
Okay, the question is if there is somebody out there that can fix the problem in the opa-z or to help to make a script out of these components, that can do the following:
-Nummerical entry of the near and far range of the falloff material, similar as the near and far camrange in the opa-z script. Why does it take the camera into account anyway?
-If there is not a standard material applied, it should prove if it is for instance a Multi-subobject mat. Then it should go in the mapslots and replace the channels there. Ohsu has such a thing in his script, treating Multisubobject and Vray materials right.
-objects with no material should be given an empty material for the script to work with.
I appreciate help in any form,
thank you and goodbye.