yeah Hi Jahiro - I'm kind of working on an approach like that too. The
BitmapData perlinNoise function has a "stitch" parameter that is
supposed to generate maps that you can tile. I've decided to try to
manipulate the bitmapData in the heightmap to create a scrolling
terrain effect. So instead of moving your object/camera you make it
look like its moving by scrolling or rotating the terrain. The
question will be whether updating the heightmap data, and passing it
to the Elevation constructor to rebuild the terrain on each frame will
be fast enough AND whether the perlinNoise stitch method really does
generate maps whose edges match. I'm writing code tonight to explore
it.

Another thing I have considered- if I'm not mistaken the way the
Perlin noise function works it should be "shiftable." For instance,
your notion of building a long 4000 pixel strip. Is it possible
instead to build a 1000 pixel long Perlin strip 4 times on the fly (or
as many times as you need) where you are passing to the Perlin
function somehow the coordinates where it last stopped in essence
telling it to "pick up where it left off"? I'm very new to all this
procedural noise stuff so I don't know yet whether that is possible.
One thing I do know that helps in that regard is that random number
generators are really pseudo random so as long as your seed value is
the same the numbers it generates are always the same at the same
point and it should be possible to build the edge of the next tile to
match by using that. That would give a true infinte (almost) terrain.
The main problem I can foresee with that approach is that generating
perlin maps is an "expensive" process and might not work in real time.

There's a great book on all this called 'Procedural Teturing &
Modeling' by Ken Musgrave. I'm trying to understand it all. It's about
ten years since it was published and he uses RenderMan and C in his
examples which complicates things a bit but I highly recommend 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