Download

[TUTORIALS] Photons Be Free: Mini-tutorials and other curiosities

Hello Everyone!

I’ve been wanting to do this for sometime and just now getting around to organizing and getting some mini projects and things together. Instead of just posting a bunch of random threads with a bunch of scattered bits of information and tutorials I’d rather have them as one cohesive growing piece. Plus, it’s such a chore to keep track of so many different threads! :slight_smile:

As many of you know, I typically answer a lot of questions regarding APEX Destruction. A lot of these mini-tutorials, projects, and nuggets of information I post here will gear more towards that side of things.

I’ll try and keep this as organized as possible and will update as often as I can.

Feel free to throw suggestions my way. I make no promises and keep in mind that I’m not a master of all! I have my own specialties so asking me to show you how to make an advanced cover system, animation, or complex blueprint functionality probably won’t get you that far. :wink:

Useful Free Software:

  1. Path Length Checker : Good program for checking the file path length for your project if you’re running into the 165 character length issue that causes a build to fail. NEW

Personal Website: http://timhobsonue4.snappages.com/

**Projects: **

  1. Colored Translucent Shadows (4.5 or later required)
  2. Sample with Line Trace and Physics Projectile for Destructibles (4.6 or later required)
  3. Destructibles Chunk Paremeters Comparison Testing (4.6 or later required)
  4. Simple Jump Pad Blueprint (4.4.3 or later required)
  5. Night Vision Post Process Material(4.4.3 or later required)
  6. Radar Pulse Post Process (4.4.3 or later required)
  7. Gregdumb’s wiki tutorial for Day Night system (with some tweaks) (4.7 or later required)(UPDATED: 3.9.15)
  8. Level switch for Day/Night levels using same space with baked lighting (4.5 or later required)
  9. Simple BacklightingNEW
  10. Sponza Attrium Test Scene (At some point in the future)
  11. Destructible Settings ShowcaseNEW

Occlusion Culling

  1. Precomputed Visibility Culling (Ideal for mobile)

Distance Field How-To’s:

  1. How to Enable Mesh Distance Fields for your project.
  2. How to use Distance Field Ambient Occlusion
  3. How to use Distance Field Soft Shadows
  4. How to use Distance Fields for Particle Collision
  5. How to use Distance Field Global Illumination

Destructible How-To’s:

  1. How to use Import FBX Chunks (Destruction without the fracture tool in UE4)
  2. Rigid Mesh Animation without need for bones
  3. How to use Large Chunk Threshold (Project included requires 4.6 or later)
  4. More FBX Chunks Examples: Barrel and Fence (At some point)
  5. Using “Do Not Fracture” to make a hole in a wall
  6. Using “Impact Resistance” for better damage effects (ie. glass vs. concrete wall)
  7. The power of using World Support
  8. Damage Spread

Other How-To’s:

  1. Setting up Local Multiplayer
  2. Setting up and using Cloth with the PhysX DCC Plugin with 3Ds Max
  3. Creating Level of Detail (LOD) meshes in 3Ds Max for UE4
  4. Light Functions with Color
  5. Custom Collision Demonstration - Beginning to End
  6. Blueprint Clock:a. Basic Clock Movement
    b. Set Clock to Random Time when starting rotation
    c. Set a Specific Time when starting rotation
    d. Set to use System Time using Overlap Events
    e. Set Time based on Sun Rotation (ie. Using a Time of Day System)
    Preview: Dropbox - Error

**Ideas for How-To’s or test projects:
**1. Distance Fields Soft Shadows (General use and trouble shooting type stuff, mostly things Daniel Mentioned from this twitch stream, but with project and examples)
2.
3.
4.

Wiki Tutorials/Troubleshooting/Tips

  1. Lighting Troubleshooting and Tips Guide
  2. Swarm Agent Troubleshooting and Tips Guide
  3. Destructible Troubleshooting and Tips Guide
  4. FBX/Asset (On hold)
  5. Materials
  6. Post Process

Curiosities

  1. Fun with Moire Effect (At some point)

Training Twitch Streams (Not affiliated with Epic Games)

  1. Destructibles Overview and Q&A
  2. Occlusion Culling and General Lighting Review with Q&A

Future Streams

  1. Distance Fields (Shadows, AO, GI)
  2. Physics (non-vehicle oriented)
  3. Rendering: Occlusion Culling
  4. Global Illumination (Dynamic: DFGI and LPV & Lightmass)

Destructible How to #1: Effectively using “Import FBX Chunks” for Destructible Meshes

In this setup I’ll be using a parking meter as an example.

b6b63e1670e13e629a2a70ec06439fd5775ec545.png

UPDATED VIDEO: 3/30/15

This such a great feature that really gets overlooked when thinking about destruction meshes. Often you think destruction and things have to fly apart or break free from other pieces. However, this is not always the case. If you’ve ever played any GTA game you’ve seen this method used very often, especially in the city.

The goal here is when enough damage is taken by our destruction mesh it will destroy (swap the meshes) and trigger a particle system for added effect.

