Page 1 of 1

Re: Custom Terrain

Posted: Sat Jan 11, 2014 3:58 am
by Samuel
Ogre 1.9 got some nice terrain updates which might take care of a few of your issues.
I'm not sure if they will be made available in Purebasic right away though.
Alexi wrote: What's about the performance? Will a custom terrain-mesh rendered slower, faster or without any difference. How are layers are actually done on terrain.
If you use shaders you should have a similar performance.
From what I've seen a terrain's layers are usually built with alpha blending. A basic alpha blend can be done in a material script, but for multiple layer support
you will need to use a shader.

Re: Custom Terrain

Posted: Sun Jan 12, 2014 5:34 am
by Samuel
Alexi wrote:But how these layers get filled with this resolution. Is there a buffer bitmap in size of a tile to determine the alpha-values?
It's pretty easy to use alpha blending in a material script.
First you need to add a base texture. Then you use an alpha map to put a layer of texture on top of the base.
This process can be repeated for however many layers you want.

This is a basic terrain mesh with 3 texture layers.
Image

Here's the source if you'd like to fiddle with it. If you have any questions just ask.
Alpha Splatting.zip

Re: Custom Terrain

Posted: Sun Jan 12, 2014 10:14 pm
by Samuel
Alexi wrote: btw: can we use different UV-Coords for materials? I would use this alpha-splatting method to smooth egdes on a mesh with a simple from top projection. :D
I'm not sure I understood the question, could you please elaborate?

Re: Custom Terrain

Posted: Fri Jul 18, 2014 5:12 pm
by zxretrosoft
Samuel wrote:
Alexi wrote:But how these layers get filled with this resolution. Is there a buffer bitmap in size of a tile to determine the alpha-values?
It's pretty easy to use alpha blending in a material script.
First you need to add a base texture. Then you use an alpha map to put a layer of texture on top of the base.
This process can be repeated for however many layers you want.

This is a basic terrain mesh with 3 texture layers.
Image

Here's the source if you'd like to fiddle with it. If you have any questions just ask.
Alpha Splatting.zip
Hello Samuel,
OK, it's very nice! Perfect!

I need help, please, this is my first 3D experiment.
I need exactly what you did. But so that I could curl terrain by value.

Eg. as follows:
http://www.imgshare.tym.sk/images/odazh ... lcndfj.png

Spacing between peaks can be on a line or accidental.

But as the peaks get there?

Thanks in advance for any tip! And very very sorry for the horrible English! :oops:

Re: Custom Terrain

Posted: Fri Jul 18, 2014 9:54 pm
by Samuel
zxretrosoft wrote: I need exactly what you did. But so that I could curl terrain by value.
Are you referring to terrain generation by heightmaps?
If you're unsure of what a heightmap is take a look at this page http://en.wikipedia.org/wiki/Heightmap.

It's basically a grayscale image that you use to calculate the height of each vertex on the terrain.

If this is what your looking for I do have an example showing how to create terrains with heightmaps.
Just let me know if you want it and I'll post it when I get a little free time.

Re: Custom Terrain

Posted: Fri Jul 18, 2014 10:10 pm
by zxretrosoft
Samuel wrote:
zxretrosoft wrote: I need exactly what you did. But so that I could curl terrain by value.
Are you referring to terrain generation by heightmaps?
If you're unsure of what a heightmap is take a look at this page http://en.wikipedia.org/wiki/Heightmap.

It's basically a grayscale image that you use to calculate the height of each vertex on the terrain.

If this is what your looking for I do have an example showing how to create terrains with heightmaps.
Just let me know if you want it and I'll post it when I get a little free time.

Thanks for the answer, Samuel!

Yes, that's exactly what I'm looking for. Thank you in advance :wink:

Re: Custom Terrain

Posted: Sat Jul 19, 2014 10:57 am
by Samuel
I created a new topic for the terrain generator. This way it will be easier to find for others who might be interested in it.

Link to terrain generator.