[Mod] Hexagonal [hexagonal] [POC]

Post Reply
User avatar
GreenXenith
Member
Posts: 1356
Joined: Wed Oct 28, 2015 01:26
GitHub: GreenXenith
Location: UTC-8:00
Contact:

[Mod] Hexagonal [hexagonal] [POC]

by GreenXenith » Post

Hexagonal

This is a proof-of-concept mod I made a while ago. It is already on the ContentDB and was tweeted about by @MinetestProject.
I figured others might be interested.

Don't use this if you value your frames.

This mod registers a few nodes from existing default nodes.
Nodes are meshes, so expect frame drops with larger quantities.

Inspired by a fake Minecraft render someone made:
Spoiler
Image
What I made:
Image
Mapgen not included.

Sauce: https://github.com/GreenXenith/hexagonal/
License: MIT
Depends on default just for example nodes. This can totally be changed.

It took me an hour to make the base concept, and maybe another hour or two to get the placement working properly.
No, I do not plan to expand on this.
YouTube | Mods | Patreon | Minetest Discord @greenxenith

You should not be able to read this message.

CalebJ
Member
Posts: 407
Joined: Sat Dec 29, 2018 19:21
GitHub: KaylebJay
IRC: KaylebJay
In-game: CalebJ
Location: Tunnelers' Abyss

Re: [Mod] Hexagonal [hexagonal] [POC]

by CalebJ » Post

But ... most diamonds are not hexagonal! :D
+1, nice concept and mod!

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] Hexagonal [hexagonal] [POC]

by Sokomine » Post

Funny idea. We might start playing civilization. But I fear for my framerate.
A list of my mods can be found here.

User avatar
v-rob
Developer
Posts: 970
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob
IRC: v-rob
Location: Right behind you.

Re: [Mod] Hexagonal [hexagonal] [POC]

by v-rob » Post

You should find a way to automatically remove adjacent faces so less faces are rendered.
Core Developer | My Best Mods: Bridger - Slats - Stained Glass

User avatar
GreenXenith
Member
Posts: 1356
Joined: Wed Oct 28, 2015 01:26
GitHub: GreenXenith
Location: UTC-8:00
Contact:

Re: [Mod] Hexagonal [hexagonal] [POC]

by GreenXenith » Post

v-rob wrote:You should find a way to automatically remove adjacent faces so less faces are rendered.
GitHub link in OP, feel free to make a PR.
(I don't want to roll my own culling, thanks).
YouTube | Mods | Patreon | Minetest Discord @greenxenith

You should not be able to read this message.

Chem871
Member
Posts: 999
Joined: Sat Aug 19, 2017 21:49
GitHub: Chemguy99
In-game: Chem Nyx
Location: My Basement's Attic

Re: [Mod] Hexagonal [hexagonal] [POC]

by Chem871 » Post

Yay! Battle for Wesnoth in Minetest!
But srsly though, cool mod. Are the nodes actually hexagonal prisms, or are they just made to look like it?
What is SCP-055?

User avatar
GreenXenith
Member
Posts: 1356
Joined: Wed Oct 28, 2015 01:26
GitHub: GreenXenith
Location: UTC-8:00
Contact:

Re: [Mod] Hexagonal [hexagonal] [POC]

by GreenXenith » Post

Chem871 wrote:Are the nodes actually hexagonal prisms, or are they just made to look like it?
Because they are mapped to a square grid, they are not true hexagons.
YouTube | Mods | Patreon | Minetest Discord @greenxenith

You should not be able to read this message.

Schnux
New member
Posts: 7
Joined: Thu Oct 11, 2018 21:53
GitHub: Schnux2

Re: [Mod] Hexagonal [hexagonal] [POC]

by Schnux » Post

At first, this looks great!
I once had the same idea (I posted it here), but my implementation was much worse (every prism was an entity...). But there is one feature which I think would improve the "hexagonal" appearance of the mod: "hexagonal pixels".
What I mean with this is the following: It is possible to divide the upper and lower hexagon into lots of small triangles and UV-map each of those to a single pixel. Such a model would then look like it had "triangular pixels" instead of normal, squared pixels. Those "triangular pixels" can then be easily combined into small hexagons. An example: this texture (64*64 pixels, but models with different texture sizes are easy to make)
Image
would then look in-game like this:
Image
A better texture designer than me could probably make nice things out of those "triangle pixels" which fit better to the hexagonal shape than squared pixels, even proper tiling is possible. The only downside is that your framerate goes even lower. (I did not really test it, but those models contain a lot of faces.)
Of course could one also create such hexagonal shapes with simply much larger textures, but with this approach, it is way easier (one needs only six pixels per hexagon instead of thousands).
For my mod, I have already programmed a script (this one) that auto-generates such a model. As far as I see it, this script could be easily included into your mod, I just didn't want to make a PR because I didn't know whether you are even interested in such a feature. What do you think about it?
Attachments
screenshot1.png
screenshot1.png (20.7 KiB) Viewed 1014 times
hex_test_prism.png
hex_test_prism.png (6.66 KiB) Viewed 1014 times

User avatar
GreenXenith
Member
Posts: 1356
Joined: Wed Oct 28, 2015 01:26
GitHub: GreenXenith
Location: UTC-8:00
Contact:

Re: [Mod] Hexagonal [hexagonal] [POC]

by GreenXenith » Post

Schnux wrote:But there is one feature which I think would improve the "hexagonal" appearance of the mod: "hexagonal pixels".
What I mean with this is the following: It is possible to divide the upper and lower hexagon into lots of small triangles and UV-map each of those to a single pixel. Such a model would then look like it had "triangular pixels" instead of normal, squared pixels. Those "triangular pixels" can then be easily combined into small hexagons. An example: this texture (64*64 pixels, but models with different texture sizes are easy to make)
Image
would then look in-game like this:
Image
A better texture designer than me could probably make nice things out of those "triangle pixels" which fit better to the hexagonal shape than squared pixels, even proper tiling is possible.
The only downside is that your framerate goes even lower. (I did not really test it, but those models contain a lot of faces.)
This.
As far as I see it, this script could be easily included into your mod, I just didn't want to make a PR because I didn't know whether you are even interested in such a feature. What do you think about it?
The UV map needs to be compatible with regular node textures. A 16x16 texture needs to be able to be mapped to the hexagon, though it looks like the hexagons in your large texture are still 16x16 (stretched to 1:2) so that might not be terribly difficult to modify. I am not fond of the insane triangle count though.

I currently don't have plans to do anything with this mod (as noted in the first post), but if I implement backface culling, the high poly count might be usable.
YouTube | Mods | Patreon | Minetest Discord @greenxenith

You should not be able to read this message.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests