endless dinamic map with bulldozer with ammo physics


I was trying to create a world that descends to build and destroy terrain like in real life.
I used a good part of a 2018 project by a guy called Ethan.

The part about picking up volumes and being able to deposit the same quantity elsewhere still needs to be refined a lot.

I would also really like to improve the gear teeth on the wheels, but I couldn’t find anything similar on the internet on how to follow the curve of the spiline with the ideal tooth spacing.


Hahah this is awesommme!!!
I think I know the project you started from …
Backhoe is a great use of the deformable terrain tech :D.
Kids love these kinds of sims! You could make this into a pretty fun game!

Very Cool.

Got a link to the original terrain repo? I’d like to check it out…

1 Like

sweet ty. Yeah I remember it now.
btw… some kids (and adults) are absolutely obsessed with construction/digging machinery… you really could have a fun little mini-game or attention-capturing toy for those types of folks.

I’m super impressed by how stable and functional you got that simulation working!

I’ve tried to make a backhoe type thing before and never got it feeling like anything but rubber.

I read a story a while back about a guy who became a millionaire by selling videos of the construction site next door to his house… turns out there is a huge swath of kids that are just nuts about these machines, and I think the digging/earth moving mechanic is a big part of that appeal.

Cool stuff!

ps: I think it was this guy: https://www.youtube.com/watch?v=J1QlmmT-4Ro

edit: Here’s some code for loading an environment map + background to make your scene feel less like it’s on the moon:

import {RGBELoader} from "three/addons/loaders/RGBELoader.js";


    let pmremGenerator = new THREE.PMREMGenerator(renderer);
    let envMap;
    this.loadEnvironmentMap= async ({url="./pretville_street_1k (4).hdr",blur=1.}={})=>{
        return new Promise((resolve,reject)=>{
            new RGBELoader().setPath("").load(url, function(texture) {
                envMap = pmremGenerator.fromEquirectangular(texture).texture;
                const blurFactor = .041 * blur;  //Blur the envmap...
                let nscene = new THREE.Scene();
                nscene.environment = envMap;
                nscene.background = envMap;
                scene.background = scene.environment = pmremGenerator.fromScene(nscene,blurFactor).texture;

pretville_street_1k (4).hdr (1.5 MB)

Looks smth like this:

1 Like

Also, I humbly request you switch A/D with Q/W so the driving controls are A+D = left+right turn, and W = forward, S = reverse… (like all videogames.)

Then use R and F for hoe up/down Q/E for hoe rotate left/right

And Z/X for the arm swing, (or space/c if you prefer)

Additionally in your main loop you do:

        vec3.subVectors(camera.position, escavator.main.position);


        postprocess.update(delta, elapsed);


//MOVE the vec3.subvector stuff here to prevent jank when right click+drag
//vec3.subVectors(camera.position, escavator.main.position);

//Also maybe move all this logic up before the render.. so render will have the current controls.target+camera position and not be lagged 1 frame behind.

How did you implement the treads on the backhoe? They look reaaaallly good…

1 Like

Thanks, I really forgot what it was like to drive in car games. As for the skybox and post-processing, I will first try to create the part to deposit the collected material and create other machinery.

1 Like