played around a bit more with my "drawing roads on terrain" prototype today. this is starting to get a little closer to what I want
I revisited the non-uniform grid geometry nodes thing tonight and figured out a terrible hack to stitch the edges. I think I'm starting to get the hang of this.
Side note, I like how all my node graphs end up looking vaguely like deep sea creatures.
I came up with a cool way of generating terrain from a few splines tonight. Might run with this. Just draw some feature lines and boom there's a mountain or a ravine or something.
Here's another one. This took like no time at all to draw out. I feel like I'm on to something.
I've decided there's one obvious correct name for this technique and it is Spline Distance Field :3
I made a little visualizer material for my Spline Distance Field thingy.
🌲
What is really great about this system is you can just mash stuff together and it mostly just works. Here's the same hill as before, but twice. I'm planning on using this to construct coherent landscapes out of irregular tiles and no grid :3

I think I figured out a way to do inexpensive higher order curves with this, which would mean the transitions between curves (and between between curves) can be interpolated better. This is the main barrier preventing technique being more generally useful imo.

I'll probably take a crack at implementing it in the next few days if I have any energy left between work and random appointments.

I... may have upended the production schedule of a game friends are working on by sharing this tool with the artist 😶

improvement idea didn't quite work out :/

The idea was that since I can determine which curve is closest to a given point on the terrain grid, I can use edge data to find the spots where abrupt changes might occur, and then can do a nearest crossing test relatively easily. This does accomplish what it is supposed to, but other artifacts show up around the perimeter of the map so it's not really worth it.

Might have to settle for blurring the height around those edge crossings instead.
still, the technique is pretty powerful even without the higher order curves, and I'm sure someone smart on here might spot a better way to blend between spline patches 🤷‍♀️ I'll probably write something up on my blog in the next few days time permitting.
I'm really quite amazed at how fast the geometry nodes blur intrinsic is, but I'm starting to think the perf measurement for it is just broken.
🤔
happy accident: transforming arbitrary meshes with the spline field
Experimenting with visualizing the extruded spline tangents cropped by the spline distance field volumes. This is meant to demonstrate what is being interpolated to produce the height field, though this doesn't show the part where splines are projected past their endpoints.
Today an artist friend used this technique to completely redo all of the terrain in the vertical slice level for the game she's working on. Judging by timestamps, it took her about an hour to complete after a false start. I'm not posting the screenshots because they're confidential but holy smokes it is awesome :O
what really gives me life today is she wants to push it even further <3
I've been pondering how to adapt this technique into a more general purpose modeling technique, and heh it's funny how problems are trivial when they're discrete, bounded, and 2D, but get a bit harder when they're continuous, unbounded, and 3D
oh great, the piecewise solution is a 3D voronoi diagram. of course it is 😔
I've got a distance field approximation now. Here's something I hacked together with geonodes that runs like a siggraph demo you got too excited about. I haven't implemented blending between adjacent fields yet, but I'm feeling optimistic that I'll be able to get something workable together for real time raytracing later.
getting closer...
The magic here is I spawn one of these for each point on the spline, aligned to that spline point's tangent plane and scaled to that spline point's radius. Then I deform each point toward the tangent plane of whichever spline field it happens to actually be in and bob's your uncle. Its got some quirks but it works surprisingly well.
nailed it :3

Btw here's a cool trick I figured out today:

Say you have a bunch of mesh patches that overlap but the vertices don't line up, and you wanna force them to anyway.

Use the "Distribute Points on Faces" node with the "Poisson Disc" mode and a minimum distance equal to the longest edge in your triangle soup.

Then in the triangle soup, snap each vertex to the closest point in the poisson disc point cloud, merge by distance, and bam! you got something that is very almost a delaunay triangulation :3

Attempting to make a car with the 3D spline modeling technique. So far so good!
blocking out the roof and back window

This is probably as far as I get tonight, unless I get an inexplicable second wind.

So far I think this technique is agreeable for me. I've been able to pick at it a bit on and off despite being sick and tired. This technique is a more fiddly than I want it to be, but that might in part be because I'm trying to make the model accurate to my references.

Unsurprisingly I have some ideas for how to improve this technique further.

I think what I actually want is to make the feature outlines with splines (eg, the windows, the different parts of the car body, the bumper, etc) and then use those to guide the placement of control points that can then be used to further adjust the shape of the local surface, as well as to paint materials. The spline outlines would then also serve as cropping features for the control points / surfels so materials can have hard edges etc.

As for what my game is to render exactly, I'm leaning towards representing stuff authored in Blender as cropped surfel clouds that can then be raytraced to produce more different surfels. Cropped surfels would be a set of pseudo discs that occasionally also have a cropping shape associated.

In that end, anything with a mesh representation can be efficiently prepared for my game via the distribute points of faces node.

