How to import obj model with glass material from blender?

I am trying to import a model of a glass cup which I created in blender as seen below.

But I import the model with materials I am just getting a default material in the object

I am new to OpenGL, I am trying to understand why the glass material from blender is not imported in the OpenGL

Can someone please explain to me how can I achieve the Glass texture from the blender or adjust in shared to get the effect. ?

P.S I am using ASSIMP library to Import the model

Thanks in advance

OpenGL has no tools for using models or materials. All it knows is how to render stuff; any organization higher than a draw command is the user’s responsibility.

So if Blender3D wrote some material data, and you imported a model containing that material data, why didn’t you read that material data and convert it into OpenGL functionality that would have the desired result?

I have no idea if the Open Asset Importer has facilities for storing Blender’s “materials” in some readable form or not. But even if it does, that doesn’t immediately manifest itself into the OpenGL commands needed to make that particular kind of rendering happen. It will be up to you to actually implement that material.

1 Like