how to make a glass window? (transparent part of a model)
-
- Posts: 230
- Joined: Mon Oct 10, 2005 2:24 am
how to make a glass window? (transparent part of a model)
I make a truck using 3ds max. it has two window using the opacity to 40%.
then I load the exported x format file in Irrlicht, but the window is not transparent.
how to let part of a model be transparent? such as a car's window?
Help~~~~~
then I load the exported x format file in Irrlicht, but the window is not transparent.
how to let part of a model be transparent? such as a car's window?
Help~~~~~
You'd better create your windows as separate models and then add them to the truck scene node as children. To make them transparent, you just have to change the material properties of the nodes. e.g. : You could use following code, privided that your window glass texture has got an alpha channel:
Code: Select all
node->setMaterialType(EMT_TRANSPARENT_ALPHA_CHANNEL);
-
- Posts: 230
- Joined: Mon Oct 10, 2005 2:24 am
Thanks! this could be useful, but does this mean irrlicht really not support that?CZestmyr wrote:You'd better create your windows as separate models and then add them to the truck scene node as children. To make them transparent, you just have to change the material properties of the nodes. e.g. : You could use following code, privided that your window glass texture has got an alpha channel:
Code: Select all
node->setMaterialType(EMT_TRANSPARENT_ALPHA_CHANNEL);
and I encounter another problem,too.
In 3dsmax, the car's material is set, and the two light are set to self-emit material.
But when loading it in irrlicht, the car body's material seems none, but the car lights' self-emit material looks good.
I don't know why. Irrlicht doesn't support this use of material?
When Niko updates the dmf loader, it supports transperancy. (dmf is the format for the DeleD Scene Builder. http://www.delgine.com
If it exists in the real world, it can be created in 3d
Sys specs:
AMD 3700+ 64 processor
1.0 gb ram
e-Geforce 6600 graphics 256 mb onboard ram
Sys specs:
AMD 3700+ 64 processor
1.0 gb ram
e-Geforce 6600 graphics 256 mb onboard ram
-
- Posts: 230
- Joined: Mon Oct 10, 2005 2:24 am
Thanks! But when will Niko update it?MikeR wrote:When Niko updates the dmf loader, it supports transperancy. (dmf is the format for the DeleD Scene Builder. http://www.delgine.com
I think it should be a normal thing for an engine to have this function
And I only need to view a model, a scene builder is not suitable cause I am going to build my own scene format.
-
- Posts: 370
- Joined: Mon Aug 29, 2005 10:54 pm
- Location: http://web.utk.edu/~pfox1
Milkshape 3D (which gets bashed quite a lot here) supports transparency, it would work very well for glass. If you're familiar with the program, in materials, under emissive color there's a slider, move it to the left and watch your material turn transparent. What's even cooler is when you load it up in Irrlicht, it looks nearly exactly the same.
-
- Posts: 322
- Joined: Tue Aug 30, 2005 10:34 am
- Location: slovakia
if the windows are mapped by a different material (you can do multisub material in any modeler and load it) then just use
getMaterial("the number of glass material") .MaterialType=video::EMT_TRANSPARENT_ALPHA_CHANNEL; but see the namespace reference, I don't think I get it right
getMaterial("the number of glass material") .MaterialType=video::EMT_TRANSPARENT_ALPHA_CHANNEL; but see the namespace reference, I don't think I get it right
what is this thing...
http://irrlicht.sourceforge.net/phpBB2/ ... php?t=9763
check out my post here.
basically in max, i'm not sure if ur 3d app supports it but u can group polygons in max to a id and then in ur code u can assign a texture to the id of selected polygons
check out my post here.
basically in max, i'm not sure if ur 3d app supports it but u can group polygons in max to a id and then in ur code u can assign a texture to the id of selected polygons
"Sorry, Twinsen, you don't have enough Kashes. "- Yeah right pal