Download

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

Useful and nice tutorials.
Thanks you Tim.

Jump pads! I love jump pads :smiley:

Those look like a lot of fun BrUnO! A lot more fun than my simple setup. :smiley:

Lovely collection! Definitely some gems here for my side projects :slight_smile:

**Other How-To 2: Creating (Mostly) and Importing a APEX Cloth asset created with 3Ds Max and PhysX DCC Plugin
**
Requirements using this method: 3Ds Max/Maya and PhysX DCC Plugin

If you need the PhysX DCC plugin you can sign up at Nvidia.com. This page will help get you started: http://www.nvidia.com/object/physx_dcc_plugins.html

Overview:

This will be a short tutorial to quickly cover creating a simple cloth asset and importing it into the Unreal Engine 4. There have been similar tutorials already, but mostly wanted to cover a written tutorial for this. The video is just an added bonus as I had made it while troubleshooting the process for an AnswerHub post.

FBX and APB Files: Dropbox - Error

Video: This will not cover much other than a run through of the process.

Step 1: Create a plane with a lot of verts (within reason) and convert to Edit Poly

3eb7ce70d0e2a93da42f1c69ea84de08947fd2b3.png

Pretty straight forward. Create a plane and add some verts to it. I just used an arbitrary size and set the length and width segments to 24 for this demonstration.

Step 2: Apply a material to the plane (Important!)

901bcd62e8a6c7d78d4fccdfa89b6a8b2c96f8ef.png

This, at least to me, is a very important step that confused me quite a bit when I first started using cloth. If you do not apply a default material to your mesh and use the one that is on the mesh when you created it there will be no material assigned to the cloth asset when you import it into UE4.

So make sure to add a default material otherwise you’ll not have a material to be able to assign the cloth apb file to your mesh later when imported into UE4.

Step 3: Create a bone

175635247692aae8d7998ad90afa7d07f0930aa5.png

Create a bone that we can use in the next step to “skin” to our mesh.

Step 4: Add a Skin Modifier to your Plane

Add a skin modifier via the drop down modifier list to your cloth plane.

766f251533989c593ef693cecefd17f1cd8d1cb3.png

Once the modifier is selected locate the Bones: “Add” button and click this. This will bring up a small window where you can select the bones in the scene to skin your mesh to.

a332d64a4791afd5c5e55e62d9dd1764cac4d61e.png

Step 5: Add the PhysX cloth modifier via the PhysX toolbar

Next you’ll need to add the cloth modifier from the PhysX DCC Plugin toolbar

ad7654ee8e8dc52f88f78b2c925b5c18c5149533.png

Once this has been added you will see it populate in your modifier stack along with its settings when selected.

06b5362ab56b426983992d3b62f4bebb101b4911.png

Step 6: Paint weight accordingly for your cloth and test with the simulation

Under the settings locate “Paint” and set a value for the Brush Value.

I will use 200 for mine. The default is 0 which effectively means there will be no cloth simulation for any areas painted with a 0 weight.

7df5346fef3d78f701aca69dc3f41bd1c079de03.png

Select the brush to paint the weighting.

f0f63ef6f3931dd354f211f3af4e5aa7e456a2d6.png

As you paint you will see red trace lines that come out. This is the 200 cm value that we used. If you use higher or lower values this will be longer or shorter. 0 will have no trace lines.

230f19611f450d83db2073da6668b1863c31aa90.png

Step 7: Test your assets simulation

Select the play button here to see your cloth simulation.

e2c77be0f7e9d6441dac8023b0806e6d66550c2b.png

If you want to see wind simulation to see a more practical use of your cloth in the settings locate the Wind section and use these settings before hitting play.

Adjust according to your needs.

9e78858313847b87a4be08b7e533dc86b7775d59.png

Simulation result:

66c0c249c00ee67fcaaa8e5b3b9f481f0b2a9e22.png

Step 8: Select the Cloth and Bone to export selected as and FBX

Select the bone and the cloth plane. Then go to File > Export > Export Selected > Choose a name for your file > Change File Type to FBX > Click Save

**Step 9: Export the scene (not just selected) with the file type PhysX and APEX
**

Same as above with exception that we will just export the scene this time and not just the selected object.

File > Export > Change file type to “PhysX and APEX” > Click Save

795237294ee0e3db2bdce33a97ab785f1f43b85a.png

After you click save a new window will pop up. Use these settings:

4e4de1a7e13fad1a16f5d7bbf155f1ddf62d5688.png

Step 10: Open UE4

Self explanatory. :smiley:

