yeah actually I can confirm both methods work as far as edge matching
the tiles.

if you want to tile the same perlin heightmap you set that stitch
parameter to true:

var bmd:BitmapData = new BitmapData(512, 512, false, 0);
bmd.perlinNoise(512, 512, 4, seed, true, false, 1, true, null);

if you want to make heightmap tiles where the perlin function "picks
up where it left off":

var bmd:BitmapData = new BitmapData(512, 512, false, 0);
bmd.perlinNoise(512, 512, 4, seed, false, false, 1, true, null);

var bmd2:BitmapData = new BitmapData(512, 512, false, 0);
var offsets:Array = [];
offsets.push( new Point() );
offsets.push( new Point() );
offsets.push( new Point() );
offsets.push( new Point() );
offsets[0].x = 0;
offsets[0].y = 512;
offsets[1].x = 0;
offsets[1].y = 512;
offsets[2].x = 0;
offsets[2].y = 512;
offsets[3].x = 0;
offsets[3].y = 512;

bmd2.perlinNoise(512, 512, 4, seed, false, false, 1, true, offsets);

So what that is does is build the next unique heightmap tile edge-
matched to the previous one by offsetting where the perlin function
begins calculating. It's just like if you had made a 512 X 1024
heightmap to begin with and cut it into two 512 X 512 maps. That's
great since it looks possible to generate completely unique terrain in
any direction, while only having to have that one small section in
memory at a time. Remains to be seen whether it will perform in real
time. I'll update when I try it.

On Jun 8, 9:12 pm, Jahiro <macro.mar...@gmail.com> wrote:
> I too am really interested in how to go about this - I have an idea
> that might work.
>
> I don't know anything about best practices around procedural terrain
> generation so apologies if this sounds dumb, but could you do
> something like this?
>
> 1) generate a big strip of Perlin noise bitmap, like 1000x4000
> 2) use the Perlin noise as a HeightMap and generate the terrani using
> the Broomstick Elevation class
> 3) fly the camera over the terrain - when the camera gets close to the
> edge of the terrain, repeat steps 1 and 2 above and plug on another
> strip of generated terrain.
>
> Now, the 2 generated terrains obviously wouldn't match up nicely - the
> 2 edges that touch would have very different topology, so there would
> have to be an algorithm that takes the vertices along the edges of the
> 2 terrains that need to join up, and 'stitch' them together, by
> working out a nice way to blend the 2 edges.
>
> Does that sound feasible? That was the approach I was going to take,
> but would be great to hear of the 'proper' way to do things.
>
> On Jun 7, 8:52 am, Choons <chadkim...@gmail.com> wrote:
>
>
>
>
>
>
>
> > hell yeah David's demo on JITB has me stoked.
>
> >http://www.derschmale.com/2010/10/07/ray-tracing-with-pixel-bender-us...
>
> > Now how can I do exactly that in Broomstick? I'm studying his source
> > code now. The 2nd preview release of Pixel Bender 3D is out but sadly
> > looping is still not implemented so the same main issue he mentions in
> > his article remains. God it looks cool though
>
> > On Jun 6, 11:47 am, Michael Iv <explomas...@gmail.com> wrote:
>
> > > David Lenaerts, Away3D team member .He has got an article on terrain
> > > raymarching
> > > his blog "Der Schmale"
> > > Also these two articles are very informative.I also want to develop such a
> > > utility but have to much work now.If Away could put such a tool into the
> > > framework it could be really nice.
>
> > >http://www.subblue.com/blog/2009/3/7/tracing_a_terrain
>
> > >http://iquilezles.org/www/articles/terrainmarching/terrainmarching.htm
> > > <http://www.subblue.com/blog/2009/3/7/tracing_a_terrain>
>
> > > On Mon, Jun 6, 2011 at 7:35 PM, Choons <chadkim...@gmail.com> wrote:
> > > > @Ringo I'm interested to see what I've come up with too ; ) I'll post
> > > > it soon. No Bullet Flash in it yet but that is next.
>
> > > > @Michael which David? There's about 4 regular Dave's on here.
>
> > > > I got my head around (tried to) some multi-fractal solutions like
> > > > rescale-and-add and noise synthesis this weekend. They look like good
> > > > solutions to handle creating terrain on the fly that can also do LoD,
> > > > but how to texture/color them isn't obvious to me. I'm hoping not to
> > > > to have to reinvent the wheel here if someone has already got a
> > > > working solution.
>
> > > > On Jun 6, 1:46 am, Michael Iv <explomas...@gmail.com> wrote:
> > > > > I think you should talk to David
>
> > > > > On Mon, Jun 6, 2011 at 9:31 AM, ringodotnl <spee...@gmail.com> wrote:
> > > > > > Hey Choons,
>
> > > > > > Interested to see what you come up with.
>
> > > > > > On Jun 5, 7:55 am, Choons <chadkim...@gmail.com> wrote:
> > > > > > > Hi - I've been working on a flying demo and have started looking 
> > > > > > > at
> > > > > > > ways to create a procedural terrain that always fills in ahead of 
> > > > > > > the
> > > > > > > flight direction and is destroyed as it scrolls off the screen. 
> > > > > > > I'm
> > > > > > > partial to a diamond-square approach but wanted to check in here 
> > > > > > > to
> > > > > > > get ideas before I proceed. How would you guys go about it in
> > > > > > > Broomstick?
>
> > > > > --
> > > > > Michael Ivanov ,Programmer
> > > > > Neurotech Solutions Ltd.
> > > > > Flex|Air 
> > > > > |3D|Unity|www.neurotechresearch.comhttp://blog.alladvanced.net
> > > > > Tel:054-4962254
> > > > > mich...@neurotech.co.il
> > > > > t...@neurotech.co.il
>
> > > --
> > > Michael Ivanov ,Programmer
> > > Neurotech Solutions Ltd.
> > > Flex|Air |3D|Unity|www.neurotechresearch.comhttp://blog.alladvanced.net
> > > Tel:054-4962254
> > > mich...@neurotech.co.il
> > > t...@neurotech.co.il

Reply via email to