Showing posts with label games. Show all posts
Showing posts with label games. Show all posts

Thursday, October 6, 2016

Read Importing and Applying a Decal Texture in UE4 Now

Importing Textures Into UE4

Welcome to this tutorial, today we are going to work on bringing textures into your game. We are going to cover three different types of textures and how they can be imported into your game, along with how to apply them.

Sample Decal Texture


Step 1: Importing a texture


The first thing we need to do is source a texture.

I’m going to use a rust texture made in an earlier tutorial and import that into my game. The first thing we need to do is import the texture into Unreal. To do this open your game. Then in the context browser select the Starter Content folder and in the textures folder we are going to select import.

We click the import button beside new.

The file type for the decal should ideally be a .TGA (Targa File). Once you click import you will be asked to select the file, locate your file and click open, but make sure you select the TARGA file type and not the .PSD file.


Step 2: Creating the decal material

My texture has been imported into the game. Now we need to add a material.

The texture is imported but the star symbol means it is unsaved.

To add the new material scroll down to the bottom of the textures folder and right click in an empty space, from the pop up menu select the material option. Then name your material decal rust. 

Here we can see the blank material that I have created.

If you then double click on the newly made material, it will open the material editor which should look like this.

Our texture is not in the material editor yet, that is why the ball is black. 

Now the problem here is that we have no actual image to create our decal from, so what we need to do is take the imported decal from our content browser on the left and drag it into the grid on our material editor.

The decal  has been brought into the material editor.

The next thing we need to do is connect the decal to the info panel.

Here we connect the detail to the info panel.

Once this is connected click on the info panel. The options on the left will change.
What I've done below is selected the info panel and changed the blend mode from opaque to translucent. This is one step closer to eliminating the background so the decal goes on without a pure white background.

The details on the left hand side have changed.

We connect the bottom most channel on the texture to the opacity option on the info panel.
We also need to change the material from a ‘Surface’ to ‘Deferred Decal’. The result is we now have a decal texture. Hit save at this point.

All I did here was click the black triangle beside surface and select deferred decal.


Step 3: Applying the decal material

Now that we have this done let’s get a surface prepared to apply the decal to.
What I have done in the below picture is I’ve opened the starter content folder and I dragged a copper material from the materials folder directly onto the wall.

Note: the material came from the materials folder, not the textures.

Now that this is done we need to take in a deferred decal from the place section under the visual option scroll down to find deferred decal. Once you drag this into the game this is how it will look.

The material we created with the decal needs to be applied to this.

Now that we have entered the deferred decal we need to actually connect our decal to this decal.
To do this drag the material you created in the textures folder and drag it over to the materials box on the left hand side.

We drag and drop the material into one of the empty boxes and this will apply it.

Now to get this decal to actually work is going to take some manipulation, because of the way the deferred decal is positioned, so with it selected, hit the space bar in order to bring up the rotate widget, then click and drag along the blue and red arcs to the decal to rotate into a position that you are happy with. 

The purple arrow tells us the direction in which the decal is facing.

Now I'm happy with the location but not the scale. So if you hit space again you will get this widget (below) this is used for scaling and I'm going to scale mine till I am happy with how it looks.

Clicking on the green arrow and dragging up or down will scale the decal.

I'm happy with the scale of this decal. Now we are finished applying the decal we can save the progress and move on to the next texture.


Read How To Create A Tileable Texture Now

Tillable Texture
This image shows a finished texture that can be used in a game.

Steps To Create The "Diffuse" Texture


1. Search for an image that will be suitable for your game and an image that you want to be your tileable texture. the best website is http://www.textures.com/

2. Put an image that you want to be your texture in to Photoshop software.

Brick Wall
This image shows the brick wall.

3. Crop the image, removing any potentially troublesome areas.

Crop Image
This image shows Crop tool has taken away part of the image.

4. Then resize image to be power of 2.

Image Resize
This image shows the Image size setting in power of 2.
5. Press filter on top software tool bar than select other option and then select offset.

Offset
This image shows the right setting for offset.

Offset divide image
This image shows an image that is divided into two parts the better one in on top and the bad one is on bottom of the picture. The bottom part will be covered with clone tool.

6. We will use clone tool to copy good parts of image.

Clone
This image shows that the clone tool created a copy of the top part of the image.
7. Use Sharpen tool to get rid of the blur but do not over use Sharpen tool because we get bad effect.

