imosek8

Nice and smooth terrain generator

Recommended Posts

Hello everybody! 

I am looking for procedural terrain generator. I'd like to achieve something like smooth hills or something like here. In the last link there is a beautiful and smooth terrain. I thought about Perlin Noise generator, but I am not sure if is it possible with this function. Maybe do you know something that I can achieve with. 

Share this post


Link to post
Share on other sites

Hi @imosek8, welcome to the forum.  Recently, I found a BabylonJS playground scene... that used noise for heightMap elevation values.  It is not overly "smooth"... but I think you could tweak the numbers (lower the subdivs of the ground).  I have a scene in dev where I am using it

Sorry for all the extra BS in that scene.  I'm actually just testing control/shift cursor keys... for applying physics forces to that "bobsled"... and i am not really using the bumpy terrain at all.  It is high ground-subdivs and animated, so we are seeing some periodic garbage collection "stutters"... at least in my Firefox.

It might be better to do a playground search for perlin... and tour through the results.  (smaller playgrounds than MY big fat pig, above.)  :)

Good luck.  Others will likely comment.  By the way, are you wanting "endless" rolling terrain?  That is also available.

@Pryme8 has some kind of continuous terrain generator using a noise source, but I've seen no demo of it. It is called 'Teriable'. 

Also, @NasimiAsl has also shown us a continuous dynamic terrain.  (you start in Naz's home cylinder... just start navving around - maybe only backing-up, at first).  As you can see, it uses Naz's shaderBuilder extension, along with quite a chunk of shader magic.

Share this post


Link to post
Share on other sites

Pardon?

@Pryme8 I have same problem as this guy:

http://www.html5gamedevs.com/topic/24468-creating-multiple-meshes-from-ribbon/?do=findComment&comment=145604

Don't see any infinite hills (or ANY hills) in firefox (unless I draw them).  And I need some serious walking speed, or a fast-flying camera... to test its tiling performance.  Got a working example of something... online?  i can't even find a link labeled "example".   Don't need editor example... need scene with infinite hills/land... if possible.

Share this post


Link to post
Share on other sites

The script is there it's all in place you just need to have a some kind of noise fed to the engine or you will get no hills, also you need to scale up the size of the blocks I had them sized way down for demonstration.  

It would take someone 10 mins to figure out their noise stack apply it and have infinite terrain,  you just gotta do some reading but it's all there in TERIABLE... fps controller, like 12 noise types and 4 filters, infinite tiling, and customization layers... like I'm starting to get offending by people not taking the time to read.  This is also why I have stop posting my tools, no one want to script and wants working shit... and funny enough if they were actually to read what I posted and go through the script they would realize all their questions are awnsered.  

 

Like i came up with a in browser wysiwyg editor that you can figure out your noise stack with my own noise library, a realase of like 30 noise functions in glsl as well... none Tiling terrain texture with biozones, procedural terrain shader, atmosphere shader with raytraced clouds. And much much more have posted all of it.  Like it's not my job to hold people's hands and show them the light especially when I already lit the fire for them.

Share this post


Link to post
Share on other sites

thanks @Wingnut

i look at in my tools ShaderBuilder and GeometryBuilder  an think a lot what  make that useless in BJS members

i find 3  -

1. both is depend for mathematical a lot and that make it complicated 

2. both is Use Fluent interface so a lot think it is not BJS kind

3. it is in BABYLON  Extensions Not BABYLON  (actually when you wanna make a simple PG with SB or GB that is have a lot unnecessary code in PG that make it more complicated too )

so i think about @jerome word when he talk about (in choose Name of That ) he say i most keep it for myself 

i look the limitation of Webgl and  see my tools can make very optimized result but nobody don't wanna test it and  now i start make a big project with that  this project a large scene in Webgl just use from SB and GB and i see i need a Tools For GB i make that i wanna complete that but big Project always take big time

maybe now is time for Off Naz System in here and just watched with out suggest Unused solution for others 

cheers Nasimi

 

 

 

Share this post


Link to post
Share on other sites

*nod*  Interesting analysis... somewhat correct.

But, maybe not "useless" to BJS members.  (I have enjoyed viewing your demos and scanning the code - MUCH!) 

Maybe SB and GB are "next generation" or "professional" or "corporate level".  Many of our forum users are new to webGL... including me.  We create a BJS colored box with spotlight, shadows, and particles, and we have a party and parade, and cry from happiness, a little.  We have a feeling of empowerment and accomplishment... and smile big... from simple scene.

As we advance, our brains get "full", even with simple scenes.  Brain full because learning curve is steep for webGL, even when BJS makes it easy.  Learning webGL includes learning 3D terms and spaces, learning JS, learning math, learning textures, learning animation, learning lights/shadows, learning labels, learning picks/clicks/events, and sometimes learning DOM, too.

See why brains get full, easy?  Now add physics engines, collisions, layermasks, camera inputs, parametric shapes, post-processes, shaders, vertexData, etc.

Many brains explode.  :D  Wingnut tries to keep users from LEAVING WebGL because of brain explosion.  I need to make many more diagrams... to help prevent brain explosion.  Sometimes I try with too many words... not enough pictures.  I need to change strategy.  :)

