[IMG]http://i.imgur.com/iRRWPb4.png[/IMG]
Voxels are blocks. The kind Minecraft has. Voxels are cool. A bunch of people have tried doing voxels in Garrysmod, and some attempts have been really impressive, but there's only so much you can do with a lua implementation. After getting fed up with glua's lack of binary arrays and its shitty mesh functions, I decided to make binary module for voxels.
My goal is to make a fully configurable module that can be used in gamemodes. I want to expand Gmod's potential with real dynamic maps.
[B]Media[/B]
[quote][video=youtube;8wG6Vt5SXJ8]http://www.youtube.com/watch?v=8wG6Vt5SXJ8[/video][/quote]
[B]Current Features[/B]
- Configurable block size, map size, block types, and texture atlas setup
- Fast mesh generation and ray/hull tracing
- Optional physics mesh generation
- Built-in networking
- Bulk modification functions
- Map saving and loading
- Configurable map generation via a lua function
[B]Release[/B]
[i]Stay tuned.[/i]
The only thing that currently uses Voxelate is the testbed, gm_f1atgrass. Installation instructions are here: [URL]https://github.com/glua/gm_f1atgrass#gm_f1atgrass[/URL]
The testbed is pretty simple if you want to take it apart and change it.
More documentation is here: [URL]https://github.com/glua/gm_voxelate/wiki[/URL]
[B](Potentially) Frequently Asked Questions[/B]
[I]Does this mean Minecraft in Gmod?[/I]
Now it does.
[I]Will it support infinite maps?[/I]
Now it will.
[I]Why do I have to install this manually?[/I]
Modules present a security risk. Modules can do [I]anything[/I]. They aren't limited by glua's API. This module does stuff that is difficult to do with lua. It also does this stuff much more efficiently. I hope that the stuff it does is worth the trouble of a manual install.
Cool. I've always wanted to dig in gmod.
[quote]Does this mean Minecraft in Gmod?
Probably. I want nothing to do with it though. I have higher hopes for this than another goddamn Minecraft clone.[/quote]
Minecraft gamemode in 3.. 2..
There have been multiple minecraft clones in gmod that worked rather well.
[editline]19th May 2015[/editline]
A solution to fast physics mesh generation they did was to [I]not[/I] do that. Instead, use simple invisible cubes for physics, keeping them only where players or physics objects are very close to resting on.
What's the limitations right now? I can think of a few ways to include this in our upcoming gamemode
Right now I [I]think[/I] it will work in multiplayer but I'm not sure, I'm planning on testing it on a friends server once I bother to compile for linux. There will almost certainly be issues with clientside models/ragdolls falling through the voxels and there might be some other prediction issues. There is a bug with player movement, which is based on traces as doesn't require physical mesh generation to be enabled, because fuck floating point math. Enabling physical meshes on voxels with a very [I]small scale[/I] will probably cause you to crash. I know this because someone goaded me into setting the scale to 1 unit-per-voxel, which, come to think of it, is the default setting.
There are some rendering artifacts because fuck sprite atlases at fuck mipmaps. There are even more severe rendering artifacts if you turn mipmaps off because fuck mipmaps. You can prevent the rendering artifacts by using a point filter on the texture, which will make it look more minecraft-y, but this will lead to even more terrible artifacts if you're dealing with high-resolution textures. I "fixed" the issues in the demo by surrounding the grass textures with black in the texture atlas to make it less noticeable. The system also cannot load PNG files as textures like Gmod can for whatever reason. I plan to fix these problems by auto-generating the texture atlases in the form of 3D array textures.
Now that the bugs are out of the way, I'll move onto actual limitations. The size of a set of voxels is limited by your computer's memory (actually by the memory limit of a 32 bit process). Every block is hardcoded to take up 2 bytes, and this may increase if I ever bother to add lighting. There are no built in limits, so allocating too much memory and crashing Gmod is a very real problem. I don't see networking being an issue at the moment. I couldn't figure out how to use Source's networking functionality directly from C++, so I ended up dipping back into the Lua state for it. This will put some stress on the garbage collector, which should decrease once I move the compression code C++ - side.
As for limitations to the system itself, it currently only supports opaque cubes with a single texture. It will be easy to add transparant blocks and blocks of different shapes, but adding non-cubical blocks could pose a problem because of the stupidly over-optimized tracing algorithm and my lack of knowledge on how to adapt it to non-cubical shapes.
[editline]20th May 2015[/editline]
Also I'll get the documentation written now.
I would love to use this, I will do testing on a local server later, but great work so far man, I plan on using this as soon as I test its capabilities on my own!
Docs are done. Note that everything is really subject to change. One limitation I forgot: the entire map generation is hardcoded. This will change soon.
[QUOTE=michael93174;47766067]I would love to use this, I will do testing on a local server later, but great work so far man, I plan on using this as soon as I test its capabilities on my own![/QUOTE]
I wish you the best of luck. Note that the server is going to need gmsv_voxelate_win32.dll installed and everyone on the server is going to need gmcl_voxelate_win32.dll installed.
[editline]20th May 2015[/editline]
If you've already installed the testbed, I recommend you re-install it before messing around in multiplayer. I forgot to send the lua + atlas to clients.
This is really cool. I've seen similar projects come and go but this seems the most promising.
The testing server is up and running!
IP: 45.79.111.35
Updated module: [URL="https://github.com/glua/gm_f1atgrass/releases/tag/VOX-PRE-2"]Link[/URL]
I'll get everything up on github by Friday so you have some reason not to believe I'm trying to give you keyloggers or some such shit.
[DEL]Testing server closed, we built some cool stuff and I don't want it getting greifed before I write code to save it. I'll upload pictures when I'm less tired.[/DEL]
Fuck it, my friend crashed it. It's open season, go wild. I'll throw it on github very soon because there's really nothing I can do ATM without source control and I don't want to host my own repositories.
Shebang! Release completed. The source is up on Github here: [URL]https://github.com/glua/gm_voxelate[/URL]
I also made a Linux dedicated server build that may or may not work on your box.
The only major issue at the moment is a bug with hull traces that occasionally causes huge fuckery with player movement. Here's the code:
[URL]https://github.com/glua/gm_voxelate/blob/master/src/vox_Voxels.cpp#L336-L513[/URL]
The hull tracing algorithm is based on the ray tracing algorithm, which is based on this:
[URL]http://www.cse.yorku.ca/~amana/research/grid.pdf[/URL]
If anyone is really interested in defucking it, I can provide a more detailed explaination of the algorithm's workings and maybe a few shitty drawings.
[QUOTE=Noi;47859671]Just hope that we won't get dynamic fnaf maps.[/QUOTE]
Instead of trying to reassure everyone that you dislike the FNAF community (might as well poke fun at Tumblr while you're going for easy targets), why not actually talk about how fucking great this script is?
On it's own, it's nothing that I'd be interested in. However, the amount of work and logic you'd have to put into making this a reality is awesome, and I'm happy you've progressed this far, dude.
[QUOTE=Noi;47868433]In other words: why reply[/QUOTE]
[QUOTE=Noi;47859671]Just hope that we won't get dynamic fnaf maps.[/QUOTE]
Why bring fnaf up in a thread about voxels? Then complain that someone brought it up?
There was another MC type gamemode some months ago that was showing a lot of promise too with auto generated terrain and infinity sized map, I can't find the link to it but I hope this one doesn't drop off the radar.
[QUOTE=Noi;47868573]I just remember parakeet made some fnaf pills and then kids started spamming him about "maek fnaf2 pills pls".[/QUOTE]
The point I was trying to make is that this is a really big project and something that seems really successful as well - isn't it worth posting about the actual content itself instead of making another lame reference post? (btw, fnaf2 pills is a logical jump from fnaf. fnaf from gm_voxelate is not.)
gm_voxelate is legitimately something that I regularly return to the WAYWO for. That's what makes your post bothersome: it contributes nothing to a thread about something pretty great.
Sorry, you need to Log In to post a reply to this thread.