Plowman | 3D Game Design with Unreal Engine 4 and Blender | E-Book | www.sack.de
E-Book

E-Book, Englisch, 252 Seiten

Plowman 3D Game Design with Unreal Engine 4 and Blender

Combine the powerful UE4 with Blender to create visually appealing and comprehensive game environments
1. Auflage 2024
ISBN: 978-1-78588-661-4
Verlag: De Gruyter
Format: PDF
Kopierschutz: Adobe DRM (»Systemvoraussetzungen)

Combine the powerful UE4 with Blender to create visually appealing and comprehensive game environments

E-Book, Englisch, 252 Seiten

ISBN: 978-1-78588-661-4
Verlag: De Gruyter
Format: PDF
Kopierschutz: Adobe DRM (»Systemvoraussetzungen)



Unreal Engine 4 now has support for Blender, which was not available in earlier versions. This has opened up new possibilities and that is where this book comes in. This is the first book in the market combining these two powerful game and graphic engines. Readers will build an amazing high-level game environment with UE4 and will show them how to use the power of Blender 3D to create stunning animations and 3D effects for their game. This book will start with creating levels, 3D assets for the game, game progression, light and environment control, animation, and so on. Then it will teach readers to add amazing visual effects to their game by applying rendering, lighting, rigging, and compositing techniques in Blender. Finally, readers will learn how to smoothly transfer blender files to UE4 and animate the game assets. Each chapter will add complexities to the game environment.

Plowman 3D Game Design with Unreal Engine 4 and Blender jetzt bestellen!

Autoren/Hrsg.


Weitere Infos & Material


Table of Contents - Unreal, my friend, I'd like you to meet Blender
- Starting our first project
- It's time to customize
- Getting the assets to the level
- Taking this level up a notch
- Monster Assets: The level totally needs one of these
- Let's dress to impress
- Lights, Camera, Animation!
- Bang Bang: Let's make it explode!


Adding interactive elements using Triggers and Blueprints


Right now, our game level is looking pretty good. We have given it some props that make the player feel they are wandering around the insides of a small cargo ship. Using lights, we have communicated to the player a sense of danger and mystery. The final step in finishing this level will be to add some basic interactive elements. For that we are going to need a Blueprint.

A Blueprint is a visual scripting engine built into the Unreal game engine that allows artists and other non-programmers to program game mechanics and level events without ever looking at a line of code. I have also found during my years of teaching that it is a great way to introduce yourself to programming techniques, as a Blueprint uses many of the same terms. For our purposes, we will use Blueprints to animate our two doors and our elevator so that our player has some interactive elements to play with:

All Blueprints have an Event to kick them off, followed by one or more Actions