But still, advanced systems (with demos) are a bright star on the horizon.  They are a symbol of things to come.  A big future.  After fixing brain explosion, users still doing WebGL WILL eventually "seek" advanced things... like SB and GB.  First, they will have a brain explosion or two.  :)

So you see, many users are not ready for advanced systems.  We are sometimes slow to learn BASIC systems.

This is same problem Pryme8 has.  People don't study and read, because they are not ready for studying and reading.  They want to see demos, and adjust simple values, and see results on-screen.  (introductory learning).  This is what BJS Playground does well.  Getting angry at users for not learning... is no help.  Better teaching... is what helps.  Diagrams help.  Simple (as possible) demos help.  Assume all users... have full brains and limited study time.

Many users do webGL for enjoyment.  An escape from real life problems.  Empowerment.  "Look mom, I made a green box with spotlight on it!"

Reading-about and learning advanced systems... is not very "fun", and often... can be depressing.  Users avoid depressing things.  Many are here to enjoy webGL... for hobby.  Hobby should be fun, not difficult.  If webGL is NOT fun, some will leave webGL... possibly waiting for better learning/building tools.

This is all new.  Many are learning Math, WebGL, JS, and BJS... all at same time... and for FIRST time.  They need love and encouragement.  They need LIKES.  They need others to be interested and share scene-making happiness.  I think it is called "nurturing".  If we do this... then in user's brain... webGL/BJS == fun.  When/If webGL/BJS != fun, they will never discover advanced systems or have motivation to learn them well.

So, I try to keep the team LARGE... no matter what.  We celebrate with them, no matter the scene.  We want them to stay and play.  The more that stay and play, the more that will discover and learn SB/GB and Teriable and other advanced systems. Getting angry at users for not being "ready" for advanced systems... does nothing good.

Step #1 for you... a GREAT shaders tutorial.  Deltakosh wrote a nice one.  https://www.eternalcoding.com/?p=113

Many diagrams.  SOME "background info" (defining terms/related-systems).  Then... 1/3 down... he says "Too hard?"

Deltakosh knows about "overwhelming a user".  In a way, he is "porpoising".  Dive deep, then come up for air, then dive deep, then come up for air, etc... like a dolphin.  He tries to avoid "overwhelm" by doing this.  I think DK's shader tutorial is VERY good.  It falls-short of explaining some related systems, but it HAS TO, or else it would become overwhelming.  Many of Wingnut's posts... trying to explain things... are overwhelming amounts of words.

There is a "fine line" between being thorough, and being overwhelming.  It is a balance.  Teach a lot, yet not too much. 

This is not easy.  Diagrams help... MUCH.  This is also what playground demos do.  They allow a user to learn as much about a system as THEY CHOOSE.  They play with it as long as THEY WISH.  Playgrounds have an automatic "don't overwhelm the user" circuit-breaker or fuse.  :D

