Download

Physx/APEX Destruction

Hi all,

Is it possible to give different weapons different power in causing destruction with Physx/APEX?, for example: hand gun, machine gun, rocket gun, granade, soft ball (which wouldnt do anything). So a hand gun would do damage but a machine gun would do more damage and a rocket gun and granade would do more damage than a machine gun. A softball wouldnt do anything (just bounce off).

Physx/APEX on AMD/ATI: From what I understand on AMD/ATI it actually runs on the CPU but with Nvidia is runs on the GPU which is of course much much faster. Is it still possible to do decent Physx/APEX destruction with AMD/ATI on the CPU? I dont want to have to turn things down a lot for none-Nvidia users. Ive not seen any tests with AMD/ATI so im not sure. I use Nvidia.

Thanks.

Second question: UE4 runs all physx simulations on the CPU, no matter which graphics card you have.

Yes this is possible. This type of control would be determined by the amount of damage your weapon is giving off. You would set up the destruction mesh to have it’s properties already set that are at whatever value it starts to take damage. Your weapons, depending on their values for dealing damage, will determine how the damage is ultimately handled.

For the softball example, this would be simply setting the collision parameters to have collision and not dealing any damage.

With regards to how PhsyX/Apex is handled in the engine, Mikand79 is correct. All PhysX simulations are handled on the CPU. UE4 is graphics card agnostic in this case. :slight_smile:

This is to make sure that UE4 is handling the same regardless of which graphics card you prefer. NVIDIA has provided a cross-platform solution for APEX Cloth and Destruction.

If you have any questions feel free to ask! :slight_smile:

Tim

@Mikand79 Thanks very much for the info I didnt know that. So it doesnt have the same power as something like Mirrors Edge, Maffia 2, Batman etc. I would of thought both Epic and Nvidia would want to have the GPU version in the engine as for Epic it makes there game engine better and for Nvidia it puts there cards ahead. I know its not as simple as that though. I guess it requires a license from Nvidia to have the GPU version like Mirrors Edge, Maffia 2, Batman etc.

Ive seen Mirrors Edge with Physx Off and then with it running only on the CPU and it just goes down instantly to a few frames when the glass is broke.

Is this the same for UDK?

@Tim Hobson - Thanks for the reply. Yeeeeessss :slight_smile: Thats what I wanted to hear thanks very much.

Is this the part where I could set different settings so that its easier (because of what the item is) to destory for example wood and glass than it is to destroy a wall even with the same gun?

Yeh that makes sense to have it cross platform like that. I do wish there was the option to use GPU though but its not a big deal. Ive seen some cool demos already in UE4 with Physx and seen some with UDK as well and they do fine on the CPU.

When giving the user settings so they can set for example graphics/physics: low, med, high, very high for textures is it possible to do the same for models (higher poligon versions) and also for APEX so on low the chunks are bigger and may be dont stay around as long but with very high they are smaller and stay around?

I was told UE4 support was good but im impressed. Keep up the good work Tim. Thanks.

For your DM you would want to have it set to destroy based on the parameters and look you want. For instance, if you want it to destroy like a concrete pillar or a piece of wood you would assign values for it to have a destruction limit for it’s damage cap.

Next you would want to assign your weapons to have different values for their destruction capability. For instance, the difference between a rocket launcher and a machine gun. Then depending on how much damage each of those deals will determine how quickly or how much damage can be applied to the mesh.

ShooterGame is a good test bed for this simply because it is already setup with two very different weapons: The rocket Launcher and the Machine Gun. I used this as my initial testing with destructible meshes since the two weapons would treat the DM differently. I created a simple wall that had two layers of destruction depth to it. There was depth 0 for no destruction, Depth 1 was a slice that would chunk away tiles on the front of it, and Depth 2 was smaller tiles from the larger sliced chunks.

Using PhsyX Labs you should be able to knock out something simple enough to test and see what values work for you as a test.

You can get PhysX Labs over at Developer.Nvidia.Com

