For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

Problem about user defined material

soaroc's picture
Forums: 

Hi, guys,
I have a problem about user defined material.I defined material by setting the diffuse, ambient and specula component other than the default ones defined by OCC.I defined the material and used it as follows,but it didn't work? Could anyone give me a hint?

m_Material.SetAmbientColor(ambient);
m_Material.SetSpecularColor(specular);
m_Material.SetDiffuseColor(diffuse);
m_Material.SetEmissiveColor(emiss);
m_Material.SetTransparency(m_alpha_value)
aisShape->Attributes()->ShadingAspect()->SetFrontMaterial(m_Material);
// it didn't work neither
//aisShape->SetMaterial(m_Material);
It seems that only the transparent component work.