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

Ambient Light Values form Quantity_NOC_CADETBLUE4 ?

Rahman Abber Tahir's picture
Forums: 

Can Some tell how to get ambient light values i.e Ka parameter in .mtl file from Quantity_NOC_CADETBLUE4 ??

There are differnt version of one color for example; GRAY1 GRAY2 .

Can someone guide how to get the meaning parameter from these??

Regards,

Abber 

Kirill Gavrilov's picture

Quantity_NOC_CADETBLUE4 is a value from enumeration Quantity_NameOfColor.
You can create Quantity_Color from it and fetch Red(), Green() and Blue() values.

Rahman Abber Tahir's picture

Hi Kirill,

Thanks for reply! I actually wanted the ambient light values used for visualization.

Which is "Ka" parameter in .mtl file because I'm trying to convert .step file to .obj with .mtl. 

Regards,

Abber

Kirill Gavrilov's picture

If you are trying to copy material values from what you see in OCCT 3D viewer, then you should look onto class Graphic3d_MaterialAspect defining Ambient, Diffuse, Specular and Emissive components of OpenGL material. Prs3d_ShadingAspect within Prs3d_Drawer is usually responsible for material definition of presentable objects.

Rahman Abber Tahir's picture

Thanks you very much for reply, can you please give an example code how to get the shading aspect of the currently displayed object. :)

Regards,

Abber