Jerome and JohnK do beautiful tutorials, too.  Lots of playgrounds, lots of talk, maybe some diagrams (but eyeball icon works great, too).  They ALMOST succeed at making overwhelming systems... be NOT overwhelming.  But... SB/GB... are MUCH bigger and more alien to young users.  And code written by Naz... using SB/GB... LOOKS alien.  It almost looks like it is not coded in JS:)  So, tutorials to teach SB... will first need COMPLETE "college course" about shaders.  THEN... complete college course about Fluent.  THEN... actually teach about SB... which will probably seem easy (after learning shaders and Fluent).

Hell, BJS doesn't have a "comprehensive" (super detailed) tutorial about materials, yet!  Everyone is scared of it.  heh.  Think about HOW LARGE a tutorial "Everything About Shaders" would be.  SUPER scary.  AND... is the next generation of graphics hardware/chips... going to change everything?  Should we be more patient with others and with ourselves?  Perhaps relax and allow some things to mature?  Docs, systems, user's brains, etc.

I dunno.  This is different.  We are trying to familiarize youngsters on 5-10 new-to-them systems... all at the same time.  In Earth history, it took some SERIOUS TIME (and work) to discover and explore "The New World".  Perhaps we need to apply that thought... to webGL.  Sorry for long post.

Share this post


Link to post
Share on other sites

yes, @NasimiAsl, your tools and your work in general are wonderful. Don't give it up, please :)

We all like your excellent tools. Even if people don't use them... for now. "For now" is the key word is this sentence : your tools are great and powerful, and so advanced that we (I'm a part of them) haven't discovered them yet (I personnaly haven't discovered the phycis engines, the shaders, and so many things of this vast world what is BJS/WegGL).

Please go on providing us super tools and impressive demos. People will come to use them soon. 

I know well your feeling because I made hundred of examples of the SPS before someone started to try to use it for his own needs. And even now, very few people try to use this kinder monster, because it may seems complicated, complex, etc, etc. Just wait for the right person with the right problem to bite the fishhook and then help him to achieve his goal : he'll be the best ambassador for your tools :D

Share this post


Link to post
Share on other sites
3 hours ago, adam said:

Yeah, it shows how to do the infinity terrain but its scaled down and skipped the noise step, all you have to do it combine that and teriable.  Ive got demos that do it but that project was put to rest to finish up the terrain tools I have been working on for a while now.  those were the prototypes.  Give me about 3 more weeks and ill repost a thread in teriable and im sure you will all be happy.

The big thing that y'all have been skipping over is DasNoise that's the meet and beans...  like I have filters for terracing,  and smoothing ect, like 12 noise types and like 8 mixing masking types.  I even posted a tutorial on how to procedurally generate road systems...  I have been for the past year getting ready to launch a real product and its really close to completion.  I just an making sure that on launch its compatible with both BJS and Unity so there have been some design hurdles.  I think I might dromp unity from the finished product for now and wait till I can get some crowd funding after the demo is posted.

But Im pretty sure with the tools that will be included it will handle all the terrain needs for most people...  its not just going to be rolling hills, tunneling, custom areas and a bunch of other features are already worked out and the paint system that is top notch.  So yeah only thing holding me back is dudes gotta live, and so I spend 90% of my time working on other things that are paying me vs developing tools for free.  But if you cant wait, and have a little initiative you can use the prototypes and make a production product.

@NasimiAsl I have a generator called Celest I can send you that has every known star type the scientific data including their occurrence rate distance for habitual zone, gravity values etc... and most known planet types with other cool science data linked to a seeded random.  I bet you could use it with what you have already done.  msg me if your interested.

Share this post


Link to post
Share on other sites
15 hours ago, Pryme8 said:

The big thing that y'all have been skipping over is DasNoise that's the meet and beans

The big thing that YOU have been skipping-over is owning-up to the fact that you don't have a published working example of generated rolling hills, continuous or not, for @imosek8 to see in-action.  What a shame.  I suggest you make some demo scenes or playgrounds and provide links from Neatflax.  SHOW US the many features, please?

Boy, talk about taking the LONG LONG road to get info/own-up from you... HOLY CRAP.  Very annoying.  No wonder folks don't want to read or study your systems.  You cause your own "offending" over lack of fans.  You choose to have a lack of fans, and then be pissed over it.  *nod*  Nice.

