Page 1 of 1
Transparency?

Posted:
Wed Jan 29, 2014 22:47
by NightCabbage
Hi guys
I've just been thinking about transparency lately, and this engine was the first thing to come to mind :)
I'm wondering if you have come up with any solutions for having transparency in a chunk-based engine?
Depth sorting is all well and good, but when you're dealing with not just small objects, but large chunks of terrain, this technique falls down.
ie. Picture an object inside a chunk, where the front of the chunk covering the object is semi-transparent. The chunk effectively would need to be broken up, as part of the chunk is rendering in front of the object, and the other part behind.
Obviously the z-buffer doesn't cater for this. Pity they don't make a newer version of a z-buffer that supports transparency... (Not hard... I've come up with a pretty simple algorithm.)
So do you deal with this problem at all? Or just kinda ignore it, like Minecraft does :P
I'd love to see a solution that works for this type of engine :)

Posted:
Thu Jan 30, 2014 11:41
by PilzAdam
NightCabbage wrote:So do you deal with this problem at all? Or just kinda ignore it, like Minecraft does :P
When you fly above clouds and look down at water then youll notice that the water is drawn in front of the clouds... so I guess we dont deal with it.

Posted:
Thu Jan 30, 2014 13:35
by hoodedice
PilzAdam wrote:NightCabbage wrote:So do you deal with this problem at all? Or just kinda ignore it, like Minecraft does :P
When you fly above clouds and look down at water then youll notice that the water is drawn in front of the clouds... so I guess we dont deal with it.
I'm guessing problem with Irrlicht?

Posted:
Thu Jan 30, 2014 17:10
by Calinou
hoodedice wrote:PilzAdam wrote:NightCabbage wrote:So do you deal with this problem at all? Or just kinda ignore it, like Minecraft does :P
When you fly above clouds and look down at water then youll notice that the water is drawn in front of the clouds... so I guess we dont deal with it.
I'm guessing problem with Irrlicht?
Transparency sorting is a painful thing to do. It could be fixed, probably.

Posted:
Thu Jan 30, 2014 17:42
by Inocudom
When was the last time that Irrlicht was updated?

Posted:
Thu Jan 30, 2014 18:05
by rubenwardy
It is still in active development. The current version is 1.8.x, and Minetest uses 1.7.3.

Posted:
Thu Jan 30, 2014 18:40
by xyz
rubenwardy wrote:It is still in active development. The current version is 1.8.x, and Minetest uses 1.7.3
That's not true. Minetest uses whatever is available. 1.8.1 is used for official Windows builds (at least those that I do).
There's no reason to stay on old version of Irrlicht, it may have bugs and whatnot.

Posted:
Thu Jan 30, 2014 18:52
by rubenwardy
meh

Posted:
Fri Jan 31, 2014 20:11
by gsmanners
Lighting isn't just painful for the devs, it's painful for your CPU. Every little bit adds up.

Posted:
Fri Jan 31, 2014 21:20
by Inocudom
gsmanners wrote:Lighting isn't just painful for the devs, it's painful for your CPU. Every little bit adds up.
Then shouldn't lighting be handled by the GPU instead? No need to rev computers like jet engines when an alternative is achievable.

Posted:
Sat Feb 01, 2014 00:37
by philipbenr
gsmanners wrote:Lighting isn't just painful for the devs, it's painful for your CPU. Every little bit adds up.
hoodedice wrote:Shadows are currently not in the current version of Minetest, though I don't see why they shouldn't (apart from lag).
I agree with hoodedice here, and the thing is, current shaders can be turned on and off by just setting it up in the main menu or through minetest.conf. Now, I have no idea how hard it would be to make shadows in dev minetest, although I have seen some pretty cool things.
Edit: shadows doesn't have much to do with the current topic, but I think it is only appropriate to pull it up in unofficial engine dev.

Posted:
Sat Feb 01, 2014 03:43
by NightCabbage
Yes, it definitely is a painful thing to do :P
It's especially painful with a chunk-based engine, in fact I'm not sure how you would even go about doing depth sorting.
ie. the example of an object in the middle a chunk with some semi-transparent blocks - instead of rendering the whole chunk, you'd need to render the back part, then the object, and then the front part. Nightmare!! lol
So I'm thinking that in the near future, I might develop an OIT (Order-Independent Transparency) engine. My main goal would be for games like Minecraft/Minetest, where depth sorting just isn't appropriate.

Posted:
Sat Feb 01, 2014 07:50
by sfan5
rubenwardy wrote:It is still in active development. The current version is 1.8.x, and Minetest uses 1.7.3.
<what xyz already said>
1.7.2 is used for the official mingw builds (it keeps screwing up if I use 1.8)
[just FYI]

Posted:
Sat Feb 01, 2014 20:09
by gsmanners
Yeah, but what about Linux? I ain't using no mingw.
/me looks at src folder...
Okay, I'm also using 1.7.2. I guess it's the stable branch.