Hello guys,
I’ve got my destructible mesh, but it doesn’t destroy like I want it to. After changing support depth on mesh to 1 I finally got my mesh sides staying connected, leaving a hole between, but they’re still movable (by player, projectiles, whatever).
I set them even as support chunks and flags like “World support” or “Asset defined support” as true. But it still doesn’t help. Mesh edges are in wall and ceiling so I though it would be enough to hold the “supports”.
Am I doing something wrong or is it kind of a bug?
Hey Matmow, did you figure out what was wrong?
No, but I read somewhere about fixes for support chunks in later versions in ue4 so it may be working now
From what I can tell, it still doesn’t :\
All you need to do is enable World Support flag in the DM as well. This will environmentally support the DM for chunks that have not received enough damage to break free.
I’ve just posted a simple setup and demonstration here if you’re interested: [TUTORIALS] Photons Be Free: Mini-tutorials and other curiosities - Community & Industry Discussion - Epic Developer Community Forums
Thank you!
Thanks
To get it working though, I had to make sure more options were enabled. Here’s a list of my settings:
Enable Impact Damage = checked
Impact damage = 1
Default Impact Damage Depth = 1
Asset Defined Support = checked
Then I had to go in and assign support chunk parameters to the chunks that I didn’t want moving or fracturing (under the “Chunk Parameters” tab)
Side note: I’m using a vehicle driving to drive into the wall
Now it works great, except that the wall won’t fully break upon first impact and all the non support chunks immediately come loose together.
What I mean is I’m driving at 300 kmph into the wall and it stops my car dead as well as fractures every chunk up to the supports. The wall doesn’t crumble, but it does have a few pieces fall off - which is pretty cool actually, but I need the vehicle to drive through, and the fracture damage radius to work properly.
I’ve tried setting Damage Threshold, Damage Spread and Custom Impact Resistance to very low numbers (0.1, 0.01, etc), to no visible change whatsoever
Also, setting Damage Threshold to a high number sees no difference from setting it to a low number (0.1 - 1000).
The wall seems to take damage the same way, regardless of settings.
Any ideas?
As my setup in that link mentions there may be other settings that you may need as well.
For the vehicle not breaking through on the first impact, I cover this in another post I made here: [TUTORIALS] Photons Be Free: Mini-tutorials and other curiosities - Community & Industry Discussion - Epic Developer Community Forums
You will need to set the Custom Impact Resistance to a low value. This will only work with 4.8 and later though since it’s been bugged up to this point.
Once 4.8 releases you will be able to use that setting all you want. We do have the preview releases starting very soon, but I absolutely DO NOT recommend using this for your development project. There are always known issues with preview releases as it’s being actively developed which can cause things to break week to week as we do the preview builds. If you need to test a setting it would be a good way to check and see how it works though.
Feel free to ask any destructibles questions. This is an area of the engine I work with often and if something is bugged I would likely know.
Guess I could have used my eyes and searched that forum thread further.
Thanks for posting those mini-tuts, they’re quite useful for everyone.
So I take it is also from a newer build? Since it looks like whatever hits that walls travels right through quite easily.
It looks as though I’ve got this thing pretty much set up correctly, just I’ll have to wait for 4.8 for the fix.
Now that you’ve made the offer of asking questions, the flood gates are open
Questions/issues:
-
Frequently, when the car runs over/into the destructible or it’s pieces, the game with “freeze” for up to 0.5 seconds and then continue. I say “freeze” because the editor isn’t actually frozen - particle effects continue, and debris will move.
Sounds maybe like this has something to do with the engine calculating the collision, but that would be surprising since my PC specs are pretty high (3570k, GTX 970, 16GB DDR3)
Have you ever experienced this? -
Also frequently when running into/over pieces of destructible or any physics object, the vehicle will fly into the air as if jettisoned. It’s like the two can’t exist in the same place at the same time so they nuke each other.
This may be getting out of the destruction realm and isn’t your area of expertise, but I’ve noticed that regardless, the vehicle (ours, the track test one, the example one, whatever) will fly into the air much more than it should when it hits a bump or piece of geometry. Even with gravity jacked up, things that enter the air seem to float, or bounce far too much.
For the record, restitution on surfaces are all set to 0 -
What about the damage spread issue I mentioned, is that waiting for a fix with 4.8 as well?
Side note about a potential bug: When selecting chunks in the DM editor, I can’t actually select anything unless I go in real close to the chunks in the viewport. Then I use left-click to select the first one - no need for CTRL
The video for DM How-To #5 is actually from 4.7.5, I believe. With that one I simply had two radial force actors set to fire off a split-second apart to blow the pieces back like that. Nothing fancy, just enough damaging applied and enough force provided by the radial force actors to kick the pieces away.
-
Can you post your DM settings with the number of fractures used for the DM? I imagine it would be similar to the one displayed above though. I’ve not noticed this myself, but I don’t often test this with any vehicles either. I can see if I’m getting the same results in our Vehicle template and go from there. Typically any sluggishness or freeze that I’ve seen has been due to have too many fracture chunks and keeping chunks in the scene longer than needed. The APEX Destruction is all handled on the CPU to make it GPU agnostic instead of only working with Nvidia cards. This can cause laggy issues when using too many fractures or too many DMs that are all fractured. There is also a hard-coded cap of 2000 fracture chunks per scene at a time. Anything over that get destroyed immediately.
-
This seems more to do with the setup of the vehicle. I’ve only really dealt with the Vehicle Template one that is available with UE4. Beyond that is another territory. I don’t mind looking into it though if you’ve got an example and how you’ve setup the vehicle. I’m sure you’re using a custom setup that isn’t as close to the setup of the basic Vehicle Template.
- Damage Spread is working as intended. Essentially, Damage Spread is the amount of damage passed to other chunks from the point of the damage application, whether that be a impact or application of damage. If you set the damage spread to 0, surrounding chunks that are not directly hit will not be applied damage from the chunks that were hit. If the damage spread is left at 0.1 it will apply damage based on the amount of damage it receives, which can carry over to the entire mesh if a large impact or damage application is received.
I’ve added a simple explanation over on my forum post here: [TUTORIALS] Photons Be Free: Mini-tutorials and other curiosities - Community & Industry Discussion - Epic Developer Community Forums
- the selection isn’t a “bug” per se. Try exploding the view a little more so that you can select chunks more easily. it also helps to be in a more front directional oriented view than from an angle when selecting some of those.
Ah, ok @ How-to #5
- Here’s my DM settings in full:
Damage Threshold = 1
Spread = 1
Impact = yes
Impact dmg = 1
Impact dmg depth = 1
Asset defined support = yes
Support depth = 1
Min fracture depth = 0
Cell site count = 100
Even with just 100 fracture chunks on screen, it will hang up as I drive through. It’s not the vehicle collision setup, my coder just confirmed it.
The editor will never be sluggish, it’s constantly at 60fps (capped), but the car will freeze for an instant and continue as normal (as normal as it can get :p)
-
Our vehicle setup is based off of the one the Space Dust guys used (albeit heavily modified):
-
Ok so I just experimented with setting dmg threshold to 1000 and spread to 0.00001 and it works! Looks like the vehicle impact does a hell of a lot of damage on impact. Our projectile, on the other hand, does not apparently, because it’s much easier to drive through the wall than it is to destroy it. So, have to do some tinkering there.
This looks pretty cool now though, thanks. Much more realistic. It’ll allow for me to create buildings that have destructible walls with rebar as a separate mesh underneath to “hold” support chunks.
- Exploding the mesh more helped, thanks
Now I’m going to start experimenting with attached particle effects and debris. I’ll no doubt have more questions for you
Thanks for the help so far, .
Hey, Just wanted to give you a heads up, I’ve not forgotten about you. I looked at this the other day briefly and was seeing the same thing with the vehicle hitting and stopping. I’m sure there is a way around this, I just don’t have a direct way of doing it at the moment.
With fractures, typically anything over 25-50 pieces you’re going to notice a slow down. This is because PhysX destruction and clothing are handled on the CPU and not the GPU so that NVIDIA’s tech works with both AMD and NV cards.
If you want to have the effect of a lot of destruction my suggestion would be to do particle effects with smoke and GPU meshes for debris so that you can use fewer chunks to give the illusion of more than there is. This is a common technique used in games to keep performance up.
Something similar to this with the building: Battlefield 3 : Destruction fun montage [HD 1080p] - YouTube
Since particles are being used you can have a lot of debris meshes that are in the scene only briefly and then gone. Smoke and dust particles help hide part of the destruction effect to give the illusion of more. In all there are only a few wall pieces left on the ground that the player can interact with.
Some of this will depend on the weapon being used or the force that hits the walls and how damage is applied as well. This is one way of looking at it though.
While most settings can be setup in the DM to work for your game, some things will require the use of BPs and applying damage in a specifc amount or way there to the DM to get a desired result.
Once I get some more free time I’ll look at the vehicle stopping/slowing on the initial impact. We’ve got 4.8 previews starting soon, so time will be limited for a little bit.
Feel free to ask any other questions in the interim, if you have them, and I’ll answer when I can.
Thanks!
Hey ,
In terms of chunk counts and slow down, wouldn’t the actual framerate drop if the CPU was under too much load?
I’ve already got a particle effect with dust and chunks integrated, and it does help but it’s definitely no substitute for real debris.
You’re right though, may need a BP for some deeper customization. I’ll no doubt be back here if I do go that route, ha
Questions to be answered whenever you’ve got time:
- Chunks seems to frequently disappear when our projectile hits them, sometimes all the chunks except for supporting ones. Think this is this due to too much force or too much damage?
I’m leaning toward force because our missile can send chunks into orbit when they don’t just disappear. It’s strange though because it only makes a small hole in my destructible wall (usually 1-3 missing chunks and very few fractures), compared to the vehicle, which can drive right through the thing, even at a snail’s pace
- This issue relates to the disappearing chunks as well.
I was experimenting with having a tall structure that could be damaged in the middle, having the top tip over to fall and smash on the ground.
I set support chunks for the pieces at the bottom intersecting with ground so the base wouldn’t move, and then set the missile’s target for the middle of the tower.
When my missile impacted the middle, chunks would either blast out and far away or disappear… and not fracture through to the other side (leaving a thread of geometry and a still standing tower). Then when I shot the remaining connection, the whole top half of the tower just disappeared.
Maybe I’m asking too much of the engine
There may be other issues, but it’s late and I can’t think right now.
I can always take a video of these issues for you to take a look, but if so I’d rather shoot it over email than make the project public just yet.
…and I know you’re busy so no rush on a response, I’ve got plenty to do anyway
Hey
Thought I’d also mention that the freezing/pausing upon impact isn’t isolated to destructibles, I also see it happen with simple physics-enabled object in the world (that are also low poly with simple collision)