At least we FINALLY know that there is no working example of rolling hills produced by Infini-terrier-dasnose to show @imosek8.  It was as painful as crapping-out a Tonka truck... to find that out.  I'm bloody and exhausted. 

But we sure got plenty of non-sequitur info, eh?  My goodness.  Like diving into a junkyard of unnecessary info and blow-harding debris... to find a penny.  :)

I thought I was the BEST at using a thousand words to say 2 simple things.  P8... you're right there with me.  :D

Share this post


Link to post
Share on other sites

@adam, the situation is a lot larger and more complicated than this single incident.  Pryme8 is like my little brother... and he needs to be "shagged up a tree" every so often... for being aloof.  :)  At its deepest core, it stems from his inability to find a girlfriend who speaks code... as well and as much as HE does.  Guess what, P8... they don't exist.  :)

P8, like many of us... likes to share his thinking, his tips and tricks, his novel ways of doing something, etc.  He wants to collaborate with others... about HIS projects and ideas.  Nothing wrong with that.  BUT... this does not bode well with those who are out "touring"... doing quick-looks at demos... gathering "what's available".  If P8 wants Neatflax to be a "joy", whether browsees are quick-touring, or wishing to dig-deep... he will "choose" to layer-on a little "frosting"... on the standoff-ish Neatflax cake.

But there might be an even DEEPER reason why coders want "others" to take great interest in the depths of their system.  Pure loneliness.  It is a situation very similar to a musician... playing for zero audience (been there).  There is a feeling of futility.  "Why am I doing this, if nobody is paying any attention?"

SOME people are more affected by this "I'm in a bubble" feeling... than others are.  I really like P8.  I like him so much... that I want to hit him with my little-brother-beating stick... until he gets his social skills and loneliness... more under-control.  (and until he does a little more decorating and love-thy-fans work at Neatflax.)  :)

I have faith in my little brother.  :)  Problem is... even when he DOES make decent non-pushy contact with other humans...  he speaks robot... and at 400 mph.  :D 

I'm working on building a Pryme8-to-human translator... but... its gotta run FAST!  I might need HIM to help me code it.  heh.

Share this post


Link to post
Share on other sites

Haha ^_^ my girlfriend was ragging on no mans sky's shaders.  It was really cute.  

Yeah I have a social disorder so sorry if I come off weird sometimes.... sometimes you gotta do what wing said and just hit me with a stick and tell me shut up.

just ask @dbawel that guy has the patience of a saint.

Share this post


Link to post
Share on other sites

I just uploaded a older version of Celest, more like the first proof of concept.  I would post the refined one but I'm keeping that for my project Edge of Infinity.  The main data that is going to be relevant to you is all the star data and occurrence rates etc..  The BJS scene attached is really raw, it was mainly there just to give me something to look at while I was looking at the console.

