Better Glass

As it stands, I’m not a great fan of the current visual representation, and relative high costs of glass, so I thought about ways that it could be improved…

Currently, glass windows are the only thing that we can build using glass… it’s instantly turned from sand and compact silt into a big glass block with a garish (#SorryNotSorry) frame. I propose that an couple of interim steps are added here…

First, you create a block of glass with no purpose other than to be a ‘block of glass’. No pre-made frame or anything on it. Just glass. Obviously with some mild tinting, so they’re not invisible and you know they are there!

Then include an additional recipe which will allow you to make 2x glass walls out of one block (which I also hope is implemented for other wall / slab recipes where you should be able to divide 1 block in half to make 2).

Add another recipe where you can combine different coloured woods to the glass, to make the frame and you have some nice looking, half ‘wall’ sized, windows … which, incidentally, can be placed on a standard block to give the impression you have a window sill :wink:

For me, creating glass in this way, seems more aesthetically pleasing and is more logical, as it opens up future expansion where you might need to use glass for other craftables, such as for vials (for the healing brews or other such consumables), other bottles or containers, or even allowing you to add in coloured tints to the glass for some additional artistic flair.

22 Likes

+1, never been a huge fan of the framed glass. I love creating huge windows so the step 1 block would be great to have!

3 Likes

This thread is my jam! And by jam, I mean a huge bugbear I’ve wanted to improve forever. And I’ve just gotten back from a wonderfully relaxing Christmas holiday at my parents house so I’m going to chat a bit. I’m not actually back in the office til next week though.

This was my ideal design for the glass block! Like you, I’m not super happy with the aesthetic of the current glass block, but it looks the way it does for some pretty important tech reasons.

The biggest and baddest reason of them all is that we simply do not support semi-transparent block textures. I asked about this back when I was making the glass block and the thing is, semi-transparency is crazy expensive, rendering-wise. I’m not a graphics programmer so I can’t talk in detail about why that is, but basically it adds a whole nother level of calculations required to every single block, because if just one blocktype is to be semi-transparent, all other blocks are affected by that. Anything that adds to the expense of rendering one block even a little bit becomes a BIG HUGE EXPENSE when you’re rendering a world made of thousands and millions of blocks.

I yelled and screamed about it(well, okay, I pouted a bit) but 1-bit alpha is all I get, so basically a pixel is either completely transparent or completely opaque. No in-betweens! This directly affects specularity and normal maps too, so I can’t have a ‘completely transparent’ block that’s still shiny like glass.

I tried a bunch of different ways to work around this including some old-school dithering effects, but nothing looked right - fine dithering looked too solid, larger patterns looked artificial and weird, ‘what if the glass is just opaque’ missed the point of glass blocks entirely, et cetera. I couldn’t find a good compromise! I’m still open to rethinking the frame design, but without the frame to tell you something is there, the glass block would just be completely invisible. And the frame needs to be relatively hefty so it doesn’t just get mipmapped out of existence at a distance.

FWIW, we do support semi-transparent materials on items, creatures and player characters. The glue, blood and healing items that we recently added to the game are in translucent glass bottles, although I need to spend some time working on that as it runs into some 3D sorting issues ingame. They currently don’t look much like they do in Maya, which is definitely a big issue for me. Let me assure you that I am very dedicated to getting the best-looking glass I can achieve with the tech I have :stuck_out_tongue:

19 Likes

I think it would be fine to have multiple different types of glass, or at the very least let glass use the connected textures. The current frame would be fine if it was only along the outside of the window, rather than make the window a checkerboard.

2 Likes

Do props also support semi-transparent textures?

This would be a nice effect! It’s technically doable I think, but unfortunately as I already mentioned, any glass block that doesn’t have a frame would be completely invisible. So if you made a really big pane of glass like this, it would be confusing for people who can’t see the frame when they run into apparently solid air.

They do! More or less anything that isn’t a block does. We haven’t made much use of semi-transparent materials yet but I’d certainly like to do more with them.

1 Like

Bugbear expression is good inspiration to me :slight_smile: Already tried to draw one. The coolest result was a capsule like bug. Really nice, although one could say there is a reference to Pokemon. But I don’t have that much of an affinity to this game (never played it, cannot say whether I’d like it or not).

Hey @jesshyland - I know this is an old topic, but @Faelan just linked your reasoning for the current glass and it’s the first time I’ve read it. Is the current glass still open to be revisited? If so, would it be possible to have a frame around the outside of connected glass blocks, as mentioned by @alexanderyou, but have any middle blocks take on a pattern of their own; something less intrusive than the current border.

Here are some examples - not exactly these, but something along these lines - and something that works well when repeated;

To be clear, the glass wouldn’t be frosted, as I understand that’s not possible given the current system. The glass would be opaque, with a sold pattern in the middle of any central glass blocks - outer blocks would retain your current window frame.

I’d love to hear your thoughts.

9 Likes

I’d certainly like to make a patterned glass block at some point as a more ornamental alternative to the plain glass block. We don’t currently have a system for changing textures based on adjacent blocks that would be required for this idea of framing ‘only the edges’, so that would require some engineer time on top of the usual texture authoring time to make a new block.

I do want to revisit glass at some point, but the solution is not going to be a simple fix and it’s just not a high priority right now.

6 Likes

Thanks for the reply @jesshyland. Far be it from me to tell you things you’ve no doubt already thought of.

Another quick one; don’t door pieces change depending on adjacent doors? If you stack two doors they become a big door, rather than two single doors.

Doors are made of meshes rather than simply voxel blocks, so they don’t have the same restrictions as normal blocks. We use some fancy code magic to determine which parts of the door mesh to use where, depending on how you’ve placed the pieces.

Using meshes instead of voxels is one possible solution for glass as it sidesteps the alpha transparency issue(meshes can have semi-transparent textures as you may have seen on some items), but they’re not as flexible as voxel blocks and we don’t want people to be building whole structures out of meshes as that could lead to problems.

7 Likes

I noticed that you can’t see though glass underwater. It appears as kinda flowing water against the glass and not as a transparent block.

Is there a plan for better glass? There are some great suggestions in this thread, but it’s over a year old.

  • 1 for the frameless glass too.
1 Like

glass underater/underlava is a very different (equally hard) problem compared to just semi-translucent glass.

semi-translucent glass needs a rendering engine overhaul for order-independent transparent alpha rendering to be viable.

seeing into water/lava through glass requires a much more complex fog-rendering solution that can allow fog parameters to change volumetrically for a single pixel of the screen (eg indoor fog up until the point you enter the water, where it then has to change to “water fog”) otherwise it wouldnt look like underwater/underlava it would be entirely see-through with the same fogging as the indoor of the building and look totally broken… OR assuming the semi-transluent glass works, would have to be hacked so that glass against water/lava is given a very high alpha to “emulate” fog through the water/lava but would be equally broken looking.

Note, if careful you can get an idea of the fog issue on allowing glass to look into water/lava, if you get the camera so that the screen is “half underwater” and “half above water” then fog will go super weird as half of the screen will render with the wrong fogging depending on whether the centre of the screen is in water or not. If you get it so that the water is not rendered with the correct fog, that is what it would end up looking like if you could see out into the water/lava through glass underwater/lava, aka totally wrong.

4 Likes

@lucadeltodecso So are you saying that you can make glass see through looking into water but it would have to be completely transparent with no fogging like above ground unlike when we swim in water and it fogs off into the distance?

Generally yes, including for lava which would look waay more broken given how dense the fog in lava is.

1 Like

@lucadeltodecso Ah ok … personally I wouldn’t mind that for glass underwater as my aquarium is perfectly clear when I look through it but if I go swimming and open my eyes it’s more foggy which is why I’d use a face mask.

I wouldn’t expect lava to be see through at all as essentially it’s molten rock.

5 Likes

I spent aaaaages in EA building an underwater base and then when I finally cleared the foliage out from behind the glass… ugh. I understand the limitations but I’m not sure I understand why it sort of works in places. I’m sure I remember if I looked up through glass into water it worked and looked as I’d expect.

I also noticed that in certain light on Therka at specific times of day, the detail outside would start to emerge as silouhettes through the water and I often wondered why it couldn’t at least do that all day and night.

2 Likes

Out of interest, how comes we have fancy translucent glass on the Ornate Wood Door? If it’s possible there, can we have specialist/different glass blocks do the same?

1 Like

The doors are meshes, whereas the glass is a block - the transparency requirements and overheads for blocks work differently

1 Like

Aha!

Weeeeeeeell… given they still:

  • block us
  • block mobs
  • take a block’s space
  • can be broken & placed again like a block

Would it be possible to have a different glass as a mesh?

1 Like