Announcement

Collapse
No announcement yet.

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

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Destructible How-To #6: Using "Impact Resistance" for better damage effects (ie. glass vs. concrete wall)

    THIS WILL ONLY WORK WITH 4.8 OR LATER.

    Overview:

    This will cover a basic setup for using Custom Impact Resistance to make a destructible that can provide a low resistance to impact like Glass or one that provides more resistance to an impact, like a Concrete Wall.


    Basic setup for LOW resistance

    Click image for larger version

Name:	CustomImpactResistance_Low.png
Views:	1
Size:	34.4 KB
ID:	1074799

    for the basic setup enable Custom Impact Resistance and set a low value. This can depend on some of the Impact Damage and Damage Spread settings as well, but for a basic example this will get you started.

    Demonstration of LOW resistance




    Basic Setup for HIGH resistance

    Click image for larger version

Name:	CustomImpactResistance_High.png
Views:	1
Size:	21.3 KB
ID:	1074801

    Using High Resistance, the Impact Damage and Damage Spread play bigger roles in the look and feel of your destructible.

    To find a good starting point for the High resistance, try setting a large value and working your way down to a lower one until you get something that looks OK.

    At that point, Adjusting the Impact Damage and the Damage Spread can help refine this even further.

    Demonstration of HIGH resistance

    Last edited by Tim Hobson; 04-20-2015, 05:21 PM.

    Leave a comment:


  • replied
    Destructible How-To #5: Using "Do Not Fracture" to make a hole in the wall

    Overview:

    The Flag for Do Not Fracture allows assigned chunks to not be break away from the destructible even if enough force has been applied to do so. This can be useful for making sure parts of the destructible never break or if you want to have a simple hole that can be blown away in a wall for your character to go through.


    Basic Destructible Settings:

    Click image for larger version

Name:	Basic_Settings.png
Views:	1
Size:	28.7 KB
ID:	1074794

    For this part, the settings focused on are Impact Damage and Support Depth.

    It is not required to use Impact Damage, but can be if you want a impact from any physical objects to impart damage on the destructible.

    Support Depth on the other hand is required to make this work.


    Chunk Parameters: Do Not Fracture

    Depth 0: no fracture applied:
    Click image for larger version

Name:	Depth 0.png
Views:	1
Size:	116.9 KB
ID:	1074795

    Depth 1: slightly exploded view of the fracture chunks:
    Click image for larger version

