How could I make a car in Blender and export to Babylonjs?

I would like to make a very simple car in blender, just a car body box with four wheels, wheels have motor-forces to drive itself rotate, and drive the car body run.

I wanna know if I could also do the above in blender and export to Babylonjs? And what should I do then in Babylonjs? Would I still need to code adding hinge joint to wheels with car body in babylonjs?

I know, in the babylonjs documentation there is articles telling how to make a car driven with babylonjs, but that doesn’t tell how to make a car in blender.

Wishing all best to all for any answers or help, thanks!

I just saw that the Babylonjs editor could do the above job, it is nice!
But, I still want to know If I could do most things in blender and then export to babylonjs, how much thing could blender export ? If many of things could be done in blender by 3D designer, then programmer could focus on other important things.

Hi Win_Sun!

I wanna know if I could also do the above in blender and export to Babylonjs?

Yes, absolutely. It’s pretty much expected that you will export from some 3D modelling software and then import it into Babylon. Babylon can handle many filetypes but I’d recommend either the .babylon files or .gltf/.glb.

If you’re unsure how to use Blender I would suggest looking at some YouTube videos like BlenderGuru or Grant Abbitt.

And what should I do then in Babylonjs?

Maybe have a look at this. It covers loading meshes from an external source.

Would I still need to code adding hinge joint to wheels with car body in babylonjs?

Yes, meshes are simply visual data. Most logic/physics will have to be handled by you (with the help of Babylon, of course).

Hi DisownedWheat, thanks a lot for your helpful reply first !!!

I know basic blender modelling, and very basic babylonjs usages, very basic.

I have made a simple car body (a tweaked box) with four wheels (cylinders) in blender, and succeeded export and import in babylonjs - just viewing the whole car.
Then I want to let the car wheels rolling (pushing the car go forward).
I have written a demo program to let two wheels rolling by using Hinge joint & setMotor() to let Physics work, then the car body will be pushed going forward. All animations are doned by the babylonjs physics engine. I feel this progress very waste time tweaking the position & rotation & axis for wheels to fit the car body. If more things could be done in blender, then it would be better.
For example, If I could, in blender, modelling the car body & wheels, put them in right positions, then in babylonjs, I only load the whole car file, and setMotor() on four wheels, then, the car could be driven. How wonderful if it could be reality.

I am a newbie, I dont know much if it could be, or how it should be now.

There are some excellent demos of car physics on terrain around here, but afaik there is no solution that magically turns a car-looking blender model into a game-ready physical representation of a car.
Once you establish your initial car physics + terrain engine, of course you could swap in any car model as you describe. But even in most AAA engines/titles, the vehicles feel shoehorned. It is no simple problem (and why racing sims are their own genre).

Thanks to your reply.
Dreams are beautiful, reality is brutal !!!