8. Use dodge tool to make shadows lighter and burn tool to make highlights darker.

Dodge
This image shows how you can make image brighter by using Dodge Tool.

Burn
This image shows how you can make image darker by using Burn Tool.

9. On tap bar go to Image\Adjustment\Hue and Saturation.Add Hue and Saturation adjustment the way that you want to make this texture more interesting. Make sure that there is not any defects.

Hue & Saturation
This image shows settings for Hue and Saturation Adjustment.

10. If everything is good and you are happy of effects save as targa file. You should save your targa with a resolution of 32 bits/pixel.

A finished texture
This image shows a finished texture that can be used in a game.

Steps To Create The "Normal" Texture

1. Search in Google for NVIDIA texture tool the best way to find it is: “NVIDIA Texture Tools for Adobe Photoshop”. If you cannot find there is a link for website where you can download NVIDIA plugging tool.

https://developer.nvidia.com/nvidia-texture-tools-adobe-photoshop

2. Press download and chose version of Windows that you work with either 32 bit or 64 bit.

3. When download is finish just install the program.

4. Open Photoshop and check in NVIDIA installed right be pressing filter and down in list should be NVIDIA Tool.

5. Open your texture targa file.

This image shows the file name and format that is saved.
6. Unlock layer so you can work with NVIDIA Tool.

This image shows layer blocked.

This image shows layer unblocked.
7. Go to filter and select NVIDIA Tool and take “NormalMapFilter” option.
This image shows setting of NVIDIA Tool.

This image shows some effect that we can get from NVIDIA Tool.
8. Duplicate the layer until you get effect that you want.

This image shows Duplicate layer which give better effect.

This image shows last step that you should take after last duplicate layer.

9. If you are happy of yours effect save in targa(tga) file.

This image shows saving mode.



This image shows a finished texture that can be used in a game. The texture is in targa(tga) file.


This image shows right format that you can save your targa format and it shows the resolution that you can chose the best options is 16 bits/pixel and 32 bits/pixel because is the power of 2.

This link shows Video Tutorial about how to install NVIDIA Texture tool and how creating Tillable texture.

The Next Step

Now that you have created the texture the next step is to import and add them to whatever software you need them for.


Read How to create a Destructible Mesh in UE4. Now

Finished Product

What is a Destructible Mesh?

A Destructible Mesh is a static mesh that can break when it comes into contact with an object.  

Step 1. Finding a Prop

Within your game map open up “Starter Content” then double left click into “Props”. Double click any object in this category. In my case I chose the sphere.

Starter Content
Props

 Step 2. Adding a collision

In the opened window choose the “collision” tab above the “Save” tab. Once clicked choose “Add 26DOP Simplified collision”. Now save and close the window.
Collision

Step 3. Creating the destructible mesh

Right click on the mesh you just edited and choose “Create Destructible Mesh”. Once created a window should open up as shown.
Creating the Destructible Mesh
Fracturing Mesh

Step 4. Fracturing the mesh

Click “Fracture Mesh”. Once clicked you should see your mesh broken up.
Fractured Mesh

Step 5. Making the mesh destructable

Go to "Destructible Mesh" > "Default Destructible" > "Damage Parameters" and change “Impact Damage” to 1.0 and “Default Impact Depth” to 1. Keep the “Cell count” default at 25. Once done Save and close window.
Details

Step 6. Physics

Drag out the new mesh to a suitable area of the map. On the right hand column go down to “Physics” and turn on “Simulate Physics”. In the “Collision Column” below make sure “simulation generate” is ticked/turned on and “Generate Overlap” is un-ticked/turned off.

Physics

Physics details

Step 7. Simulate 

When done, make sure you have a clear view of you object. Once you are happy bring down the arrow beside “Play” and click “Simulate”.

Simulate

Step 8. Finish

Watch the destruction happen.


Read Introduction to Unreal Engine 4 Now



In this tutorial I am going to give you a basic run down of the the user interface in Unreal Engine 4. After reading this tutorial you will be able to start your own Unreal Engine 4 project and know your way around the interface you are given to create a game.

Getting started

Create an account with unreal engine. Sign in.

Sign in screen.
Sign in screen.

When you sign in, you see the menu screen.


Menu screen.
Menu screen.

From the Marketplace, you can download different free useful packages including characters.  From there you can add these to your project.

Marketplace.
Marketplace.

All downloaded packages can be found in the library.

