GAM 415 Module Five Tutorial Guidelines(NEW)(4)

docx

School

Southern New Hampshire University *

*We aren’t endorsed by this school

Course

415

Subject

Physics

Date

Dec 6, 2023

Type

docx

Pages

13

Uploaded by yasiny714

Report
GAM 415 Module Five Dynamic Materials Overview: For this assignment, you will create a dynamic mud material that will deform as the player hits it. Using a system such as this you could create snow effects (like someone walking through deep snow), or even an offroad mud pit game where 4X4s traverse muddy terrain leaving tire tracks. This tutorial guides you through using dynamic materials, render targets, and how to draw to them at runtime. Upon completion of this activity, you will take a quiz. Prompt: Follow the directions below: 1. Continuing with the paintball-themed project you have been working on in this course, open the Unreal Engine editor. Open Project Settings and navigate to Physics. Then make sure Support UV From Hit Results is enabled. Then restart the editor. 2. In the Unreal editor, create a folder labeled Mud in the content directory and import the Impact_D file to that directory by right clicking and choosing import then select the file.
3. Create a new material by right-clicking in the Mud folder and selecting Material and name it Mud_MAT. Create a second material and name it Impact_MAT. 4. Open Mud_MAT by double-clicking on it. Add the following nodes: (Tessellation allows us to add “geometry” in a sense to our material.) (Be sure to read the notes on each node. You can also select a node and hold Ctrl+Alt for more details.) Select the “Dis” Param2D and make sure to choose “Default_Grid_White_Low” as the texture. (If you can’t find it, enable show engine content in Content Browser view options, then it will show up for you.)
5. Open Impact_MAT by double-clicking on it. Add the following nodes: (This material is set to modulate, so it basically will blend with whatever material it’s drawn over (can influence other materials)).
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
6. Open a new default level and delete the floor. Then navigate to Modes-> Landscape and create a landscape with Number of Components set to 1 X 1.
7. Feel free to give your landscape some shape, once done go into Select mode and select your landscape. Navigate to File -> Export Selected. Give it a name and make sure it is exporting as FBX. 8. Open the content browser and import the exported landscape into your Mud folder. Choose Import All when prompted.
9. Once imported, double click on the imported landscape static mesh in the content browser to open the static mesh editor and in the details panel set the following: 10. Create a new C++ Class of type StaticMeshActor named MudLandscape.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
11. MudLandscape.h:
12. MudLandscape.cpp: Constructor: PostInitializeComponents(): BeginPlay() and renderTargetFunc(): (Note: FLinearColor::White is used to clear the render target when we create it. If we wanted the render target to be full, we would use Black)
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
GroundHit(): 13. Next, navigate to your character.h and add the following bool. 14. Next, inside your character.cpp. Add the following code to your OnFire() event (Note: The existing code goes inside of an if(!toggleFire){ existing code}. The new code goes into if(toggleFire){ New Code Here }. This is so we can still keep the projectile code, just simply toggle the bool true/false depending on what functionality we want.) :
15. Build and go into Unreal Editor. Drag your MudLandscape class into the level and place it at 0,0,0 in the world. Make sure your player start is above the landscape. Go into your FirstPersonCharacter and in the details panel set toggleFire to true.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
16. Now, play your level. When you fire at the ground the impact material should draw where it hits.