Higuys!
This is a mini project just I started. Hopefully it won't take much time. I'm trying to figure out a neat system to generate various car bodies with as little geometry as possible. So extremely low poly but still in realistic proportions. The system is meant to be used in another project that needs a bunch of simple but diverse car designs. I'm hoping to get some feedback on how to tackle this from art/design and procedural 3d modeling point of view.
Aesthetics-wise I'm inclined towards extreme simplicity of original Elite Frontier spaceships. Due to technical reasons they consisted of only few triangles but still managed to look cool, if somewhat same-y:
So the idea is to use a single mesh topology consisting of as few polys as possible. This topology should be driven by some parameters that can rearrange it into multiple body types. The less parameters the better. So the main problem here is what topology to use and which parameters should drive it for maximal versatility.
The concern for me would be the vehicle controller itself because I have found it to be a tricky sod at times setting things up in Godot, not as bad as Unity, but the VehicleWheels as an example have their quirks you need to work out and it can get frustrating. The mesh part should be fairly straightforward but yeah, physics lol.
Lethn Yeah, car physics are nasty ? Luckily I intend to stay away form it here. The focus will mainly be on looks/proportions. In the project this is built for, all cars move "on rails". Maybe they'll even be completely wheel-less and hover on antigrav fields.
So I've written some staple helper code. Most importantly a boring function that spits out mesh patches with smoothed normals. It takes a list of line strips as an input. Works basically like a multi-profile loft tool in a 3d app:
I'm planning to combine multiple such patches to get some hard edges between smooth surfaces. Although it'll be only couple of quads per patch, I'd like this to mimic hard/soft edge balance on real car designs.
I think perhaps the most dominate identifier for a block of play dough being a car is definitely the wheels. I would generate 2-6 pairs of wheels and force the mesh generation to form a mesh around them.
Seriously though, it's ok to start from wheels but there's still a question of what to do with the body mesh. The wheels only establish some sort of bounding rectangle. Yeah they sure do communicate that the thing is a vehicle but I'd like to have something more streamlined than a playdough potato attached to them.
Following @Erich_L expert advice, I implemented a function that makes cylinder and circle meshes. We can now have some wheels. Since there will be no physics, all wheels are crammed into a single mesh to avoid excess transforms.
And then cabin size, position and slopes. There is a separate parameters for side, front and back slope of the cabin. I think this is important because these slopes contribute a lot to car's overall "character".
Added a bunch of parameters to control elevation and sloping of car's front and back boxes, as well as wheel radius/thickness and spoke size. Some parameters have absolute values while others are normalized to 0-1 range to keep them constrained to "parent" dimensions. This is done to minimize the number of situations in which the output mesh can "fall apart" when using randomized parameters.
Yeessssss! I knew you could whip up some wheels without any problem and they really are IMO the first place to start on this kind of project. I know you're not going to regret having wheels - said every car designer ever. I too spent quite some time staring at the gif lolol.
I've now added parameters to control two chamfers that go all along the length of the body (top and bottom). They refine the form somewhat, make it less raw/boxy. The parameters control chamfers' overall width and angle. The top chamfer's width/angle can additionally vary in front and back. It works like a variable radius fillet but only consisting of one step:
It's plain ArrayMesh. The key vertices are arranged into edge loops according to descriptive parameters mentioned before and the mesh is then lofted each time there is a change in parameters. It's fast. There is less than 100 vertices in total, including symmetrical ones.
I was considering CSG. At first it indeed looked like a good idea. However, I figured with such low polycount, controlling it may be more cumbersome than fiddling with vertices directly. And god only knows what the final topology would look like, possibly complicating uv and vertex color handling. I'm also not sure if the resulting mesh can at all be plucked out of Godot's CSG system.
The main challenge really was to figure out the topology. I wanted it as simple as possible yet versatile enough. The final topology (shown in the first post) looks like an instant obvious choice. However I spent quite some time in a 3d modeling app figuring it out. Needed to make sure it can be reshaped into a range of decently looking car forms. I initially thought a much denser mesh will be required.
Erich_L Woo hoo that car is THIIIIIIIIIIIIIIIIIIIIIIICK. I absolutely love it. Probably a good time to make this part of the main project now? No? Ok, probably need to add procedural textures then. Turn some Perlin noise into dirt, scaling opacity 1 near the bottom and 0.08 at the top.
Woo hoo that car is THIIIIIIIIIIIIIIIIIIIIIIICK. I absolutely love it. Probably a good time to make this part of the main project now? No? Ok, probably need to add procedural textures then. Turn some Perlin noise into dirt, scaling opacity 1 near the bottom and 0.08 at the top.
Right. Much cleaner this way and I know exactly what's in the mesh. I suspect CSG could produce artifacts, visible or not, for example when consecutive operands' faces or edges coincide. It'd certainly make more mesh data for the same look. Plus I like this self-imposed limitation of reducing everything to the same topology. Prevents me from piling more and more stuff on.
It definitely can, in the godot 4 thread I shared a Cornell box I had made with CSG that did run into it. Fix was simple enough, I just changed the parenting order around a bit which forced a rebuild, but yes, it definitely can.
Now, if you don't mind a 'challenge' to test your system I challenge you to replicate a facsimile of the tesla cybertruck. I don't think it's too outrageous and is already in the ballpark of the previous car example you showed tho. But it would allow you to claim ability to replicate a 'real' car. ?
There is of course no definitive answer, but I've always been partial to The Populator. It fully replaces the monsters in a map with a new set of the vanilla enemies and rebalances weapons and ammo accordingly. Since it does its magic on a copy of the input WAD, you can also use it with any port rather than just GZDoom like most randomizers.
When it comes to GZDoom randomizers, I'm not a huge fan of those that add a bunch of custom monsters, so I'm fond of Corruption Cards, which adds random gameplay modifiers, and Universal Entropy, which makes each monster slightly different in health, speed, aggressiveness, etc. (It also works on top of almost any other mod, so combining things is fun.)
I use legendoom+corruption cards, works quite nice, but still loking for decent monsters randomizer mod, not chaotic one that throws every known monster at ya (those shotgunners in flying 'cars' from duke nukem looks so silly) more vanilla and balanced, maybe
Other than that, Complex Doom makes a good job too even though it's more chaotic. Legendary Complex Addon is a good expansion pack for Complex, and if you don't like the legendary monsters (which I don't) you can always disable them by tweaking the file with SLADE
I honestly don't really like many standalone randomizers out there currently... they feel very bloated, very bland or just plain unbalanced/unfun most of the time, so i usually stick with more complete mods that *include* randomizers of their own like Supercharge or Project Brutality (but i do wish there was some standalone randomizer that went for quality over quantity tbh)
Max Hawkins' randomizer app sent him to the Czech Point Restaurant and Pub in Clutier, Iowa, among the many places he may never have found on his own. Courtesy of Max Hawkins hide caption
This week, the podcast and show Invisibilia examines the nature of reality, with a Silicon Valley techie who created apps to randomize his life, a psychologist who trains herself to experience the world like dogs do and a wildlife biologist who thinks bears aren't dangerous.
How is it that two people can look at the same thing and see something completely different? Alix Spiegel and co-host Hanna Rosin tackle the notion of bubbles and follow two people making radical attempts to break out of them in the latest episode of Season 3 of the NPR podcast Invisibilia.
From there, Max's applications became more complex. He built an app that used a Facebook search function for public events to find ones near him. Then the app would randomly choose which event Max would attend.
At first, he was nervous: What if people wouldn't let him in? But, as a kind of unassuming white guy, he actually didn't have this problem. (And Max acknowledges this privilege.) Once Max explained how and why he had arrived at these events, hosts usually welcomed him, often with only a few questions asked. Most of the time, people were taken by the idea of Max expanding his bubble.
One night, he got to drink white Russians with some Russians. Another, he attended acroyoga (as in, acrobatics + yoga). A community center pancake breakfast. A networking event for young professionals. The algorithm chose; Max attended.
Most of these events were something that the nonrandomized Max would never have thought to try. The computer was breaking him out of a life driven by his own preferences. He was suddenly seeing the world in a whole new way, and he really liked it.
3a8082e126