The cropped surfels thing is nice because I wont have to commit to any particular artistic work flow in Blender, and should I need some kind of acceleration structure I think the surfels could be made hierarchical be generating sets of them at different frequencies and saving out which ones overlap with which.
I think the goal I should try to work on next is just putting together a simple scene like a road with a guard rail and some cones pretending to be trees and see if I can export that into something I can render, and then figure out whether or not rendering that can be made fast.
I just wanna get lost in the surfels, man 😌

I don't like how Blender does unit conversion.

If you set a unit system, and choose a non-meter base unit for distance, it converts everything to meters under the hood, with the unit scale being a scale factor on the conversion to meters.

Since the units presented in the UI are superficial, if you need to change the scale or the base unit everything in your scene changes along with it ;_;

Anyways I just realized that I was greatly mistaken as to how this all worked several hours ago when I tried to setup the base unit and scale to be able to represent a scene a mile in diameter and thought I got to pick the base unit 😩

I picked a mile diameter for the map cell arbitrarily, but this precision problem in Blender got me thinking about this more and...

huh, I guess the view distance to the horizon is about 3 miles if you're 6 feet tall, and is a few hundred meters less if you're 5 feet tall.

now I'm trying to decide if I want to vary the draw distance based on camera elevation or if I want to deform the relative world positions of things to simulate the curvature of the earth 🤔
again way over kill for a game about driving a shitty car in the rain but on the other hand when was the last time you played a game about driving a shitty car in the rain that even attempted to let you reach out and touch the infinite

I got a bit carried away reading about classical units and what ancient people found to be useful units of measurement, and anyways it turns out the distance you can walk in an hour is in the same ball park as the distance you can see up to the horizon (for some excessively uniform and able bodied definition of "you")

What an interesting coincidence that these just happen to work out to be relatively whole numbers in both time and space.

Wild speculation here, probably completely wrong, but it wouldn't surprise me if somewhere in the distant past folks used the time it took to walk as far as you can see as a colloquial time unit and that distance as a colloquial large distance unit and through an elaborate game of telephone that eventually became the hour and league of today's units we all love and know (except for all the people the French conquered)
A continuation of this idea that I want to explore later is applying the time spent walking to the horizon thing as a perceptual unit for distance in video games, because while realistic games often use real world units for modeling things these days, they only do so at a very immediate scale, and large spaces (for good reasons) are typically much smaller than they'd be irl, and so stuff like speed has to be fudged to make it all work.
It's a problem space I know well, but looking at it from another angle is interesting to me.
somethings that might be interesting to play with: the amount of time a player takes to walk an arbitrary distance in a straight line can be used to calculate a practical unit conversion for literal distances, and the amount of time it takes for the player to walk a route between to points on the map following a natural travel route can be used to determine how big the space actually feels
oh my god blender does not consistently apply the unit scale everywhere it does the internal conversion to meters >:O
well my precision problems seem to be primarily due to poor choices made in their choice of view matrix so that's easy enough to work around at least

Anyways here's a mile diameter of terrain in Blender :P

Pretend this is a 2 lane rural highway that suspiciously lacks its shoulders, clear zones, and normal markings in an improbably arid mountainous region of Wisconsin and not a narrow path through cookies and cream land.

I think for map cells it'll work better if I try to keep the road connections at the crests of hills and going around bends and stuff like that, and the ideal size of a given cell is probably a function of how fast the player is expected to move through it, so when you're at the stage of the game where you're likely to travel in the 60 - 120 mph range a mile or three is probably a pretty reasonable cell diameter. the faster sections of the game will want larger map cells though
I had an idea for an interpolation strategy that doubles up as a noise function, and, well, here it is. I'm much happier with this version :3

I figure the exporter may as well build the acceleration structure for non-implicit models like landscape tiles for my game, so I'm experimenting with data structures for that now.

Here's a visualization of a hierarchical surfel graph for that landscape I posted a picture of the other day.

I'm experimenting with the graph construction parameters and visualization thereof and take my word for it that this image is actually very useful to me, but the main thing going on here is that it looks cool.

The visualizations are cool but this graph construction technique leaves something to be desired unfortunately.

My thinking was to poisson disc sample the terrain mesh at several intervals with the disc size decreasing each time. Each point becomes a surfel, and the nearest point in the previous generation is its parent.

