Partially transparent models

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
rogerdv
Posts: 93
Joined: Wed Aug 27, 2003 4:20 pm

Partially transparent models

Post by rogerdv »

How can I create a mesh with transparent sections? Is that possible?
ru guo ni yao ai, ni jiang bu hui shi qu
joy
Posts: 124
Joined: Tue Apr 27, 2004 9:15 am
Location: Germany

Post by joy »

As I learned it is all the matter of the colors. with irr::video::EMT_TRANSPARENT_ADD_COLOR or irr::video::EMT_TRANSPARENT_VERTEX_ALPHA the dark colored parts of the mesh gets transparent and the the bright part not or not so much.
puh
Posts: 356
Joined: Tue Aug 26, 2003 3:53 pm

Post by puh »

Here is how I do windows in my apps:

Code: Select all

video::SMaterial glass_material; 
glass_material.EmissiveColor  = video::SColor(0,50,60,60); 
glass_material.MaterialType=EMT_TRANSPARENT_ADD_COLOR; 
win0->getMaterial(5)=glass_material; 
win0->getMaterial(2)=glass_material; 
win0->getMaterial(1)=glass_material;
Last three lines are differ from model to model.

It could look like that:
Image
joy
Posts: 124
Joined: Tue Apr 27, 2004 9:15 am
Location: Germany

Post by joy »

If you set instead of the Emissive color "normal" color, where would be the difference in your example? How would it look then?

Just curious, because I thought the normal color should be transparent too.
Post Reply