Name:	Depth_1.png
Views:	1
Size:	205.5 KB
ID:	1074796


    In order to assign the chunks we want to NOT be fracture we need to select them with the mouse. Hold CTRL and LMB to select chunk that you want to assign a flag in Chunk Parameters. When selected you will see a blue bounds box around the chunk.

    Once you have a selected the chunks you want to assign a flag, go to the Chunk Parameters Tab and select Do Not Fracture.

    That's it! You have now set up a basic wall that can have chunks that cannot be fractured.

    Final Results

    Attached Files
    Last edited by Tim Hobson; 04-20-2015, 04:44 PM.

    Leave a comment:


  • replied
    Destructible How-To #4: FBX Chunks Continued - Barrel and Fence

    Coming Shortly.
    Last edited by Tim Hobson; 04-20-2015, 03:14 PM.

    Leave a comment:


  • replied
    Originally posted by Tim Hobson View Post
    Hi Osok,
    Custom Impact Resistance is bugged at the moment with 4.7 and previous version. This was fixed recently and will be included in 4.8 once that releases.
    I am happy to hear it is a bug and not something I was doing incorrectly. I look forward to the fix. Thank you.

    Leave a comment:


  • replied
    Hi Osok,

    Custom Impact Resistance is bugged at the moment with 4.7 and previous version. This was fixed recently and will be included in 4.8 once that releases.

    This is correct that it will do this when impacting.

    With a low value Custom Impact Resistance this will resolve that issue.

    Here is a demonstration video with it set. The first is 4.7 and the second part of the video is 4.8 with CIR working.

    https://www.dropbox.com/s/khw55w0lbx...tance.mp4?dl=0

    The original purpose of the FBX Chunk post was to demonstrate the mesh switch rather than focusing on impact velocity or other settings. Once the CIR has been publicly released and fixed I'll update the video for a better demonstration.


    (comments referencing this post in this thread: https://forums.unrealengine.com/show...l=1#post207604)

    Leave a comment:


  • replied
    Hello Tim,

    I followed your destruction tutorial with the parking meter. I used the same settings as you. My problem is that if I drive a car into the mesh the car stops/bounces off. I tried changing the impact resistance but it didn't seem to have much of an effect. I want the car to be able to plow through the mesh as it is destroyed.

    This works if I turn on simulate physics and start awake off. The only problem is that even a small love tap will destroy the object regardless of the impact velocity setting.

    Leave a comment:


  • replied
    Other How-To #3: Light Functions with Color


    Overview:

    https://docs.unrealengine.com/latest...ons/index.html

    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

    Click image for larger version

Name:	SoniceMaterialSetup.png
Views:	2
Size:	51.7 KB
ID:	1071264


    Light Functions in Action

    Click image for larger version

Name:	SoniceLightFunction.png
Views:	2
Size:	593.9 KB
ID:	1071265

    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.

    Leave a comment:


  • replied
    Glad it works for you!

    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.

    Leave a comment:


  • replied
    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?

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    Originally posted by Tim Hobson View Post
    How-To 1: Setting up Local Screen Multiplayer
    Is that all i need when i want to offer a coop feature for my game (using ThridPerson setup)??

    Leave a comment:


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

    https://forums.unrealengine.com/show...l=1#post209224

    Leave a comment:


  • replied
    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.

    Click image for larger version

Name:	1_BaseMesh.png
Views:	1
Size:	209.1 KB
ID:	1074904

    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:

    Click image for larger version

Name:	2_Copies.png
Views:	1
Size:	347.8 KB
ID:	1066992

    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.

    Click image for larger version

Name:	ModifierComparison.png
Views:	1
Size:	314.3 KB
ID:	1066995

    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.

    Click image for larger version

Name:	MultiResModifier.png
Views:	1
Size:	20.5 KB
ID:	1066996

    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.

    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:

    Click image for larger version

Name:	3_LowerLODs.png
Views:	1
Size:	359.7 KB
ID:	1066997

    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

    Click image for larger version

Name:	4_Group.png
Views:	1
Size:	135.0 KB
ID:	1066998

    Next give the group a name

    Click image for larger version

Name:	5_GroupName.png
Views:	1
Size:	129.3 KB
ID:	1066999


    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

    Click image for larger version

Name:	6_Hammer.png
Views:	1
Size:	10.8 KB
ID:	1067000

    Next select "More"

    Click image for larger version

Name:	7_More.png
Views:	1
Size:	10.8 KB
ID:	1067001

    Select "Level of Detail"

    Click image for larger version

Name:	8_LevelOfDetail.png
Views:	1
Size:	16.7 KB
ID:	1067002

    Click "Create New Set"

    Click image for larger version

Name:	9_LODPanelCreateNew.png
Views:	1
Size:	25.4 KB
ID:	1067003

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

    Click image for larger version

Name:	10_LODs.png
Views:	1
Size:	26.7 KB
ID:	1067004

    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:

    Click image for larger version

Name:	11_UE4IMport.png
Views:	1
Size:	81.7 KB
ID:	1067005

    Once imported open the mesh in the Mesh Editor.

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

    Click image for larger version

Name:	UE4Details.png
Views:	1
Size:	152.5 KB
ID:	1067006

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

    LOD0
    Click image for larger version

Name:	UE4Base.png
Views:	1
Size:	64.0 KB
ID:	1067007

    LOD1
    Click image for larger version

Name:	UE41.png
Views:	1
Size:	62.7 KB
ID:	1067008

    LOD2
    Click image for larger version

Name:	UE42.png
Views:	1
Size:	63.7 KB
ID:	1067009

    LOD3
    Click image for larger version

Name:	UE43_1.png
Views:	1
Size:	73.5 KB
ID:	1074903
    Last edited by Tim Hobson; 04-22-2015, 10:13 AM.

    Leave a comment:


  • replied
    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.

    Leave a comment:


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

    Leave a comment:

Working...
X