FBX MESHES DOWNLOAD

Here are the settings that were used in the DM:

Enable Impact Damage: True
Impact damage: 1.0
Default Impact Damage Depth: 1
World Support: True
Support Depth: 1

Impact Velocity Threshold: 750

By setting the impact velocity threshold higher or lower you can determine how fast something needs to be traveling to cause damage. Anything below that will not affect the DM.

Also, note that this is one particular setup and can be used in many various ways. :slight_smile:

Project 1: Colored Translucent Shadows

Wiki Tutorial: https://wiki.unrealengine.com/Colored_Shadows
Official How-To Docs Page: https://docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/HowTo/ColoredTransluscentShadows/index.html

Project Download Link

Stock image from UE3 documentation

Stained_Glass.png

Results in UE4

Colored_Shadow.png

Project 2: Line Trace and Physics Projectiles for Destructibles

Forum Thread: https://forums.unrealengine.com/showthread.php?52865-Sample-Project-to-destroy-Destructible-Mesh-with-Line-Trace-and-Ball-projectile

Project Download Link

Overview:

This sample is a setup that has two types of projectiles included.

LMB will fire the line trace weapon that applies a radial damage on hit location
RMB will fire the ball projectile

The two setups in the image are the default settings used for a destruction mesh. The one on the right is setup to take impact damage from the ball projectile mesh.

&d=1417023185

Really cool effects, looking forward to any future tutorials you may put out as well, thanks!

I did momentarily expect a holo-novel exploring the life of an emergency medical hologram, however.

It’s on my bucket list of projects. :wink:

I’ve got the “exit” started and I really want to do something cool with some LCARs using media textures for the display panels!

Exit.png

I’ll probably get around to finishing that over the next couple of months. Just a little busy right now with other things going on though.

Great guides! Thank-you :slight_smile:

Thanks Tim. That “Import FBX Chunk” guide was really helpful! :slight_smile:

**Project 3: Destructibles Chunk Parameters Testing **

Overview:

This project was a testing comparison between the chunk parameter settings for destructibles in comparison with a DM that was not fully setup, PhysXLabs created, and in-editor created.

DM_ChunkParemetersTest.PNG

Project Download Link

LMB - Rifle line trace weapon
RMB - explosion line trace weapon

**Project 4: Jump Pad Blueprint
**

Overview:

This was a test I originally did with setting up a Jump Pad. To be honest, I’ve not used or set one up since. There may be better ways of doing it but this is my initial testing with it. :slight_smile:

JumpPadTest.PNG

Project Download Link

Project: Night Vision Post Process

Overview:

Started this test with this post: https://forums.unrealengine.com/showthread.php?26829-Porting-Night-Vision-PP-Effect-from-UDK

The user took it much further than what I did, but this was the starting point if anyone is interested. Gibdion’s results were much better than my initial attempt. Both my material and his can be found in the link above.

There are two maps. The default map and NVTest.

NightVisionTest.PNG

**This may not be worth the download as it’s got the starter content as well which bulks it up. Some of them are used but would be a chore to just remove it all or redo the project. You’ve been warned! :slight_smile:

Project download Link

Thank you ^^

**Project 6: Radar Pulse Post Process **

Overview: Used mAlkAv!An’s setup from this thread: https://forums.unrealengine.com/showthread.php?51685-Radar-Sonar-Pulse-Post-Processing-Material&highlight=sonar

https://youtube.com/watch?v=tpSiJgOPWYw

Project Download Link

Project 7: Day Night system project

Overview: Project was looking at setting up the day night system while being able to use a skylight. Everything from the tutorial is intact just added a skylight to the scene and adjusted the intensity of that when the custom event is fired. Could go back and use a timeline for the transitions to not make them feel so abrupt as well. Just a thought. :slight_smile:

Gregdumb’s Wiki Tutorial: https://wiki.unrealengine.com/Tutorial:_Time_of_Day

7c129881724bc4b8afca205bc2e967b1b6aa4fdd.jpeg

Project Download Link

Updated the project here on 3.9.15

While helping someone on AnswerHub I’ve updated the project here to use a Timeline for a smoother transition from day to night with the Light Intensity along with the Sky Light.

In Total there are 4 new timelines added to the events that trigger the light source and the sky light to lower and raise their intensity.

Before:

[video]https://www.dropbox.com/s/i3vb37eatex8ftj/Old_DayNight.mp4?dl=0[/video]

Updated:

Other How-To 1: Setting up Local Screen Multiplayer

Wasn’t aware of how to set this up originally, so thought it’d be a fun quick tip for those who don’t know! :slight_smile:

This is just “how to get started.” I didn’t use the other screen or multiple controllers here.

In your Level Blueprint add a “Create Player” Node.

d8395f15dbddf2654b872f79038a0be2ee132778.png

Add up to four of these for split-screen. You’ll need to specify a controller ID for each though. Using the same ID will ignore this node.

If you want to adjust the Horizontal/Vertical nature of the layout go to the Project Settings > Maps & Modes > Local Multiplayer

