Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Procedural Generation (Voxels)
Abion47 Offline
Senior Member

Posts: 369
Threads: 22
Joined: Oct 2015
Reputation: 46
#1
Procedural Generation (Voxels)

Hi all, I've been exploring and tinkering with HPL3's capabilities as far as things getting procedurally generated at runtime, and I think I've just about cracked how it works. So to demonstrate this, what better way than to build a miniature voxel engine?

[Image: rdxnJt0.jpg]

[Image: 3zxW806.jpg]

[Image: Ta00fgF.jpg]

In the above images, those aren't entities that have been pre-placed in the level editor and rearranged. The only things that exist in the level editor are the plane for the player to stand on (you can see it on the left there) and a technical entity used when creating the voxels. Everything else has been instantiated and added to the map purely from script.

So far, this is just generating the voxels for showing. It has to do it semi-intelligently, only generating the faces that are visible (touch the air) so as to not generate literally hundreds to possibly thousands more entities than is necessary. The voxels themselves can't be interacted with, but the hard part was generating them in the first place, so adding interaction would be as simple as adding relevant callbacks to the generated entities.

Now of course, while making a fully-fledged voxel engine would most definitely be possible within HPL3, but the main purpose of this exercise was to demonstrate that procedural generation is possible. Using this knowledge, it would be then possible to make maps that are procedurally generated, similar to games like Vanish or Dreadhalls.

And wouldn't that be cool?
04-16-2016, 09:12 AM
Find
Radiance Offline
Senior Member

Posts: 319
Threads: 34
Joined: Aug 2015
Reputation: 5
#2
RE: Procedural Generation (Voxels)

This you made within HPL3?

Did you make a script for randomly extruding the faces of the subdivided plane/cube?
04-16-2016, 11:45 AM
Find
Abion47 Offline
Senior Member

Posts: 369
Threads: 22
Joined: Oct 2015
Reputation: 46
#3
RE: Procedural Generation (Voxels)

I used a 2D Perlin Noise function to generate the height of each column of voxels, then used the voxel data to generate the faces. Each voxel face is a separate entity. I had a plan to make it a bit more efficient by creating 9 entities to represent all the possible combinations of visible faces, but that gets a bit more complex than is strictly necessary for a simple demonstration. Tongue

My preferred method would've been to generate it on a mesh level, but I haven't figured out if that is possible yet.
04-16-2016, 11:55 AM
Find
Radiance Offline
Senior Member

Posts: 319
Threads: 34
Joined: Aug 2015
Reputation: 5
#4
RE: Procedural Generation (Voxels)

(04-16-2016, 11:55 AM)Abion47 Wrote: I used a 2D Perlin Noise function to generate the height of each column of voxels ...

How does it look this function?
04-16-2016, 11:35 PM
Find
Abion47 Offline
Senior Member

Posts: 369
Threads: 22
Joined: Oct 2015
Reputation: 46
#5
RE: Procedural Generation (Voxels)

The output of the function is a gradient noise that replicates "random" noise patterns in nature. For example, the cloud filter in Photoshop uses a Perlin Noise function.
04-17-2016, 08:36 AM
Find
pachi Offline
Junior Member

Posts: 8
Threads: 1
Joined: Dec 2015
Reputation: 0
#6
RE: Procedural Generation (Voxels)

Hey, this is really great work Abion! I think there is definitely untapped potential in the horror genre for generated content. If you can combine well crafted scripted situations with the unpredictability of generated I think you could really deliver some powerful scares. I'm interested to see if this mix can work, I know there was another procedurally generated roguelike horror just released named Phantasmal, seems to have mixed to good reviews.
04-17-2016, 07:28 PM
Find




Users browsing this thread: 2 Guest(s)