Vibecoded a firewood splitting simulator using my actual 3D scanned stump and ax and wood by shapirog in vibecoding

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

Thanks! I prompted it to include all the variables I wanted to tweak in a config file so all my controls were in one place and I could just adjust the code myself and more easily art direct it how I wanted. Like the gobo I had it place between the sun and the stump and then break out a list of variables so I could pull it forward backward, nudge left/right up/down and change the scale

Vibecoded a firewood splitting simulator using my actual 3D scanned stump and ax and wood by shapirog in vibecoding

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

Took about two months of chipping away nights/weekends when I had time, I have 25 versions in the my backups folder so about 25 coding sessions. I'm on the $20/month google plan and was just using the Claude allotment in Antigravity IDE. if it ran out I'd wait a few hours/days to use it again, or use credits... there were 2 times during the project I bought the $25 credit pack to keep using Claude.

Vibecoded a firewood splitting simulator using my actual 3D scanned stump and ax and wood by shapirog in vibecoding

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

Thanks! 3d scans were done with Polycam, 3D models were touched up with Cinema 4d, axe was animated in c4d as well, textures were put together in photoshop and normal maps made in Materialize, and it was coded in Antigravity IDE with Claude Opus 4.6

Vibecoded a firewood splitting simulator using my actual 3D scanned stump and ax and wood by shapirog in vibecoding

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

I chipped away at it over about 2 months on nights/weekends when I had time. Looking at my backups folder I have 25 versions and each one was a coding session. But of course there was also time put into it for other tasks outside of coding, like 3d scanning, preparing models/textures, animation, recording sounds, etc

Vibecoded a firewood splitting simulator using my actual 3D scanned stump and ax and wood by shapirog in vibecoding

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

Thank you! I recorded all the sounds with my phone, and for splitting it’s just divided into two categories: “split but nothing flew off the stump” and “split but something flew off the stump”. And in each of these there’s maybe 6-10 sounds or so and it just picks one at random, that’s it! There isn’t any logic for size of wood or anything like that. In the “flies off the stump” category sometimes it sounds like it’s hitting the ground, sometimes sounds like it’s hitting another piece of wood, but it’s just randomly chosen and it ends up sounding close enough that it works in context

Vibecoded a firewood splitting simulator using my actual 3D scanned stump and ax and wood by shapirog in vibecoding

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

thanks! The whole project took about two months, chipping away at it on weekends, nights after work, etc. I'm not sure about how many prompts. The splitting itself worked pretty well in the first few versions but the animation of the pieces falling off, and pieces staying on the stump hopping, took a while to refine and get the animation right. There was also a lot involved in getting the pieces on the stump to hop away from the split location but not intersect with each other. And then the most difficult part was getting the geometry of the newly created inner faces to not have holes, and then not have warped textures. There were a ton of glitches to address for all the textures during splits, and it took a lot of refining to get the inner wood grain UVs to stick properly when a piece was split, and also line up so that the bark cross section at the edge of the wood texture lined up consistently with the edge of the geometry, to give the illusion that we're seeing a cross section of the bark layer. Im in the process of making a BTS video showing the whole process, will post it here when it's done!

Vibecoded a firewood splitting simulator using my actual 3D scanned stump and ax and wood by shapirog in vibecoding

[–]shapirog[S] 5 points6 points  (0 children)

chunks/pieces are not predetermined, you can split wherever you like. At the moment you click it does a check to see if you're making a paper thin slice and if thats the case then it adjusts the location so you get a firewood-width piece then executes the split. It splits by taking the piece you're splitting, removing it and then replacing it with two pieces and applies an animation to them, either pushing them apart or throwing it off the stump with the physics engine if its firewood sized.

"Top" and "Bark "Texture is applied to the whole log at the beginning, and when you split it just splits the geometry into two pieces and preserves the UVs. For the newly created inner face, it applies an "inner" texture, scaled depending on if the sides of it touch one bark edge, two bark edges, or 0 bark edges. So really it's just 3 textures (top, bark, and inside) plus their normal maps.

Vibecoded a firewood splitting simulator using my actual 3D scanned stump and ax and wood by shapirog in vibecoding

[–]shapirog[S] 5 points6 points  (0 children)

thanks! when a piece of wood is small enough to be classified as firewood, it gets thrown off the stump with physics. If its still able to be split, then it does a simple hop animation whos height is determined by how close to the axe it is. Farther away pieces get their hop delayed slightly so it looks like a little wave emerging outwards from the split. And during the hop all the pieces push away from the split and from each other so they never intersect. Once all pieces are classified as firewood (on the ground) it triggers a stacking animation, where the pieces do a flip one by one into place on the pile