Jump to content
  • Advertisement
  • entries
  • comments
  • views

Back to the floor

Sign in to follow this  


After posting the previous, I kept on tinkering and removed a few steps from the process. It didn't make sense that I kept having to bounce back and forth between the GIMP and the Accidental tool, so I proceduralized the entire thing, removing the GIMP stages completely. The result can be found here. This link is to an executable of my Accidental tool, along with the Lua scripts for this tiling floor creation method, and associated textures.

As background, my Accidental project is an exploration into many things procedural. The tool is merely an implementation of a Lua script command-line interpreter with some of my own home-grown tools. To see the floor script in action, execute the accidental.exe interpreter, then enter the following commands at the prompt:


This generates a tile floor. As with most things procedural, the possible domain of variable settings is fairly extensive, even in this rudimentary stage. Open up the tilingfloor.lua file and take a look at the various values at the top. There are values for the number of points to seed the Voronoi with, the width of the mortar lines, radius of the blur effect, type and strength of turbulence, etc... A typical tile generated from the default settings looks like this:

I modified the lighting parameters of the bump map and reduced the detail of the mortar texture to reduce the problem noted in the preceding journal entry of the mortar lines appearing raised, rather than the stones.

There is another option I added (disabled by default) called dooverlay. Setting this option to true before creating a floor causes the stone texture to be overlain with a random color overlay, to give the various stones different hues. While this functionality is extremely crude at the moment, it could be used with more detail to achieve more realistic results. A sample floor created with overlay enabled looks like this:

Forgive the garish red colors; the table was thrown together in haste, and the overlay function is a simple half-and-half blend of the underlying texture and the overlay color.

You can modify the settings to achieve more complicated results. In this version, the mortar and stone textures are loaded from TGAs, but there is no reason they themselves could not also be procedurally generated.
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!