Xcylin: A Sci-Fi open-world voxel RPG [Updated][Greenlit :D]

Thanks, it’s always nice to hear when ppl like the game :slight_smile:

I don’t use SSAO as it only takes in account the visible geometry (= screen space). The problem with that is, that while it might look good on the surface, it will look unrealistic within caves as they should be totally dark most of the time but they wouldn’t be with SSAO.

So what I actually do is I have a 3D texture of light values (I call it a LightDistributionMap) that are computed when the sector is constructed. Basically all light flows down from the top (from the sun) and is then smeared along the x/z-axis. So in the shader I just use the LightDistributionMap texture and calculate my lighting by using the normals of the surface and get the light value where these normals point at. And using more than one sample interpolated gets me this quite smooth look of the blocks :slight_smile: But still the calulcation of these LightDistributionMaps takes quite some time (around 600ms per sector) so that I might still have to change a few things …

Thanks. In a normal world like the one in the video there are about < 600000 textured faces (51 of 32x32x128 blocks sectors are visible). But the more difficult thing to solve is to keep the amount of objects (geometries) low while at the same time allowing to modify the object’s mesh within a reasonable time.

And yes, as you already noticed there are not only cubic shapes possible: I also added the possibility to use cusom meshes (from blender). They are also tesselated to one big shape per stripe but overlaping faces are not removed due to the immense amount of permutations needed to determine what block with what other block would have what faces removed (but still I also think about possible solutions for that). Meanwhile I plan to limit the objects with custom meshes that the player can place by natural factors like the items that are needed to replicate (=craft) them.

Thanks, it’s always nice to hear when ppl like the game :slight_smile:

I don’t use SSAO as it only takes in account the visible geometry (= screen space). The problem with that is, that while it might look good on the surface, it will look unrealistic within caves as they should be totally dark most of the time but they wouldn’t be with SSAO.

So what I actually do is I have a 3D texture of light values (I call it a LightDistributionMap) that are computed when the sector is constructed. Basically all light flows down from the top (from the sun) and is then smeared along the x/z-axis. So in the shader I just use the LightDistributionMap texture and calculate my lighting by using the normals of the surface and get the light value where these normals point at. And using more than one sample interpolated gets me this quite smooth look of the blocks :slight_smile: But still the calulcation of these LightDistributionMaps takes quite some time (around 600ms per sector) so that I might still have to change a few things …

Interesting, I never thought of it that way thanks for sharing! If it isn’t a hastle would you mind uploading a LightDistributionMap texture somewhere?

Hey thanks! I was doing some testing and with a generic simplex noise method I have a 160x160x32 volume and it generates about 2million tris, it doesn’t do any face merging, or tesselation, and it only allows for cubic geometry at the moment. But as you can imagine, 2million tris kicks the engine into around 40-60fps on my card. So the performance isn’t necessarily awesome. I need to do some more reasonable terrain gen to see if it’s better as right now it’s pretty close to checkerboarding so I may be seeing the worst case scenario.

Thanks for the info!

@Sleaker
Did you just say you’re rendering 2 million triangles?

Interesting, I never thought of it that way thanks for sharing! If it isn’t a hastle would you mind uploading a LightDistributionMap texture somewhere?

That sounds about right. In one of my old voxel engines I would render close to a quarter million tiles at times, which resulted in quite a high triangle count.

I just saved and linearized it to a 2D image (because as I said it’s a 3D texture):

http://xcylin.com/screenshots/map-total.png

It stores the information only in the red chanel of the texture (that’s why it is all red). The white lines/numbers are not part of the original texture. The light map here is from one sector and each slice shows the x/y-information (mirrored along the x axis, because the y axis points down in images, but up in OpenGL), the white number gives the according z position within the sector. A sector has 32x128x32 blocks.

I hope this helps a bit :slight_smile:

Hey thanks! I was doing some testing and with a generic simplex noise method I have a 160x160x32 volume and it generates about 2million tris, it doesn’t do any face merging, or tesselation, and it only allows for cubic geometry at the moment. But as you can imagine, 2million tris kicks the engine into around 40-60fps on my card. So the performance isn’t necessarily awesome. I need to do some more reasonable terrain gen to see if it’s better as right now it’s pretty close to checkerboarding so I may be seeing the worst case scenario.

Thanks for the info!

@Sleaker
Did you just say you’re rendering 2 million triangles?

That sounds about right. In one of my old voxel engines I would render close to a quarter million tiles at times, which resulted in quite a high triangle count.

I just saved and linearized it to a 2D image (because as I said it’s a 3D texture):

http://xcylin.com/screenshots/map-total.png

It stores the information only in the red chanel of the texture (that’s why it is all red). The white lines/numbers are not part of the original texture. The light map here is from one sector and each slice shows the x/y-information (mirrored along the x axis, because the y axis points down in images, but up in OpenGL), the white number gives the according z position within the sector. A sector has 32x128x32 blocks.

I hope this helps a bit :slight_smile:

Thanks :slight_smile:

Thanks :slight_smile:

Heh, sorry I typed that when I was in the pub and I actually meant "insert name"craft that you see everywhere.

I think minecraft is a piece of art. I do however have a mixed view on minecrafts progress over the years, just seems like notch should work of refactoring and getting a proper mod api (which I think is happening now).

This game looks good, it is unique. Keep at it.

Sorry for my abstract , misleading and vague replies.

Notch doesn’t work on the game anymore and considering the dev team is only a few strong, I think they are doing a fine job. Can you even imagine how hard it would be to make a mod API that works very well?

Well yeah nothing is easy but also not impossible, the community managed to make one that sort of works. They are doing OK but IMO, it feels like nothing ever gets added to the game that makes it feel fresh, mostly internal code changes that is not immediately visible to the player.

I’ve not checked on it in the past year mind you.

A few people vs. Thousands of developers in the community. Yeah, that’s a fair comparison.

If you haven’t checked the game out in a while then it’s not fair to criticize the developers who are working hard adding new features in often. The last year has pretty much been all new features. Now, I’m not a Minecraft lover, but I give credit where it is due, and the Mojang team is definitely doing good.

Heh, sorry I typed that when I was in the pub and I actually meant "insert name"craft that you see everywhere.

I think minecraft is a piece of art. I do however have a mixed view on minecrafts progress over the years, just seems like notch should work of refactoring and getting a proper mod api (which I think is happening now).

This game looks good, it is unique. Keep at it.

Sorry for my abstract , misleading and vague replies.