Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
On 23/09/2017 at 05:50, xxxxxxxx wrote:
Greetings to all! Tell me how you can manage c4d.REFLECTION_LAYER_MAIN_VALUE_ROUGHNESSREAL and c4d.REFLECTION_LAYER_MAIN_VALUE_REFLECTION from python? Beforehand grateful.
I can not understand what's the matter.
self.mat_floor = self.floor.GetTag(5616)[c4d.TEXTURETAG_MATERIAL]
self.mat_floor[c4d.MATERIAL_USE_REFLECTION] = op[ud.IF_ONOFF]
ref = self.mat_floor.GetReflectionLayerIndex(0) mainid = ref.GetDataID()
self.mat_floor[mainid + c4d.REFLECTION_LAYER_SAMPLING_DIM] = op[ud.IF_DIM] self.mat_floor[mainid + c4d.REFLECTION_LAYER_SAMPLING_DIM_DISTANCE] = op[ud.IF_DIST] self.mat_floor[mainid + c4d.REFLECTION_LAYER_SAMPLING_DIM_FALLOFF] = op[ud.IF_FALLOFF]
This code working. I can't used c4d.REFLECTION_LAYER_MAIN_VALUE_ROUGHNESSREAL and c4d.REFLECTION_LAYER_MAIN_VALUE_REFLECTION. What should I do?
On 23/09/2017 at 08:48, xxxxxxxx wrote:
https://plugincafe.maxon.net/topic/8647/11313_r16-material-reflectance-limitation&PID=44848#44848
I guess you have everything in this thread for fixing your issue.
On 23/09/2017 at 08:54, xxxxxxxx wrote:
My code from your link, but this want work with reflection roughness)))
On 23/09/2017 at 09:16, xxxxxxxx wrote:
` I don't have a working environment until 2 days But as the sdk say there is no REFLECTION_LAYER_MAIN_VALUE_ROUGHNESSREAL only REFLECTION_LAYER_MAIN_VALUE_ROUGHNESS
But I will look at this when I will have a working environment since I'm sure it's not your issue here
EDIT: I'm back at home. Personally I'm able to get the roughness and the reflection using this code
import c4d def main() : mat = doc.GetFirstMaterial() layer = mat.GetReflectionLayerIndex(0) roughness = mat[layer.GetDataID() + c4d.REFLECTION_LAYER_MAIN_VALUE_ROUGHNESS] reflection = mat[layer.GetDataID() + c4d.REFLECTION_LAYER_MAIN_VALUE_REFLECTION] print "roughness: {0}, reflection: {1}".format(roughness, reflection) if __name__=='__main__': main()
`
On 25/09/2017 at 01:35, xxxxxxxx wrote:
Hello,
the reflection strength is set with REFLECTION_LAYER_MAIN_VALUE_REFLECTION , the reflection roughness with REFLECTION_LAYER_MAIN_VALUE_ROUGHNESS. You find the full list in the c4d_reflection.h header file or in the C++ online documentation.
best wishes, Sebastian
On 25/09/2017 at 04:29, xxxxxxxx wrote:
Thank you all for the clarification. In the console showed Mat[c4d.REFLECTION_LAYER_MAIN_VALUE_ROUGHNESSREAL] and it a little confused me.