Procedural infinite terrain... or almost!

Greattings,
This is a simple example of a small terrain turned infinite through wrapping!



BLEND

Very nice. Just a couple of things:

  1. Mist would go a long way to soften the world jumping
  2. The tree’s shift position when the world updates.

Other than that, it works very well.

  1. Yes , I couldn’t find a way to keep the same trees on the same spot. Even though I should get the same value on the same position, something just isn’t right, …wait, I might not being giving the same position for both functions, will have a better look!

This is great thanks for doing this! I second what sdfgeoff said about trees shifting, but I’m also getting a low frame rate. I’m getting about 30 fps even though in the profile it shows only 6% physics being used. I really hope you keep working on this, because it would definitely make creating a game much easier.

Where is the manual for spawning objects with it?And the house does not spawn.

From memory, there’s a list of objects in the script file.

I switched the first tree into a sphere it did not work.The sphere was not added and i had a sphere in the blend.Did you try to do that?

There’s a props list, you place in there what you want to be spawned.

The terrain parameters change the appearance of the terrain.

  1. If your frame rates are low, you can delete the plane mesh in a hidden layer to a plane with less polys! The world update only runs when the player reaches a limit.

Remember to set your terrain twice as big as the limit you set, so you can still see the terrain at a distance.
I’ll disable auto spawning and add an editting function, so you can add your trees, houses, where you want them.
Adding trees and other objects beyond the terrain limit causes them to spawn somewhere else.

So, I’ll dedicate more time into this:

To do:

  1. Add a UI
  2. Add terrain editting functions with save/load, roads, rivers, etc
  3. Allow 3 axis world generation

Thank you for your feed back, I’ll start a proper project for this, as a world generation for game creation.

It still doesnt show my stump.Here’s my blend.Does it show for you?http://www.pasteall.org/blend/24068

You should have the exact names. In the list you put Stump1, the object’s name is Stump…
I also had limited the list size, I’ve corrected that error. I think I’ll also eliminate props outside the limits.

Edit: Doing the last has reduced the number of props to a quarter! Doesn’t look better though! The shuffling problem was solved however!

I replaced all the trees with Stumps1,Stumps2and stump3.And that worked.Did you update the blend or are you still working on it?

Not right now, but I made a few changes. No more limit to the object’s list! And objects wont spawn beyond the limit!

Any chance reposting the .blend? Old link is dead.

It likely wouldn’t work anyways, this thread is five years old and Blender updates have broken many a script in that time.

so I have a method that works really well.

Mathutils.noise has a perlin noise function, you can use this to produce terrain,
classifying the areas of the noise by using
if noise<max and noise>min:
do stuff()
we can run perlin worms through the noise.

using many many small splat mapped tiles, one can move the tiles behind to places in front,
making the world procedural and infinite with physics.

I use vertex world space to store the vertex in a dictionary,
this makes it easy to smooth normals across object boundries.

we use player.worldPosition+ player.worldLinearVelocity to get a base point we offset to check to see if tiles need to be filled.

space_bar_borked

Here_it_is_before_the_generator_and_save/load/system

World_canvas

Attachments

WorldStream.blend (488 KB)

Thankyou! I will check this out when I’m at my PC next