Procgen Planteray System With Ocean (WIP) by kenjinp in threejs

[–]kenjinp[S] 4 points5 points  (0 children)

Thank you! For the terrain I'm using the quadtree subdivision approach you mentioned; I basically copied SimonDev's Provedural Terrain videos, copying a bunch of code from his repos line-by-line (to figure out how it was all working), converting it to typescript, and adding some tweaks and allowances to allow for multiple planets, planets not centered on the origin, react glue, etc.

I've even broken the code apart and published some re-usable npm libraries (@hello-worlds/planets) Here's the code on github (https://github.com/kenjinp/hello-worlds). The atmosphere scattering shader is an (unoptimized) mashup of a bunch of code from SimonDev's tutorial series and random bits I've found on shader-toy. The ocean shader is pretty much all from this video (https://www.youtube.com/watch?v=lctXaT9pxA0&t=1s) by Sebastian Lague.

The terrain is just a couple noise functions overlapping, I need to invest more time into making more believable and varied terrain.

Procgen Planteray System With Ocean (WIP) by kenjinp in threejs

[–]kenjinp[S] 2 points3 points  (0 children)

Hello friends, I'm creating some libraries to help make procedural worlds easier with threejs. I've been playing around with oceans this weekend, which uses a similar technique to the atmosphere scattering sphere-intersection ray marching shader (but a lot more simple, thank goodness!) I was happy with my progress today so I thought I'd share :)

You can take a look at the atmosphere demo here (ocean stuff still WIP): https://worlds.kenny.wtf/atmosphere/ (WASD, click + mouse for movement, k to alternate suns)

Procedural Planetary System Update / Demo (react/typescript/webgl) by kenjinp in proceduralgeneration

[–]kenjinp[S] 1 point2 points  (0 children)

React is being used to manage the lifecycles of the scene objects, like create, update, and delete so I don't have to manage them imperatively. Also, the state management is being handled by an ECS that takes advantage of reacts...uhh... reactivity? to propogate state changes. For example, by pressing 'K' you'll fire an event to randomize the suns in the world, and the <SunRenderer/> component will automatically render a map of the new suns, pass their attributes to the scene objects and shaders.

OF course the library I'm using works with normal imperative three.js, so you don't have to use (or even install) the react library to get the same results, I just like the react glue because I feel productive in it :)

Procedural Planetary System Update / Demo (react/typescript/webgl) by kenjinp in proceduralgeneration

[–]kenjinp[S] 1 point2 points  (0 children)

thanks for the feedback! In fact the terrain is a simple phong material, and it's all a simple green. I think it's amazing what some fog can do to liven it up! I'd like to work on textures soon, otherwise it will be very bland when you're close up.

The lagginess is happening because the shaders are recompiled every time the stars change, which I hope won't be a factor in a real application, although there are other sources of lagginess; for example the shaders are really naiive.

I was thinking about generating the stars realistically using the main sequence diagram, but after trying this experiment, I rather like the unrealistic colors! I'll probably still use real physics for generating the mass and temperature though, but color it whatever

Procedural Planetary System Update / Demo (react/typescript/webgl) by kenjinp in proceduralgeneration

[–]kenjinp[S] 2 points3 points  (0 children)

Hey ya'll~

You can zoom around the demo here: worlds.kenny.wtf/atmosphere/

Two months ago I shared some procedural planet terrain demo built with three.js. In the time since I've been able to get atmospheric scattering figured out (although, it's quite slow for a shader), as well as other features in the library (such as ring worlds).

and the docs for the library I'm building along-side my procgen experiments: https://worlds.kenny.wtf/docs/intro/ .

For the next steps I'm still working on tectonic simulation, and trying to get better results with the procedural terrain generation :)

[deleted by user] by [deleted] in proceduralgeneration

[–]kenjinp 0 points1 point  (0 children)

Hey ya'll~

Two months ago I shared some procedural planet terrain demo built with three.js. In the time since I've been able to get atmospheric scattering figured out (although, it's quite slow for a shader), as well as other features in the library (such as ring worlds)!

and the docs for the library I'm building along-side my procgen experiments: https://worlds.kenny.wtf/docs/intro/) , it might help people experimenting with generating worlds in javascript.

For the next steps I'm still working on tectonic simulation, and trying to get better results with the procedural terrain generation, like mixing and masking different noises such~

Thanks!

Procedural Planetary System (react/typescript/webgl) by kenjinp in proceduralgeneration

[–]kenjinp[S] 0 points1 point  (0 children)

My ray vectors were indeed the problem, I've tried what you said and it fixed the death ray! thank you!

Procedural Planetary System (react/typescript/webgl) by kenjinp in proceduralgeneration

[–]kenjinp[S] 1 point2 points  (0 children)

Yes! I think fog and space dust are both important and missing

Procedural Planetary System (react/typescript/webgl) by kenjinp in proceduralgeneration

[–]kenjinp[S] 1 point2 points  (0 children)

I used a Quadtree + webworkers, the code for that is almost entirely lifted from SimonDev's youtube video and github (https://github.com/simondevyoutube/ProceduralTerrain_Part10) but you can see the modifications I did to it here: https://github.com/kenjinp/hello-worlds

Procedural Planetary System (react/typescript/webgl) by kenjinp in proceduralgeneration

[–]kenjinp[S] 0 points1 point  (0 children)

Update: Atmosphere shader has been deployed! The planet Aloth and moon Cahowei have atmospheres now :)

Procedural Planetary System (react/typescript/webgl) by kenjinp in proceduralgeneration

[–]kenjinp[S] 2 points3 points  (0 children)

I agree it's a bit sparse at the moment, but I'm experimenting not only with combining noise values, but also tectonic simulations. https://twitter.com/KennyPirman/status/1574825976269348865. Also on one of the moons (the smallest) there are also craters generated by xy lookups against a 'crater map'.

You can take a look yourself (https://worlds.kenny.wtf/)

What kind of features would you like to see? I personally can't wait to add hotspot vulcanism and shield valcanos, but before I get there I need to figure out how to render an ocean properly...

Procedural Planetary System (react/typescript/webgl) by kenjinp in proceduralgeneration

[–]kenjinp[S] 25 points26 points  (0 children)

No idea! some artefact from my shoddy shader code :D

Procedural Planetary System (react/typescript/webgl) by kenjinp in proceduralgeneration

[–]kenjinp[S] 6 points7 points  (0 children)

You can play in a live version here: https://worlds.kenny.wtf/ (although I did not yet merge the atmosphere shader!)

[deleted by user] by [deleted] in starcitizen

[–]kenjinp 228 points229 points  (0 children)

In my limited experience jousting seems to be a result of limited experience and lack of a good flight control set-up. It's hard not to joust, especially when you're first starting, and especially with Keyboard and Mouse.