Step 11: Import the FBX we just created for our Cloth plane

Locate your FBX that was first exported with just your Cloth plane and bone and import this into UE4.

Use these settings:
2698deebca286f9bc09a62f218a6a18e5e5d5718.png

Once that is imported locate the cloth skeletal mesh and open the asset.

Once this is opened verify that you do have your material slot. If not, you’ll need to go back to Max/Maya and add a default material.

ca45c926897060ef70bfc5ac4bf18025ddb345c0.jpeg

Step 12: Open the our Cloth plane skeletal mesh to apply the cloth apb file we exported last

Now we’ll click the the option to “Add APEX clothing file…” and navigate to where we saved our APB file we created.

2349883a1d6c0d7803b756981f42dc6305265245.png

After importing the apb file you’ll be able to assign this to the material via a drop down.

You will also notice that you can adjust various settings for your apb file to control how the cloth reacts. These are all settings that can be setup via the PhysX DCC Plugin as well.

Wiki Tutorial 1: Lighting Troubleshooting and Tips Guide

This one is still very much a Work-In-Progress as Eric and I work to get some simple troubleshooting and tips up for everyone. We’ve wanted to do this for a long time and have gotten a little bit of a push to make this available for those having issues.

The majority of these will be simple steps with a little bit of explanation for the “why” of it all.

Over the next couple of weeks Eric and I will be updating this regularly as we knock some of these out.

If you see anything missing or something you want covered please let me know and I’ll add it to our list.

**Here is what has been added so far: **

General Lighting Tips:

Movable (Dynamic) Lighting Tips

  1. Directional Light ONLY: Cascaded Shadow Map Settings
  2. Adjusting Cascades for better Quality
  3. All Dynamic Light Types (Light Tab Settings)

**Static Lighting Tips: **


Planned:

These are done just not up yet.

In the works.

Hi Tim, the link of the project
Gregdumb’s wiki tutorial for Day Night system (with some tweaks)

Redirect you to a dropbox file DayNightProject1.zip of 1,16 KB. I downloaded and it only has 2 .ini

Thx for sharing this tutorials !!! :slight_smile:

You’re totally right on that. I’ve fixed it now.

Thanks for letting me know. :slight_smile:

Hey Tim -

The Split Screen tutorial images are not showing would you mind fixing them? :slight_smile:

It’s fixed now. Thanks for point it out! :slight_smile:

Hey thanks for that :slight_smile:

Stay Epic Tim!

Thank you very much for all the tutorials and project files.

Plenty more coming in time. Just finding the time to do it all can be troublesome. I’m really wanting to setup a lot of stuff that has been on my bucket list to learn and experiment with since I started at Epic last April. A lot of focus lately has been on the Wiki lighting troubleshooting guide with Eric though. I’ve got so many destructibles Tips, tricks, and setups I want to do just to help people out with them. That may become a wiki as well. We’ll see what happens. :wink:

Other How-To #3: Creating Level of Detail (LOD) Meshes in 3Ds Max for UE4

**This is specifically for 3Ds Max and may be similar in other Autodesk or modeling applications. **

**Overview: **

This short tutorial will go over the process of creating and exporting LODs with 3Ds Max to UE4.

Step 1: Base Mesh and LODs

In this example I’ve chosen to use the statue mesh found in the Mobile Sun Temple demo from the Marketplace.

This is my base Mesh showing the shaded model alongside the wireframe mesh.

Often times this much details isn’t always necessary for a mesh as you move further away from it. There is a lot of detail here that will not be perceptible from further distances. By reducing the polygon count we can create a lower Level of Detail (LOD) version that is not noticeable.

In the next steps the mesh will be depreciated for lower LODs that we can use to optimize our games.

Step 2: Creating Lower LODs

With UE4’s LOD system you can use up to 4 LODs.

LOD 0 is our Base mesh with all the awesome detail! LOD 1-3 will be our lower polygon versions.

First we create our copies:

Top is the Wireframe with Bottom being the shaded model.

Before starting the first LOD there are two options that are available inside 3Ds Max to depreciate the mesh.

There is the option of ProOptimizer and Multires Modifiers.

Both are good in their own right and each has it’s own method of depreciating the model, but with one exception. ProOptimizer does it in a destructive way compared to MultRes.

Here is an example. The mesh in this scene has already had it’s UVs completed, but now just needs a lower LOD. ProOptimizer will destroy the UVs in doing so whereas MultiRes will honor them.

Make your choice based on your needs as they are similar in how they do the tasks for actually depreciating.

Moving on…