f976c7d8c977d301141f9c04809eb0681e3aca7e.png

Final Result for three-player horizontal split-screen:

MultiplayerSplitscreen1.png

Rigid mesh Animation using bake Destruction simulation

Destructible’s How-To 2: Rigid Mesh Animation (No Bones Required!)

Thanks to Osman for his help in getting this working originally for me! :smiley:

**Overview: **

While this tutorial is meant to show phyiscs simulations that baked to an animation timeline you can use this for other animations that are not physics or destruction oriented.

In this tutorial we will take a physics simulation created in Max (sub in your own modeling software if need be) and baked to the animation timeline and bring that into Unreal Engine 4 without the need to rig, skin, or use any bones for the chunks that are being animated.

This will not cover using PhysX Labs plugin or MassFX to bake the animation to the timeline. This will assume you’ve already gotten to that point and start from there to UE4.
**
Max 2013 file and FBX file assets:
https://www.dropbox.com/s/wq3bqudxg5mamly/DM_Animation_Assets.zip?dl=0

Step 1: Before Exporting the Animation

Animation we’ll export:

DM_Anim_GIF.gif

This is my mesh with the timeline animation:

1165c5784fc40e6d90ea58f1302e6510ff8a015f.png

Once you’ve got your animation setup the way that you would like you’ll need to select all the Fracture chunks or pieces and place them in a group:

You can do this in Max by going to the menu bar > Group > Group > pop-up window > Give your group a name

57ce22f6618cf4395078850d65ff1fd46c09293b.png

After you’ve grouped your pieces we can export.

Select your group and choose Export Selected.

Use these FBX settings, making sure that you include the animation. You can specify the exact frames you want to export if you’d like)

In my animation it is ~200 frames

9d869a7bf016065edfa2a96fb7a7dd713f966ceb.png

Step 2: Importing your Rigid Mesh Animation into UE4

When you import the FBX into UE4 make sure that you’ve selected the option for “Import as Skeletal” for this to work correctly.

Use the following settings:

5329fbf3b4f2a159850a9602a6286e897fc1f3e7.png

Step 3: Using your Rigid Mesh Animation

Place your skeletal mesh in your scene and create a reference to it in your Level BP and pull off a the pin to create a “Play Animation” Node. Select the animation and whether it should loop.

42b91435256a82161e9e15efbe9e30a1f16dcba5.png

Then Play in Editor which should result in this.

This technique was used extensively in the Elemental Demo for the destruction when the Lava is flowing and shattering the rocks.

I hope you’ve enjoyed this and if you have any questions feel free to ask! :slight_smile:

EDIT: Apparently I left my music playlist playing in the background. Enjoy the music courtesy of Star Trek. :slight_smile:

Destructible How-To 3: How to use "Large Chunk Threshold"

LargeChunkThreshold.PNG

Overview:

This video will look at how to use Large Chunk Threshold in your Destructibles component settings in the Details Panel.

**What is Large Chunk Threshold? **

Quite simply this is the minimum size that each chunk must be to be considered a large blocking chunk to prevent the player from passing. Anything that is below this threshold will not block the collision capsule of the player. This is extremely great in circumstances where you want to have destruction with smaller pieces that do not obstruct the player from reaching the goal, which can happen with smaller threshold levels. Test and tweak accordingly to get the best results!

Project Download Link

In this demo here are some of the settings:

DM 1 is set to the default of 25.
DM 2 is set to 75 and only some chunks will block the player and others will allow the player to walk through with no collision
DM 3 is set to 500 which means that none of the chunks are larger than that value so the player can walk through all the chunks.

Keep in mind that this is only for the chunks and does not apply to the DM before the fracture occurs.

Project 8: Day/Night Level Switch with different baked lighting

Day.png 68285e670acf4931a6eb0171f94ae636122e1c31.png

Overview:

A while ago I had an AnswerHub question that asked could there be different lighting baked for levels that occupy the same place. The goal was to have a Day and Night version of the same place. This is possible with some doubling of assets and using level streaming to handle the switch.

With this demo for the question I set up my base level (persistent level) that would handle the Level BP with the level streaming switch. Then I would setup two additional levels. 1 for the Day and 1 for the Night.

Now that I had this in place all that was needed to do was to toggle each maps Visibility via the Levels window and build lighting for each individually. It’s completely possible for each level to have it’s own baked lighting using this method. It’s also key to remember that anything in the Base (Persistent) level will be baked into any level below it. (Ie. if you have a blue light in your persistent and you only want to bake lighting for the day map, the night map will also bake this blue lighting.)

You will see that each map I duplicated everything so that I could have the day setting and the night settings for their respective map. This is a broad example just to show the technique is possible.

Project Download Link

Just press Play to see the results. If you look at the level BP you can disable the event begin play and load in by key press of F for Map 1 and G for Map 2.

Useful and nice tutorials.
Thanks you Tim.

Jump pads! I love jump pads :smiley:

https://www.youtube.com/watch?v=cV5vbbI-deg