I finally have volumetric shadows! 🌄
Not a bad day of work~ I'm one step closer to being a browser-based
@CloudImperium
!
take a tour of your own generated maps at
or check out the (horrible) codebase:
#threejs
#r3f
Hey I made a **skybox**! 🥁
Tomorrow I'll add some noisy low-lying fog and stuff!
I should probably also make the atmosphere, like, exponentially falloff.
Any other ideas?
Thanks to our lovely web game dev discord community (), I was able to get help to fix one of my long standing issues.
Now I can do sphere ray-marching with depth testing -> so atmospheres! (really strobe-light-y and radioactive! WIP)
Some late night ocean shader exploration, using another sphere intersection / ray marching technique instead of an ocean sphere mesh... it's asking for wavy normal maps. Now it's possible to go underwater!
#ScreenshotSaturday
|
#threejs
|
#gamedev
My terrible shader skills always fail so spectacularly (why green?!)
I deployed it with the test textures and broken-as-heck atmo-scattering, check it out!
(why not push your WIP nonsense straight into the web?)
#threejs
|
#r3f
|
#screenshotsaturday
I finally figured out how to make a cylinder that's long instead of squat!
So now we can have O'Neil Cylinders!
I need to fix the direction the height is applied, but! It's very close!
#threejs
|
#r3f
|
#helloworlds
Working on terrain scattering for planets~ Hopefully we can improve the frame rates and actually get some nice tree models here 🌲!
also need to create some API for generating masks, because they like to spawn in the ocean :D
#threejs
|
#HelloWorlds
|
#screenshotsaturday
that's more like it! I wonder if I should use the worldspace coordinates instead, then the texture should be applied to the UV of the whole object instead of individual chunks?
#threejs
|
#HelloWorlds
I got Ring Worlds(!!!) working just in time for
#screenshotsaturday
!
You can make arbitrary ring worlds in
#r3f
and
#threejs
!
either long and thin like a Halo ring, or a smaller rotating colony world like an O'Neil cylinder.
w/ full space-to-ground LOD! 🚀
#HelloWorlds
I've managed to smoosh a couple big atmosphere bugs tonight, and I've just been zooming around this sandbox ever since~ 🚀
Try it yourself, it's online~
#HelloWorlds
| Hello Atmospheres!
#threejs
|
#ReactJS
|
#r3f
|
#gamedev
Here's a website that makes cities in 3D by
@watawatabou
. It will consume the next tens of minutes of your time, and your imagination for days to come.
#procgen
Something you can do in your
#threejs
browser scene with the
#HelloWorlds
library, but sadly not in
#Starfield
Build space-to-ground planet-sized worlds for your genre-defining space sim!
I found this interesting webgl planet/plane world generation project
It seems so interesting, and it appears the creator has accomplished so much! It's really inspiring! I have a long way to go, I don't even understand much of the words in their post ;D
I love how evocative the terrain outputs are.
These are just begging to be filled with little roads, cute villages, some
@watawatabou
medieval city rendered in 3D, boats tacking into harbors
The joy of this app in the current state is daydreaming of what can live there
I struggled with some obtuse code this Monday, so I cut this video as treat to myself, because the view was perfect~
Rendered using the build you can currently find here
fly around, make some videos!
#HelloWorlds
|
#threejs
|
#r3f
|
#procgen
|
#gamedev
Hello friends, I've deployed my terrible
#MachineLearning
#Procgen
terrain generator for
#threejs
It's really really bad, but I think I've got things set up where I can improve it a lot from here out.
Give me all your ideas!
heck'n yes, voronoi boi
now with hex spatial hash grid its easy to look up (approx.) voronoi tile in vertex offset calc, while maintaining ~20ms terrain chunk building times
next step = tectonic plates
npm i your planet's atmosphere!
I've added a hello-worlds/vfx library, which will have some useful
#threejs
effects to add to your planets, starting with this ray-traced atmosphere postprocessing effect
#r3f
#gamedev
#procgen
20K terrain features, should be able to speed it up further by changing the spatial hash grid bucket size based on the entities, instead of using the same bucket for all of them.
Originally, each vertex would test against all 20K features, but now they test against maybe 10
Success! It looks great, no aliasing, it doesn't get ugly and squished near the poles, and it scales with camera distance so it doesn't get all pixel-y
it's so SHARP! (although probably not with twitter compression)
woooooooo~
Remember the procedurally generated world I was working on months ago?
It's live
👉
No purpose being this project, I was just having fun.
Although I might work on it again.
#threejs
#webGL
I'm super proud of the way these continents are looking now! 🌍
Here's how to grow tectonic plates ->
Randomly place continent nodes expand using a floodfill algo with a cost function that dings points for distance and direction away from the plate's preferred bearing
.../
Trying to figure out instanced terrains scattering (yet again) for trees. I had to stop and record the amazing volumetric shadows creating shafts through these instances!
#threejs
Just pushed an update to which adds the seed to the url.
This allows you to bookmark or share the nice (or buggy) looking outputs.
reply with your favorite seeds!~
This ring is the same size as the megastructure from the Ring World novel (which I should get to reading....)
(pardon the gfx precision gore)
1.02 AU radius!
And the performance is not *that* bad!
I've always wanted to add contour lines!
Probably twitter compression will scrub away the contour lines and turn it into a grey soup.
Anyone know how to clean up these lines? they're like... janky. I'm just using a modulo
Trying to generate a heightfield collider using
#threejs
and
#rapierjs
, a story in images:
Most of the examples online only show you the rendering side, so I threw together a gist so you can see how I cobbled it together with physics:
#gamedev
I'm going on a texturing detour 🚀
Trying to implement:
- triplanar mapping (reduce stretching on cliffs)
- change textures based on slope
- normal maps?
Any other cool things to add in Texture Land?
Also, every time I boot up
#HelloWorlds
I'm like wow, I should really do something with this here AAA tech *cat reading newspaper meme*
#threejs
|
#r3f
red suns and alien worlds
star color values from the ECS now are used in the atmo shader... Need to refactor some things to allow more than one light source (star) in the shader though
#HelloWorlds
Today I found a problem with my city generation - my polygon cutting function is wrong.
So I tried to find out how to fix it. Apparently this is one of those problems that requires you to know Real Math, read academic papers, and interpret old C libraries.
😿😿😿
Used the opportunity of being away from the office to write fresh code, for the first time in a long while. Made a prototype real-time 3D viewer for cosmological simulations (here showing dark matter around a galaxy, then zooms out to the broader simulated volume).
Okay, I scaled down the planets wayyyy down (250m radius) so I can focus on the character controller stuff without float precision errors.
Turns out smol planets are really fun, and I got the character to stick on the planet, using a combination of raycasting and hmap sampling
And now we have gorgeous contour lines!
Using
@Arbonox
's advice to modulate the line width + the getGrid function from react-three-drei's grid component
Thanks for the help everyone, things are starting to click :)
The key I think is to normalize everything to uv-like scales
It's beginning to look like a thing :)
It'll be a good test-bed for all the terrain editing features and stuff I wanna try, like terrain stamping from heightmaps, river, whatever
Whee!
Also, what's a good name for a terrain editor toy thingy?
#SimCity4
#threejs
#r3f
So I've been able to smoosh (technical word) some 64x64 textures for the terrain into a single 2DTextureArray for the shader to slerp up
I've also added the ability to apply weights for them depending on the the user's
#procgen
function
Some math issues there, but close!
let's rewrite an atmosphere shader from scratch. this time no copypasta, I need to figure out why my previous solution was so busted
Here the color of the stars is added based on the ray distance through atmosphere (which goes thru the planet)
I've been able to reconfigure the js/react side of things (thanks to
@hmans
's ECS) so now any number of worlds can have atmospheres and the one postprocessing shader will handle them
just add "atmoshpereRadius" property to a planet and voila! (atmo vfx still WIP)
#HelloWorlds
So I got hello-worlds planet chunk generation working with via the web worker chunk generation threads.
Should it be default in the library?
We did it all on stream huhu!
Hello friends I'm moving to NYC soon to work on
#HelloWorlds
full-time, for at least 3 months.
If you're wondering why I haven't had a lot of planet updates lately, it's because I'm in full anxiety mode trying to pack up my life here in Geneva :)
Okay I fixed the scattering shader's color and direction. No more radioactive planets~
It works with multiple stars, taking into consideration their color and intensity. Still a bit rough around the edges...
#HelloWorlds
|
#threejs
|
#r3f
TIL Lines are really complicated.
The line width here is calculated by modulo of lat/long, so that means they change width depending where they are on the globe!
Also AA is bad when zoomed-out. Maybe they can use like a min screenspace size as
@Cody_J_Bennett
suggested?
I managed to implement terrain chunk skirts, which is sort of a gimmicky way to plug holes in the gaps between terrain chunk resolutions.
But the results look great!
1/..
terrain chunk heightmap to grass offsets!
next steps:
- figure our why I have some flying grass on the edges
- speed it up
- make the individual blade positions stable somehow, across LODs
I've released an update that moves the terrain generation to a webworker, so it should speed things up a bit
It also falls back to a wasm solution if you can't use webgl for some reason to run the model inference.
the code is on github (but is terrible):
New version of
#HelloWorlds
for
#threejs
and
#r3f
released!
it exposes a LOD resolution param. You can tweak this to sacrifice performance for higher detail.
Left image has this 'lodDistanceComparisonValue' (I'm bad at names) set to 0.75, right to 3.
More progress on world-synth:
See if you can spot all the gnarly artifacts.
I even left the crash in the video so you can know how bad I am at all this
I've finally managed to chop up my world into little regions and their neighbors. This was really hard!
You can change the jitter (irregularness), and increase the number of regions!
Next step - tectonics!
#gamedev
|
#procgen
|
#threejs
|
#r3f
It's so good!!! Even with really naïve collision functions. Can't wait to dial-in a good subducting function, and have nice trenches and island chains.
Don't that look relatively convincing?
Yesterday I was able to get the model to run on the client, which is great. It's about 14MB.
After training the (super naïve) model the whole night up to ~700epochs x 5000 datasets, the output is kinda crap, but it's all fitting together and soon I'll deploy this version
...
Hi folks, I fixed the package dependencies in the terrain synth repo, so you should be able to clone it and play around with the app.
feel free to add stuff and make a PR or fork or whatever 😘
some progress with docs and new <FlatWorlds/> feature
Wanna try to stick this into a
@codesandbox
sandpack but I'm not sure if the webworker part is going to work.
it would be so cool to be able to update the noise function and have him reload in real time, from the docs!
I've simplified the Voronoi Sphere planet query thingy into a single class, which makes it way more easy to use.
I'll add it to the planets library after I play around with tectonics a bit.
check out the
@codesandbox
!
#HelloWorlds
|
#r3f
|
#threejs
Io, moon of Jupiter, from the Juno spacecraft on October 15, 2023 (yesterday!). This is the sharpest look we've had at its volcanic surface since the days of the Galileo orbiter.
Moons are fun because they teach you about math things. Like, what's a good radius distribution of craters? Is there a paper that shows the mean radii of a crater on the moon?
Here's a moon-sized moon with craters generated via a bias func tending towards 5km w/ max of 100km
used
@codesandbox
Projects, finally can get a demo working with webworkers and sharedArrayBuffer together.
It doesn't appear to work on firefox, but one step at a time...
Anyways, click the link to check out this cool moon!
🌑
#react
#r3f
#threejs
made a tool yesterday to speed up foliage geometry generation.
before this, i was manually doing it in blender, painfully making uv maps and geometry, exporting, fixing normals, etc - draining. lots of stuff in gamedev is actually a simple task but tools make it complicated
Okay okay after some profiling and optimizing a bunch of things I've managed to cut the generation time by more than half, which unlocked the next level of resolution!
Next step is to make the floodfill multithreaded
Tiles before / after (much smaller tiles now!)