Jump to content

Endless curvy lane


Recommended Posts

hehe.  Hi hunts!  Yeah, I want that, too.  In fact, my road/lane needs to have hills and valleys, too.  How about banked turns?  I dream of luge tracks... for my 'lane'.  I have a bobsled model that I want to try-out.  :)

Geometry God @jerome recently created a built-in dynamic terrain feature.  Here's a playground of it (drag to change directions).

What I proposed to Jerome... was an "influencing tube"... that the noise-to-heightMap thing would "avoid". 

I don't know if he's read that proposal, though, as I was scared to ping him, because he is my hero and I think I bother him too often. He's really geometrically-smart.  (I think he even knows trig!)  :)

In simpler words, the dynamicTerrain could be given a tube... as an arg/parameter.  The terrainGenerator would not grow a mountain... into the bottom of the tube.  And it would POSSIBLY have an option to "raise" a path across a valley... up-to the bottom of the tube.

This could be used for making roads and rivers... across very bumpy terrain.  The tube isn't rendered, but the terrain will have a "path" (lane) that matches all the curves of the tube, left-right, up-down, as best it can.  It flattens those areas... so that a river or road texture could (possibly) be added to that flattened "trough" or "groove" (likely using the BJS decal feature... whose road/river texture is dynamically-generated using the very same tube). 

Perhaps BJS decal would be a bad choice for that.  Dynamic terrains CAN go-on forever, and so, the roadway/river texture COULD do the same.  Even the tube... might need to be dynamic (go-on-forever)... for go-on-forever terrains.  hmm.

Anyway, a similar "flattener" method could be used to place lakes and other flattened areas (building locations)... within bumpy generated terrains, too.

All in all... no real solution, here, sorry.  Hopefully, smarter people with comment soon.  :)

Link to comment
Share on other sites

Hey, that's not bad at all!  Coooool!   Your little character won't have much time to avoid an on-coming beer truck, though.  :)  He seems a bit near-sighted.

Still, this is nice!  A decent road.  We could easily drive a beer truck on that.  :)  Very good!

Link to comment
Share on other sites

Create a gigantic, Earth-sized CSG with lanes cut out of it. If you make it predefined there will be that much less JS running during the render loop. Webgl has vertices limiitations, so you will probably have to only load portion of it at a time. Maybe it could be a sphere with a 16k resolution parallax map on it and scaled x 1000. Just throwing out some experimental ideas.

Link to comment
Share on other sites

Very good.  But wasn't it supposed to be made "within" or "atop" a bumpy heightMap?  Maybe I lost "track" of objective.  :)

I was working with another forum user... finding some Bezier stuff, and I came across this interesting beast.


Not sure if there is anything useful in there, but I thought I would pass it along... what the heck.  It's not as cool as yours, but it's still okay.  You might be able to steal some Bezier code from there... smooth out the corners, perhaps.  Some other Bezier-using playgrounds are here, as needed.  Party on!

Link to comment
Share on other sites

hehe!  ALRIGHT!  VROOOOOOM.  :)  That boy is cookin'!  Nice.

The y-jitter?  Nothing obvious, yet.  It looks like somebody roto-tilled the source code... gave me a headache.  :D

Highlight code, then tab, or shifted-tab... ya know?  A visit to the dent-ist to fix the indentures, eh?  ;)

Highlight bunch of code, then control / is good, too.  Handy.  Learned that on this forum.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...