To change the star system just change the name of the system on line 610 on the example on git i have HTML5 as the seed,
but for example when I put @Wingnut as the name of the star i got this output:
Wingnut
(index):105 Class:M
(index):106 Temp:4966.978520646201
(index):107 Mass:1.9822682456198164
(index):108 Radius:2.0847593172213235
(index):109 Lumins:0.5798885870091545
(index):110 SOI:65.74079836739669AU
(index):115 Number of Zones:9
(index):170 Planitary System: selected
(index):175 Zone ID:0 - ZoneRange:0.8074025560754308,23.006100967565594
(index):176 Zone Type:Planitary System
(index):177 Feature Count:1
(index):170 Dense Astroid Belt: selected
(index):175 Zone ID:1 - ZoneRange:23.006100967565594,57.51020488129929
(index):176 Zone Type:Dense Astroid Belt
(index):177 Feature Count:69275528372
(index):170 Dense Astroid Belt: selected
(index):175 Zone ID:2 - ZoneRange:57.51020488129929,58.14927308734922
(index):176 Zone Type:Dense Astroid Belt
(index):177 Feature Count:97389992143
(index):170 empty: selected
(index):175 Zone ID:3 - ZoneRange:58.14927308734922,63.214787993388455
(index):176 Zone Type:empty
(index):177 Feature Count:0
(index):170 Planitary System: selected
(index):175 Zone ID:4 - ZoneRange:63.214787993388455,64.49369201966338
(index):176 Zone Type:Planitary System
(index):177 Feature Count:1
(index):170 Planitary System: selected
(index):175 Zone ID:5 - ZoneRange:64.49369201966338,65.67569922008171
(index):176 Zone Type:Planitary System
(index):177 Feature Count:1
(index):170 empty: selected
(index):175 Zone ID:6 - ZoneRange:65.67569922008171,65.71270824302789
(index):176 Zone Type:empty
(index):177 Feature Count:0
(index):170 empty: selected
(index):175 Zone ID:7 - ZoneRange:65.71270824302789,65.71456892897525
(index):176 Zone Type:empty
(index):177 Feature Count:0
(index):170 Planitary System: selected
(index):175 Zone ID:8 - ZoneRange:65.71456892897525,65.72932327911049
(index):176 Zone Type:Planitary System
(index):177 Feature Count:1
(index):181 =======================
(index):383 Planet Type: Chthonian
(index):384 Planet Mass: 13.95307631554897
(index):385 Planet Size: 0.6976538157774484
(index):386 Planet Atmosphere %: 0.007214015593126533
(index):387 Planet Orbit Radius: 10.816695433341216
(index):388 Planet Orbit Speed: 4.230160145996578
(index):389 Planet Rotation Speed: 0.39633328732452355,0.6889541206660397,0.8971175762592338
(index):390 Planet Color: 0.23288522513871612,0.6316983643471303,0.5708554608306713
(index):383 Planet Type: Dwarf
(index):384 Planet Mass: 2.935656037123408
(index):385 Planet Size: 0.1467828018561704
(index):386 Planet Atmosphere %: 0.007214015593126533
(index):387 Planet Orbit Radius: 64.02672850256145
(index):388 Planet Orbit Speed: 704.4578783364726
(index):389 Planet Rotation Speed: 0.31874055682328617,0.9408781695428843,0.6574576936570793
(index):390 Planet Color: 0.3651904759981335,0.4282978275126652,0.24556531310770424
(index):383 Planet Type: Dwarf
(index):384 Planet Mass: 2.935656037123408
(index):385 Planet Size: 0.1467828018561704
(index):386 Planet Atmosphere %: 0.007214015593126533
(index):387 Planet Orbit Radius: 64.6241375051558
(index):388 Planet Orbit Speed: 717.6652647328324
(index):389 Planet Rotation Speed: 0.27104179669777295,0.6039576463153935,0.24704886863582942
(index):390 Planet Color: 0.8786535833241942,0.6013493662576366,0.8626124756920035
(index):383 Planet Type: Dwarf
(index):384 Planet Mass: 2.935656037123408
(index):385 Planet Size: 0.1467828018561704
(index):386 Planet Atmosphere %: 0.007214015593126533
(index):387 Planet Orbit Radius: 65.71856797454501
(index):388 Planet Orbit Speed: 742.1788770615939
(index):389 Planet Rotation Speed: 0.19704352178814588,0.6613863242619118,0.8535949311190052
(index):390 Planet Color: 0.8977866847515088,0.6103119024773491,0.6878784052242395


Its kinda hard to read, but there is a JSON object I believe you could output instead Im not sure how far I went with this example but Im pretty sure all the data is there.
https://pryme8.github.io/C-Gen/
https://github.com/pryme8/C-Gen

let me know if this was of any use or if you have any questions...  

ps I have more generators as well if you are interested.  roads, plants, animals (working on this one), bioms, and soon a weather gen.  I really would be interested in showing you my baby @NasimiAsl if you kept it hush hush and signed a non disclosure first.


Ohh btw Id love to see if somone can find a seed with an exotic result, your almost guaranteed to get a class m star.  I was pretty excited about wingnuts output thats the first time ive seen a Chthonian class... wow pretty rare.

***DISCLAIMER some of the math might be off... this was a while ago I made this.

Share this post


Link to post
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.

Guest
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.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.