The central light green patch shows that this technique can cause the coverage to meander quite a bit, and it gets worse the larger the root surfels are :(

the distribution looks fine if the root generation is dense enough though, so idk
It might be fine actually. In that particular case, the particularly prolific root surfel would have a bounding sphere about three times the diameter of the root surfel, but it only has 4 immediate branches which. So really it's a question of how tangled the branches are (and thus how fast it can prune them when processing ray queries), which is not something I can see easily from this visualization.
limiting the graph depth is also effective at preventing meandering
I think a better grouping strat will be having every surfel in the graph first label its ideal root, and then recursively pick the best ancestors that share a common root etc, but I don't feel like trying to implement that in geonodes tonight
This version of the surfel graph thingy looks like it might be more or less right.
ok that wasn't quite right but take my word for it this one is more along the lines of what I'm looking for
I learned how to use blender's greasy pencil tonight :D
Time to make like a tree and shed all my stop signs for the winter! #greasepencil #geometrynodes
@aeva i will refer to this as "aeva's coral-based renderer"
@aeva but jape aside, having great visualization functions is 👄🤌
@aeva feels like a really trippy place to go for a swim
@aeva Looks like a bizarre kind of fungus.
@aeva you made 3d broccoli :3
@celestia broccoli is normally 3d though
@aeva emphasis on the *normally* 
@aeva is that all still blender geonodes btw?  or have you moved to (blender) python? or...
@celestia geonodes, though I'm playing with the For Each node from the 4.3 beta now
@aeva is it as fancy as Tetrahedral Interpolation?
@aeva I'd love to hear the details if you are writing them up :)
@demofox The gist is, the splines are translated to a set of points w/ a normal and spline ID. Then the system takes steps through several tessellated discs of increasing vertex density (whose points were generated with the poisson disc sample thing). These are are translated into point sets with an associated normal, and assigned the ID of the nearest spline based on what point in the point cloud they're nearest to...
@demofox Since these new points also have connectivity to neighbors already, the system finds triangles where the nearest curve value changes. The vertices in these triangles are then appended to the point set that was originally generated from the splines before processing the next disc. The last disc is the densest of the bunch, and after it is deformed it becomes the final mesh.
@demofox There's still a blur node in there somewhere to soften changes in height between vertex neighbors with different spline IDs, but it only has 1 iteration, and is weighted with a fudge factor to perturb the results.
@demofox If the discs are pretessellated this is very fast and can all be done in real time. On the other hand, not pretessellating the discs could be used to have the density adaptive to the previous iteration's deformation.
@demofox The practical effect of this technique is each iteration places new control points along the boundary of the spline distance fields, but don't place new ones in the middle of the fields, which allows for the resulting mesh to bend between the fields in a way that I think is very pleasing for terrain. There's weird behavior that I don't quite understand, but I think it's weird behavior that is beneficial for terrain generation & can be erased by removing the weight factor from the blur.
@aeva thanks for those details, very cool stuff!
@demofox The key here is I never found a nice way to do higher order interpolation between the splines, but it turned out I don't have to because aliasing from low sampling rates is very good at faking it.
@demofox btw here's another screenshot that also has the splines that generated the terrain. basically you just draw the map isolines you want (or any other splines), use the tilt function to set the desired grade for each spline, and the system figures out how to turn all of that into beautiful terrain in real time.
@aeva but I like cookies and cream land...
@efi @aeva It does look super tasty!
@aeva don't forget that motion blur and fov also affects the perceived speed and hence the perceived time even tho actual time might be longer
@pupxel this is true, but these are both things that make me motion sick and I don't know how I'd adjust measurements to account for them
@pupxel for walking at least I think motion blur probably doesn't come up much. I'm guessing the psychological effect of manipulating fov is similar to how moving through a narrow space with poor visibility in real life makes you slow down because a given speed feels faster than it would in a wide open space.
@pupxel in my experience the real measure of psychological distance while driving is the number of CDs you go through
@aeva Minkata age from Uru Live Myst Online made great use of this concept. The clues were a book of compass directions and distances. The age(level) is just an empty desert extending in all directions well beyond the visible edges. Since every avatar walks the same distance, it is possible to solve for where the puzzle is without spending years wandering around aimlessly. It's a really cool use of practical space, played straight, in a game world ad the main puzzle element.
@aeva The game is free now cause it's old and cyan hosted on older hardware. but to get to Minkata is a little bit of play. The game is very Myst like and about trying to explore, NOT the usual marker map mmo UI points you to here is how you play multiplayer flow. The community will generally be happy to give you a tour if you don't mind spending a few days exploring to get connected with them. I tried looking for videos but this was most played before the YouTube streaming era.
@aeva not quite the same thing but i have been so impressed with how joystick response contributes to the perception of motion and heaviness when carrying or pushing objects in twilight princess. they also have incredible sound design but like for example the clawshot not accepting cancellation after the shot animation begins makes it feel like a rigid machine whereas the gale boomerang (iirc) can be quickly recalled and makes it feel more natural which makes some sense since it came from a monkey in the forest and not a mystical sky civilization with advanced technology (the game has some story themes i have been critiquing in my head but it's more complex than i remember)
@aeva we are our units
@aeva h/t to the crocodile hunter who immortally said, "what a fearsome unit!"
@aeva it would, but for about as long as we had a standard ruler, people have been measuring by counting how many standard rulers the distance is, but for day to day they would much so measure distance based on time or a concept that changes with time like the sun position