Transparency?

For people working on the C++ code.
Post Reply
NightCabbage
New member
Posts: 2
Joined: Wed Jan 29, 2014 22:37

Transparency?

by NightCabbage » Post

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 :)

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

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.

User avatar
hoodedice
Member
Posts: 1374
Joined: Sat Jul 06, 2013 06:33
GitHub: hoodedice
IRC: hoodedice
In-game: hoodedice
Location: world
Contact:

by hoodedice » Post

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?
7:42 PM - Bauglio: I think if you go to staples you could steal firmware from a fax machine that would run better than win10 does on any platform
7:42 PM - Bauglio: so fudge the stable build
7:43 PM - Bauglio: get the staple build

User avatar
Calinou
Moderator
Posts: 3169
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

by Calinou » Post

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.

User avatar
Inocudom
Member
Posts: 3121
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Post

When was the last time that Irrlicht was updated?

User avatar
rubenwardy
Moderator
Posts: 6978
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

by rubenwardy » Post

It is still in active development. The current version is 1.8.x, and Minetest uses 1.7.3.
Last edited by rubenwardy on Thu Jan 30, 2014 18:52, edited 1 time in total.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
xyz
Member
Posts: 450
Joined: Thu Nov 10, 2011 14:25

by xyz » Post

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.

User avatar
rubenwardy
Moderator
Posts: 6978
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

by rubenwardy » Post

meh
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

gsmanners
Member
Posts: 159
Joined: Fri Jan 10, 2014 21:37

by gsmanners » Post

Lighting isn't just painful for the devs, it's painful for your CPU. Every little bit adds up.

User avatar
Inocudom
Member
Posts: 3121
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Post

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.

User avatar
philipbenr
Member
Posts: 1897
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: robinspi
Location: United States

by philipbenr » Post

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.
Last edited by philipbenr on Sat Feb 01, 2014 00:39, edited 1 time in total.

NightCabbage
New member
Posts: 2
Joined: Wed Jan 29, 2014 22:37

by NightCabbage » Post

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.

sfan5
Moderator
Posts: 4095
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

by sfan5 » Post

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]
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

gsmanners
Member
Posts: 159
Joined: Fri Jan 10, 2014 21:37

by gsmanners » Post

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests