hunts Posted April 14, 2017 Share Posted April 14, 2017 Hello, it's summer here and the sun is already biting I want to make an endless curvy lane track, i'm not that good with the trigonometry, lol* Quote Link to comment Share on other sites More sharing options...
Wingnut Posted April 14, 2017 Share Posted April 14, 2017 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. hunts 1 Quote Link to comment Share on other sites More sharing options...
hunts Posted April 14, 2017 Author Share Posted April 14, 2017 @Wingnut the playground in your link is not working https://www.babylonjs-playground.com/#2FD2SC#230 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted April 14, 2017 Share Posted April 14, 2017 ooops... I think it's fixed now. http://www.babylonjs-playground.com/#2FD2SC#0 Steering kind-of goes-to-heck after a few turns, though. But, it is only a PG to demonstrate the dynamicTerrain feature... not necessarily a demo in flight simulation. Quote Link to comment Share on other sites More sharing options...
hunts Posted April 14, 2017 Author Share Posted April 14, 2017 @WingnutI think it's the new playground, it keeps refreshing to this Quote Link to comment Share on other sites More sharing options...
Wingnut Posted April 14, 2017 Share Posted April 14, 2017 uhn, probably the 'https' should be 'http'. Not sure. hmm. hunts 1 Quote Link to comment Share on other sites More sharing options...
hunts Posted April 14, 2017 Author Share Posted April 14, 2017 @Wingnut yeah it's working just now, time to work this playground around Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted April 14, 2017 Share Posted April 14, 2017 That might be an older, development playground. It looks a bit code-heavy. Be sure to read Jerome's forum topic.... about it. hunts 1 Quote Link to comment Share on other sites More sharing options...
hunts Posted April 15, 2017 Author Share Posted April 15, 2017 @Wingnut not that fancy but this for ya http://www.babylonjs-playground.com/#FJNR5#42 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted April 15, 2017 Share Posted April 15, 2017 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! hunts 1 Quote Link to comment Share on other sites More sharing options...
hunts Posted April 15, 2017 Author Share Posted April 15, 2017 thought as much Quote Link to comment Share on other sites More sharing options...
jeremybyington Posted April 22, 2017 Share Posted April 22, 2017 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. Wingnut 1 Quote Link to comment Share on other sites More sharing options...
hunts Posted April 28, 2017 Author Share Posted April 28, 2017 @Wingnut eureka! We finally have a lane http://www.babylonjs-playground.com/#165IV6#46 Wingnut and GameMonetize 2 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted April 28, 2017 Share Posted April 28, 2017 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. https://www.babylonjs-playground.com/#YSXOQ#1 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! Quote Link to comment Share on other sites More sharing options...
hunts Posted April 28, 2017 Author Share Posted April 28, 2017 @Wingnut i made a new PG, check it out https://www.babylonjs-playground.com/#2Q8VL4#1 uhm do you have an idea of what can be done to reduce the shaky effect? Quote Link to comment Share on other sites More sharing options...
Wingnut Posted April 28, 2017 Share Posted April 28, 2017 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. 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. Quote Link to comment Share on other sites More sharing options...
hunts Posted April 28, 2017 Author Share Posted April 28, 2017 @Wingnut oops, i just need to update the road dynamically now, Tried but failed: https://www.babylonjs-playground.com/#YSXOQ#3 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.