Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® MotionBuilder® / Python / shaders Creation
  RSS 2.0 ATOM  

shaders Creation
Rate this thread
 
35298
 
Permlink of this thread  
avatar
  • loop1ng
  • Posted: 06 October 2009 08:52 PM
  • Location: lyon / France
  • Total Posts: 4
  • Joined: 23 August 2006 08:14 AM

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!



Replies: 0
avatar
  • loop1ng
  • Posted: 06 October 2009 09:22 PM

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 ?



Replies: 0
avatar
  • qhliao
  • Posted: 07 October 2009 10:02 AM

Have you tried FBModel.Shaders? which is based on FBPropertyList, you have plenty of functions to replace, append or remove shaders.




Replies: 0
avatar
  • loop1ng
  • Posted: 07 October 2009 08:20 PM

It works !!

Thank’s a lot.

myFloorRef FBModelPlane("FloorRef")
myFloorRef
.Show True
myShaderManager 
FBShaderManager()
myFlatCartoonShader 
myShaderManager.CreateShader("FlatCartoonShader")
myFloorRef
.Shaders.append(myFlatCartoonShader)


Replies: 0