|
Hi there,
I’m wondering if anyone know how to create a shader ( Edge cartoon, Reflection, ...) and assign it to my model?
Any help would be greatly appreciated!
|
|
|
|
I found how to create all the shader available in the scene :
lShaderManager = FBShaderManager () for lShaderTypeName in lShaderManager.ShaderTypeNames:
lShader = lShaderManager.CreateShader( lShaderTypeName )
Then It’s easy to create the shader I want :
myShaderManager = FBShaderManager()
myFlatCartoonShader = myShaderManager.CreateShader("FlatCartoonShader")
But now , how to assign my new shader to my model ?
|
|
|
|
Have you tried FBModel.Shaders? which is based on FBPropertyList, you have plenty of functions to replace, append or remove shaders.
|
|
|
|
It works !!
Thank’s a lot.
myFloorRef = FBModelPlane("FloorRef")
myFloorRef.Show = True
myShaderManager = FBShaderManager()
myFlatCartoonShader = myShaderManager.CreateShader("FlatCartoonShader")
myFloorRef.Shaders.append(myFlatCartoonShader)
|
|
|