Launch button and Library location.
Launch button and Library location.

First time you launch the engine, you will see the unreal engine project browser.


Unreal project browser.
Unreal project browser.

From here, you can create a new project or go on to the Marketplace and load an existing project. When creating a new project, there are a variety of different genres and also a choice of project type’s, blueprint or code.


New project.
New project.

Blueprint and C++ options.
Blueprint and C++ options.

 When making settings, we recommend the following. 

Recommend setting.
Recommend setting.

You then choose an appropriate location to save it and you give it a project name.
 
Choose location to save your project and name it.
Choose location to save your project and name it.

Note: when naming, do not use spaces, use an underscore. Then you save and click CREATE PROJECT.
 
Create project.
Create project.

User Interface

Main menu bar


Menu bar location
Menu bar location

Menu bar zoomed in.
Menu bar zoomed in.

Pretty much any menu bar you see in computer applications, file menu, edit menu, window menu and the help menu.

File -   Here you can save what you are working on, create new projects, import and export.
Edit – You can find the standard Undo, redo, cut, copy, paste. Also here you can find editor preference and your project settings.
Window – This is where you can show and hide parts of the interface that are not shown by default
Help – Direct link to the documentation, link to initial tutorials to help get you started 

On your view port here are meshes already in place because you chose to include starter content. These meshes are not permanent and can be edited, as shown in a later tutorial. 


3D viewport.
3D viewport.

Mode panel 

Mode panel, this allows us to change the mode the editor is currently in. You can select modes place mode, landscape, paint, foliage and geometry editing mode.


Mode panel.
Mode panel.
Zoomed into modes.
Modes - Zoomed in.

Content Browser

Allow you access to any exterior generated content and special content like materials and blueprints you may have created.


Content browser.
Content browser.
Here you can create new folders and import different meshes, sound and textures/materials.

Scene Outliner

The scene outliner panel, shows everything that is in your level at that time. Main use is to see all the objects in your screen and select them.


Scene outliner.
Scene outliner.

It has some other functionality like here you can select, edit, parent together, hide and delete objects/actors.


Details panel

The details panel shows all editing details on a selected item.

Details panel.
Details panel.

Tool bar

Tool bar.
Tool bar.

Quick and easy one click access to common tasks that you will be performing
you have your save button (but generally you can just hit ctrl+s), content to open the content browser if you don’t already have one opened. Marketplace. Your settings, control various things that you can show and hide inside of your view port and overall environment. 


When editing, make sure you save your work frequently and build when progress is made.
When you press the play button a character will appear, this gives you a good idea of how your level will look and function.

Character on screen.
Character on screen.

To escape play mode press eject. The short cut for this on your keyboard is ESC.

Viewport navigation

Mouse navigation

If you drag with the left click, to go forward you drag up and to go backwards you drag down. Move the mouse left to right while still holding down the left of the mouse to look left and right. Right click is just looking around, you can look left, right, up and down by dragging the mouse up, down, left and right. If you click the mouse wheel you can track the camera in all directions by sliding up and down, left and right. Click the left and right of the mouse at the same time does the same thing.

You can change the speed of the camera in the upper right corner of the viewport.


Camera speed options.
Camera speed options.

Camera speed option zoomed in.
Camera speed option zoomed in.

WSAD keys

While holding down the right side of the mouse:
 W – To fly forwards
 S – To fly backwards
 A – Straight left
 D – Straight right
 E – Straight up into the air
 Q - Down
 C – zoom camera in
 Z – zoom camera out

Note: as soon as you release the right mouse it snaps back to where you were

MIYA style navigation

Hold down alt to use this style of navigation.
Alt+left mouse click is going to tumble the view around.
To change pivot of the tumble you can select any object in your scene and hit “f” on your keyboard.
Now when you hold down alt and drag with the left mouse you are tumbling around the object.
alt+right mouse to dolly the camera

When duplicating an object hold down the alt+click the direction you want to go in on the anchor + hold down shift. 


You can also look at your level through different viewpoints. You can find the option to change views in the top left hand corner of your  3D viewport.


Viewpoint section location.
Viewpoint section location.
Viewpoint selection zoomed in.
Viewpoint selection zoomed in.

In the dropdown, there are a variety of different views including perspective, top, side, and front.


Perspective.
Perspective.


Top.
Top.


Side.
Side.

Front.
Front.
close
Banner iklan disini