[SOLVED] Weird material behaviour


#1

Hello!
Before ask… Me and my friend working on sequential Thrust clone. Yes we r oldfags :smiley:
He is making models in 3D Max, and i am writing code. Core almost ready and now we start to work on visual component of the game. To be sure we can communicate between 3D Max and JME my friend made test scene with different materials to tets how transparency, UV unwrapping, glowing and other things gonna work. And i can say almost every feature works great! But… After he made real game scene from many geometries we discovered super weird materials behaviour, maybe even bug.
Please take a look:


Here u can see water, which have super simple material with diffuse alpha component 0.3. And yes it looks like expected. Dont look on hover, it is ok too; But one second later

water starts look like it’s material have no transparency anymore. Another geometries with more complex materials like with aplha maps+diffuse maps and blendings i have same error, no transparency.
If i move walls geometries to deep (z=-50 for example) all geometries starts looking as expected. Is this bug or if geometry with blend material covered(or the same z coordinate) by not blended geometry like wall become not blend.
Uff, sry for horrible English and many words, but i prefer to provide as much information about trouble as i can.


#2

put transparent stuff in the transparent bucket.

…then you might try doing all of the JME tutorials.


#3

Thx for advice.
Tried to change bucket of water geometry to Transparent. Nothing changed.
Sry, and i didn’t understood one thing, is it ok when same geometry(water) randomly switching between transparent and opaque modes? I do not changing bucket at runtime ofc


#4

For transparency, it is very important that things are sorted in the correct order.

If you are still getting sorting issues after putting the water in the transparent bucket… then either the water really isn’t in the transparent bucket… or your background is in the transparent bucket when it shouldn’t be.

Transparent bucket objects are always drawn after opaque bucket objects. Always.


#5

O-o-o, u saved my day! Actually night… Should maybe learn more about basic stuff. Still ur advices is super helpfull! Now everything is working as expected.
If someone will read this, when u guys import models from 3D Max check geometries bucket.