Im looking to create a simple deformable car with procedural mesh, but there are little to no tutorials about it.
Hey there @Hanzelikusz1! Welcome to the community! The answer depends a bit of how simple you’d like the deformation without proper damage models, you could take a look at how this plugin does it:
Link to plugin:
If you were looking to get more custom deformation like the vehicles in the matrix awakens demo, you’d be getting a little more involved. The matrix awakens demo seems to use control rig and custom bones to add the crumple effect.
Hello, i have looked at some deform-like plugins in the marketplace, but i havent got what im looking for. (for free xd) im looking for some very simple procedural mesh deformation, and i have looked how they made the car deform in the matrix awakenings, it is very impressive, but i don’t think the quest 2 chip will handle that kind of damage model with several cars unfortunately .
Actually the damage modelling for the matrix awakens might be a bit fancy, but in the end it’s just a couple of IKs so it’s quite light weight. Just the method they did for it was a bit more involved than I’d expect most damage systems would need to be. It’d definitely be lighter than more procedural solutions but way more work up front (and ongoing for any time you make more vehicles).
Do you have an example of how you’d like it? I might be able to find a good example somewhere. Just don’t pick anything like softbody physics because that’s on the high end of expensive for VR. Especially mobile VR like the Q2.
YouTube?
I really like his solution, with the changing textures depending on how dent the car is. (I don’t want to copy his work), so thats the way i wanted to go. So my plan is to make a vehicle, that has detachable parts (hood, bumper, fenders), and the hood and the fenders would bend outwards on frontal impact. Do you think these kind of deformations are possible with procedural meshes? Or would it be better to use a simplified skeletal mesh using inverse-kinematic and physics constraints to replicate this level of damage? (the outwards bent hood and fenders). Which would be more performance heavy if i were to use around 30 different vehicles in one scene?
PS.: I also experimented with morph targets, very simple actually, only problem was i couldn’t determine what side of the car was hit (front, left, or right). But either way it didn’t looked nearly as dynamic as procedural mesh or the matrix’s skeletal system.
Oh his solution is quite nice! I think that’d actually be a really effective way to go, and you could also even retain your detachable components. This is game development, using systems for reference is 90% of what we do.
If you were to go the SKM route, you’ll have lots of hand work to do on each rig, but once it’s done it looks great but it’ll generally only deform the ways you hand design, which if you plan on having emergent situations (like say the hood flopping up then off, or the bumper hanging on by a thread) you’d have to account for them. Procedural mesh would be more performance heavy than just the SKM deformation, but if you’re including physics constraints and all that jazz it’s possible they are pretty close. Hard to tell without a benchmark.
Since Im trying to create a damage system that is relatively light, Im not sure if i want the bumpers and the hood to be floppy, and i was researching about procedural meshes, and uh skeletal meshes would fit better. They can be recorded (and modified) during cinematics. The upside for procedural meshes is that bullet hole decals are much easier to implement. So like, ill just have to make a car body with a bunch of IK bones and, then import the skeletal mesh into a control rig, then add physics bodies to the bones, then just add constraints to the physics bodies and thats it? (Oh btw, if i want the hood, fenders and bumpers to be detached, they have to be a seperate skeletal mesh? So i could add like hinges to the hood and fenders to stay on the vehicle body?) (Uh side question, does nanite work for VR? Does it work for android VR for quest 2? )
You’ve got the general gist of it. Unfortunately Nanite isn’t running on Mac, Android, or iOS yet that said, Nanite doesn’t yet work for SKMs anyway. If you need some inspiration check out the vehicles themselves in the sample project. There’s also this breakdown from the team that designed them as well:
Hello, last week i was trying this skeletal mesh method. I created IK for the hood and fenders with weight paints. But then i imported into unreal engine, the IK didn’t work, the IK controller bones were locked and i couldnt assign a physics body to them, I tried many more ways, then looked at the control rig needed, so i gave up for now. I went back to using morph targets, and uh i have encountered yet another problem, i have a skeletal mesh body with morph targets, (front, back, left, right), then i have the detachable parts, the hood, fenders and bumper, they each have morph targets, however they are static meshes (each part is a different asset which is assembled inside a chaos vehicle component). So my problem is that, morph targets doesnt work for static meshes? i couldn’t find it anywhere, I googled it and tried the material thingy and didn’t work. And one more problem is that the front bumper is attached to the vehicle, and to stay on it has its physics disabled. But because its physics is disabled it doesnt generate hit event, how can i like generate hit event on that specific front bumper static mesh with its physics turned off?
Hey again! So you’ve got it right, normal morph targets are only for Skeletal Meshes, but you can still apply morph targets to static meshes with a bit of material magic with world position offset. However it sounds like you’d tried this method from the documentation?
You should be able to keep generating hit events even with simulate physics off as long as both object have generate hit events on.
The alternative would be looking into physics constraints and that’s a barrel of fun, but less stable.
I can’t find where to assign the physic asset to the control rig either. Can you point out where can I assign it.