From my understanding in talking with some of the developers is that unless you’re using a crazy amount of destruction you won’t see that big of a gain in your game with destruction on the GPU. , I can’t fully verify that since I’m not a programmer and can’t use a version of the engine for testing something like that. :confused:

However, you can fake the effect fairly well these days for the most benefit. This is something I want to set up in my personal time, but have yet to get around to it yet.

If we look at a concrete barrier. We can set the destruction mesh that when chunks are hit and destroyed they disappear and are then replaced with a Mesh Particle effect that would scatter debris. To This gives you much greater control and you can get a better effect in my opinion.

This is possible, but honestly I wouldn’t know where to begin to set things like that up with system configurations and scales that use lower LOD meshes based on system settings. Hopefully, someone with more experience in that are can provide some insight.

Tim

Tim, I just paid the rent for 4.5.1. Did you get the changes into DM that makes PhysX/Apex work?

Are you referring specifically to “Support Chunks”? If so, those are not working in 4.5.1. They will be working in 4.6 which you can get the preview version of from the launcher with that feature working.

Yes, the “Support Chunks”. I don’t see the preview version in the launcher.

Tim, the preview just came up in the launcher. Downloading.

Great! Give it a shot and if you need help setting it up let me know and I’ll post my settings.

Tim

Tim, very strange. Created a static mesh in 4.6. Then tried to do a DM. Don’t see the it. Where is it?

Tim, found DM in 4.6. Playing.

I’m glad! :slight_smile:

Let me know if you have any hitches and I’ll see if I can help you sort them out.

Tim

Tim, I have 4.6 installed. The DM looks a little different. Have you tried it? I created a DM with 200 chunks. When I shoot with FPS it is not damaged. The projectile passes through the DM. Damage settings are little different. Need some help. I used the same settings that I used with 4.5.1.

Yeah, I’ve toyed around with it plenty. :slight_smile:

I’ve not noticed anything different than I’ve previously had. I have a test project that I’ve upgraded with each version of the engine. I have two types of projectile. I have a line trace projectile that applies a radial damage at the hit location of the line trace and then I have the yellow ball projectile from the first person project. I can switch between the two for easy testing of both types. :wink:

Can you post a screenshot of your settings you’re currently using for the DM and I’ll set up a test asset to see where the hiccup is happening.

Tim

Tim, I am using the standard settings when the DM comes up. Could you put the project(4.6) that you created and I could try it in my 4.6?

You can grab a test project here made with 4.6 preview: https://www.dropbox.com/s/0am6hatukhldtj9/FPS_DM_Test.zip?dl=0

DM_Test.PNG

Some details about this example project.

I’ve setup two methods of projectile that I use to test:

  • The first is the Line Trace that applies a radial damage at the hit location using the left mouse button to fire.
  • The second is the yellow ball projectile included with the FPS template that can be fired by using the right mouse button.

I’ve listed the settings changed to make the yellow ball projectile collide with a DM and destroy it.

The settings for the YB projectile destructible mesh also uses different settings than the default setup. That’s because we have to enable it to take impact damage that is created on overlap from the YB projectile.

This example should give you all you need to setup and get them working together. I also setup two variations that should help as well. One is a cube using support chunks where the four vertical edges cannot be destroyed. The second is a one where you can shoot and it will chunk away bits of it rather than fracture the entire mesh.

Tim

Tim, great stuff. The first cube how did you get the vertical chunks to stay. Did you use the chunks section in the DM? I don’t see anything set. A lot variables.

Glad you like it. :slight_smile:

To get Support Chunks working you’ll want to fracture the mesh then use the slider to separate the chunks a little so they are easier to select. Hold Control and select the ones you want to be support chunks that cannot be damaged. When they are selected they will have a blue box around them. Once you’ve selected the chunks you want to not damage go to the tab in the right side labeled “Chunk Parameters” and there you will need to select the top most option. Then choose the ones below that you want to apply.

In the demo I just selected them all, but if you just want them to not be damaged at all select that option and they will stay in place undamaged like the box with the vertical chunks in my demo project.

Tim