Environment Mapping Type

I want to know that what type of Environment Map is implement in OpenCascade.
can we set Spherical Environment Mapping type and Cubic Environment Mapping type manually.
If then how can we do this ?
Please do support me !!
Thanks in advance!!

Fotis Sioutis's picture

This is hot to set the spherical dynamic texcoord generation in the view :

Handle(Graphic3d_TextureEnv) aTexenv = new Graphic3d_TextureEnv(
myView->View()->ViewManager(), Graphic3d_NOT_ENV_CLOUDS);
myView->SetTextureEnv(aTexenv);
myView->Redraw();

Ans this is hot to enable spherical dynamic texture to an object :

Graphic3d_MaterialAspect anAspect =
ObjectPrs->GetAIS()->Attributes()->ShadingAspect()->
Material(Aspect_TOFM_FRONT_SIDE);
anAspect.SetEnvReflexion(val);
ObjectPrs->GetAIS()->Attributes()->ShadingAspect()->SetMaterial(anAspect, Aspect_TOFM_FRONT_SIDE);
ObjectPrs->GetAIS()->Redisplay(Standard_False);

I believe you can find your way through this.

Cubic map is not supported in the occ view, except maybe with some modifications under the hood of the Visualization beast ...

Fotis

jelle's picture

Great! Very interesting, thanks Fotis!
Are you ok if I add this as an example to pythonOCC?

-jelle

Fotis Sioutis's picture

No problem Jelle !

Also you could find some interesting methods to experiment with in :

GetAIS()->Attributes()->ShadingAspect()->Aspect();

Do not forget to Update the presentation after changing something.

Fotis

jelle's picture

Thank you Fotis, and thanks again for the hint!

-jelle

Bharat Subedi's picture

Thank You Fotis.
The last line gave me the answer what I wanted.
Thank you again.
....with some modifications under the hood of the Visualization beast ....
Did you succeed that ? If then can you share your idea with us.

Thank you very much.