Select the mesh you want to use and in the modifier stack add the modifier you’ve chosen.

For this example I’ve chosen the MultiRes Modifier.

7beb42064893ecfb711bcc6b11f9b3b8897c76fe.png

This is fairly straight forward for this part.

Click Generate at the bottom. This will map the mesh so that the polygon count can be reduced.

The options at the top for Vert Percent are now editable. You can also use the Vert Count option if you have stricter limitations or an OCDness that requires even numbers. :wink:

For the three lower LODs I’ll set them up as follows:

LOD 0 (Base) - 4479 verts - No Change
LOD 1 - 2240 verts - 50% of original
LOD 2 - 1120 verts - 25% of original
LOD 3 - 672 verts - 15% of orginal

Final Result after setting up LODs:

Step 3: Grouping the LODs for use in UE4

The next part requires the meshes to be “Grouped” so that they can be used as single LOD.

Select all your meshes and center them up to each other. In Max you can select all the meshes and set the XYZ Locations as the World Origin or use the Align tool from the toolbar.

With your Meshes all aligned use the menu bar and select Group > Group

Next give the group a name

10891179d0c6ed106514fadcb4a4f3dab40b3a7a.png

Step 4: Level of Detail Utility in 3Ds Max

In this next step make sure the mesh is selected and then go to the Hammer Icon and select that in the Command Panel

c90f38fb0bc21df70017f35ce31c2a1908f8287a.png

Next select “More”

7_More.png

Select “Level of Detail”

f6c4732fca56f8463e2109ac05af321f25cac878.png

Click “Create New Set”

39835bc7b3112819f708fdbfe5548228b512244f.png

The LODs should populate the window in the lower area now.

At this point the mesh is ready for export to FBX.

When exporting the FBX make sure to remember to check export Animations otherwise your LODs will not work.

Step 5: Importing into UE4

Once the mesh has been exported to FBX it now just needs to be imported into UE4.

Make sure to select the option for “Import LODs” like so:

Once imported open the mesh in the Mesh Editor.

On the right side there will be a listing of all available LODs.

To see individual LODs use the drop down to select a LOD.

LOD0

LOD1
UE41.png

LOD2
ec24a7e5c3bcc25d207ec9d61fdc6a8589566ff7.png

LOD3
351af3388dbdd656f0da80e34c9fd87cacccd7a8.png

Updated Day/Night project for smoother transition to day and night using timeline for the light and skylight intensities.

Is that all i need when i want to offer a coop feature for my game (using ThridPerson setup)??

Honestly, not completely sure. I’ve not messed with multiplayer beyond just getting the single screen multiple players set.

Since it’s using the same screen I wouldn’t think there would be a need for replication since you’re not using a server or anything over a network. As far as I’m aware this should be fine for co-op single screen kinds of games.

My suggestion would be to setup a simple test level with some events, traps, or other goals and see what you get.

Man that is an awesome tutorial on LODs. Little details like that to make games way more optimized.

Now if I take my meshes and make them LOD like this, will I have to redo all their placements on the map? Also do LOD’s apply to foilage such as rocks/trees?

Glad it works for you! :slight_smile:

There will be no need to do re-do their placement. If you have your base mesh already placed all you need to do is create the LODs and you can just reimport the original mesh with the newly added LODs or individually import the LODs in the static mesh editor.

If you have any trouble feel free to ask.

Other How-To #3: Light Functions with Color

**Overview: **

Light functions do not provide color when a light function material is plugged in. This does not mean that you cannot get a colored image by taking advantage of the system though.

All that is needed is to setup a material for each color value for Red, Green, and Blue. With the texture sample you’ll plug the single color value into the **Emissive **pin. Also, in the **Material Editor **the **Material Domain **will need to be set to Light Function.

NOTE: This can probably be done with a single material and using an instance to switch on or off the various color values or some other method. I’ve just not looked. If I pursue that method at any point I’ll update here.

You should end up with something like this for the Red, Green, and Blue materials.

Material Setup

ff8cc566746a8a9bb9087c0142dc361e5a232979.png

Light Functions in Action

Scene Setup: These are all Spotlights with an assigned Light Function Material that corresponds to the color value we will assign it.

Top Row: This is three spot lights each with the either the Red, Green, or Blue material assigned. The light color has been changed to the full value for that color using the Color Picker to set the RGB Value. (ie. Red would be set to R=1, G=0, and B=0)

Middle: The three Spotlights with the assigned light functions overlaid onto each other.

Bottom: The three Spotlights with their Light Function Material assigned with the light’s color value left at default of White.