Most of the basic programming that we will use as a level designer follows the same basic pattern: an Event causes a number of Actions to occur. For example, to cause a door to open, the event might be that the player walks up to the door, and the actions would be to animate the door to the open position and then close it after a few seconds. As we build our Blueprint sequences, we will also learn about variables and data types. Let's get started with our door sequence:

  1. First we need a Trigger. This is a game object that is used to detect if other objects, such as the player, have entered an area. They come in a few different shapes, and the size can be adjusted for almost any situation. Here, we will grab a Box Trigger from our Modes panel and place it at the base of our door. This will cause the event that plays our animation:

    Opening up the Level Blueprint using the Blueprints menu

  2. Now it's time to begin our sequence. Open the Level Blueprint by clicking on the Blueprints button and selecting Open Level Blueprint. Navigating the Blueprint area is done by holding the , dragging in a direction, and using the button to select things:

    Creating the first Event

  3. Go back to the level and make sure your Trigger is selected. Now, in the Blueprint window, right-click in the empty space and click the down arrow next to Add Event for Trigger Box 1 (your number may be different). Click the down arrow next to Collision and select Add On Actor Begin Overlap. This event will fire when an Actor (our player) begins to overlap with the Trigger.
  4. Next we need a Timeline. This is a node that allows you to animate a numeric datatype, such as a float or a vector. In our case, we will use it to animate the vector position of our door to make it seem like it's sliding. Right-click in the space next to your event and go down to the very bottom of the list. Select Add Timeline. You will be given the opportunity to give it a unique name. I named mine , which is not very descriptive, but it differentiates it from any other Timeline we will create:

    Creating the Timeline animation curve

  5. Open up the Timeline by double-clicking on the node. Since we are animating a vector (a point in 3D space), we need to click the V+ button located in the top left of the Timeline window. You will see three colored lines, which represent the X, Y, and Z axes. What we are going to do is create key frames that correspond to the important positions of a door: open, and closed. Before we add a keyframe though, we need to make sure we are working just in the X axis, since that is the direction we will be sliding our door. We do this with the little padlock beside the Y and Z in the upper left of our graph. You may also want to hide the axes by clicking the eye next to them as well.
  6. Near 0, add a key by right-clicking and selecting Add Key to X axis. If you were not exactly on zero, feel free to click the keyframe and change Time and Value to zero. Next, add another key at 2 seconds and change its value to . We are telling the door to slide 100 units in the positive X axis direction. Lastly, we can make the sliding more realistic by right-clicking on the first key and setting Key Interpolation to . You can view your handiwork by clicking the Fit Horizontal and Fit Vertical arrows (near the padlocks) to see the full curve:

    Blueprint that animates our door

  7. Head back to the Event Graph by clicking its tab. Now we need to take advantage of our animated value by making our door move. The node we are looking for here is called Set Actor Location. Right-click near the Timeline and type this in the Search box. You can also use the Find a Node library if you have enabled your Palette in the Windows menu. Set Actor Location requires two pieces of information to work: the Target (what is moving) and the new location. Now, you might be tempted to connect the yellow output of our Timeline right to the new location, but it won't necessarily work. We need to take into account the existing location of the door and add in our slide. For that we need to get the location of our door. Click the door in the level and right-click in our Blueprint. In the search box, type in . We also need to get a node call Vector + Vector to do our math for us. Connect all the nodes together, just like you see in the previous picture, by left-clicking and holding on an output (such as a colored dot or an arrow), then dragging out a "wire" and plugging into the next node's input. Don't worry too much about this part; Unreal does not allow you to plug a node into another node that doesn't accept that input.
  8. Now, our Get and Set nodes are still missing something. Neither node has a target, so they don't know which object to reference. For that, we need a Name variable. This is just a reference to something present in the level. In the level, click on the door we want to animate. Now in the Blueprint, right-click next to our Set Actor Location node and select Create a Reference to SM_Door2 (again, your number may be different). Now, plug that variable into the target of our node. Repeat this process to create a name variable for our Get Actor Location node.
  9. The last part of the process is to go back into the level, click on the door, and select Movable in the Transform section of the Details panel. This will allow your door to animate. Now build the level and test it out.
  10. Everything working? Great! Make sure to follow the process again for the second door at the other end of the hallway.

Now that we have moving doors, we are going to do the same thing to our elevator, only this time we will use a slightly different process. Matinee is a powerful tool that allows animators and game designers to create high quality animations inside Unreal. We are going to use this tool to animate our elevator:

  1. Creating a Matinee is a bit different from creating a Timeline. To start a Matinee, click on the Matinee button and select Add Matinee. Unreal will give you a warning that Undo/Redo data will reset. Go ahead and click Continue and this will create a Matinee object in your level. Don't worry about its location, this thing works from anywhere. Click on the object and select Open Matinee over in the Details panel. The following screenshot shows the Matinee tool:

    Using the Matinee tool

  2. Back in the level, click on our elevator platform and make sure it is set to Movable in the Details panel. Now click back in...


Plowman Jessica :

Jessica Plowman is a game designer and educator who currently resides in the United States. At an early age, she discovered her love for video games and the joy they bring to others. She began teaching students about game development in 2005 and enjoys supporting the dreams of the next generation of developers. She has worked with Unreal technology for over 10 years, and currently teaches students game technology and game design in Sarasota, Florida. When not teaching, she consults on different topics related to Unreal technology and continues to further her education by researching best practices related to both teaching and game development.



Ihre Fragen, Wünsche oder Anmerkungen
Vorname*
Nachname*
Ihre E-Mail-Adresse*
Kundennr.
Ihre Nachricht*
Lediglich mit * gekennzeichnete Felder sind Pflichtfelder.
Wenn Sie die im Kontaktformular eingegebenen Daten durch Klick auf den nachfolgenden Button übersenden, erklären Sie sich damit einverstanden, dass wir Ihr Angaben für die Beantwortung Ihrer Anfrage verwenden. Selbstverständlich werden Ihre Daten vertraulich behandelt und nicht an Dritte weitergegeben. Sie können der Verwendung Ihrer Daten jederzeit widersprechen. Das Datenhandling bei Sack Fachmedien erklären wir Ihnen in unserer Datenschutzerklärung.