Showing posts with label materials. Show all posts
Showing posts with label materials. Show all posts

Saturday, February 13, 2016

UE4 Custom Textures & Materials

This tutorial is the third in the 10 part series on how to create a first person shooter game using Unreal Engine 4. We recommend you read the previous articles first to get the maximum benefit from this tutorial.

Step 1

Download a Texture from www.textures.com. The texture needs to be a seamless texture.

UE4 Custom Textures & Materials
Sample textures available at www.textures.com

Step 2

Download the Nvidia textures tools plugin for Adobe Photoshop + install. :


Step 3

Open the texture in Photoshop and go to Image > Image Size and scale the texture to 512 x 512


Then go to File > Save As and save as a .Targa file. Give it a name such as "brick_DIFF.tga". Finally you will get a pop up asking about the resolution to save at, choose 32 bit.

Step 4

In Photoshop use the NVIDIA plugin to create the Bump map/normal of the textures. You will find the plugin at Filters > NVIDIA.  In the pop up window that opens choose the "Biased RGB" option and select "Add Height to Normal Map" if not already selected. Then click OK


The NVIDIA texture tools plugin

This will change the look of the texture to a blueish, purple colour like in the image below.


Open the NVIDIA plugin again and this time choose "Normalise only" and click OK.

Next, you can increase the "bumpiness" of the texture normal by unlocking the layer, duplicating the layer and changing the blend mode of the duplicated layer to overlay. You will notice an increase in the bumpiness of the texture. This step can be repeated as many times as you feel is needed.



Finally, go to File > Save As and save as a .TARGA file with a name like "brick_NRM.tga" and a resolution of 32 bits. You can now close the file and close Photoshop.

Step 5

Open up Unreal Engine 4 and in the Content Browser create a new folder, call the folder "Materials". Inside the Materials folder, create a new folder and call it "Brick" or something appropriate to the texture you are using.

Inside the "Brick" folder click import. In the pop up window, navigate to where you saved the textures we created in the previous steps, select them both and click open. This will import them into the "Brick" folder.



Step 6

We now need to create the material itself. To do this click the green Add New button and choose Material. Name the material "Brick_M" or something appropriate to the material you are making.
Double click on the material to open up the material editor. Next drag an drop the textures into the material editor and connect them up as shown in the image below.



Now, save and close the material. It can now be applied to any geometry surface in the level. As in the picture below.


Now that you know how to add textures to the game here are some examples that we have in our game. Some wooden texture and brick textures that we have put on the house.

 



Next Up

In the next tutorial we will create the main building in the FPS game using BSP brushes and geometry mode.



Wednesday, January 20, 2016

Simple Water Effects Tutorial for Blender


Water Effect Tutorial for Blender
The Finished Effect

Step 1: 

Delete the default Cube and the Lamp by selecting and hitting delete followed by clicking the on screen prompt. You will not need these in your scene.

Step 1:

Step 2: 

Add a Plane and a Sunlight (placement doesn't matter for sunlight) through the Add tab, followed by scaling the plane up by pressing the S key while it is selected. The sun will create the reflection and all lighting.

Step 2:

Step 3: 

Select the Sunlight, and then go into the Sun Data tab which is a little sun icon where Materials would be, check the Sky box and Atmosphere box, then change the Factor of the sky to 0.5. This gives the background a realistic sky when you render the scene.

Step 3:

Step 4: 

Select the plane and enter the Materials tab and add a new material, change the Specular type of the plane to Blinn and change the specular Intensity of the highlight to 0.2. Then check the Mirror box of the plane and in the mirror dropdown, set the Reflectivity to 1.0 then set the gloss amount to 0.75.

Step 4:

Step 5:

Enter the Texture tab and add a new texture, and under Mapping change the X, Y & Z size to 7.0, then uncheck the Color box under the Influence tab, then under the Geometry heading change the normal to 0.1.

Step 5:

Step 6:

Go to the world tab and check the Ambient occlusion box and set it to 0.3.

Step 6:

Step 7:

Enter Edit mode and select the plane, then Subdivide it 7 times. This is to give it more Geometry for the Displace modifier to take effect. We will add this in the next step.

Step 7:


Step 8: 

Now enter the Modifier tab and add a Displace modifier and click the little texture box and select texture from the dropdown, now enter Object Mode and from the dropdown click texture, then change the Strength to 0.02.

Step 8:

Step 9: 

Under the Object tools menu on the left, change the Shading to Smooth.

Step 9:

Conclusion

If you followed my instructions correctly you should end up with something like this, my camera has been fixed into a suitable position for the effect to show it off, I also added a Monkey and an Icosphere from the Add tab to give the effect of floating objects. You don't have to do this. 

Pre Render

Final Render


Now hit F12 for the final render. Congratulations now you know how to make water effects for your renders.

Final Render




Applying Multiple Materials to Single Objects in Blender

In this tutorial, we will be learning how to apply multiple materials and textures to single objects. In this example, we will be creating a building, using two materials, for the building walls, and the building’s rooftop.



Apply Multiple Materials to Single Objects in Blender
Multiple Materials applied in a Final Render

Step 1: Creating the shapes

Open a new Blender project.


New Project
Rather than the deleting the default cube that appears in new projects, we will be using it. Use scale on Z axis (‘S’, then ‘Z’) to make the cube slightly taller, then grab and move on z axis upwards, so as to sit on the grid.


Scaled cube
Add a plane (shift + A, in the ‘Mesh’ option) and scale wider than the cube, using the ‘S’ key.


Added plane

Step 2: Edit Mode

Enter edit mode (tab) and ensure the ‘Face Select’ option is selected. This button is located along the bar at the bottom of the screen.


Circled selection, click 'Face Selection'
Select each side of the building apart from the top (hold shift and right-click each side). The selected sides will appear orange.


When 'Face Selection' is on, faces should appear as above

Step 3: Adding Materials and Textures

Go to the Materials tab on the right-hand side of the screen and add a new material, then proceed to the textures tab, and add a new texture – ensure that the type is ‘Image or Movie’.


Materials Tab
Textures Tab
Once you have added the texture, click ‘Open’ underneath the ‘Image’ dropdown, and open your texture. You can choose whichever texture you require. Since we’re making a building in this tutorial, I’ll be using a residential building texture. In order to gain a more realistic textured object, you should use seamless textures.


Added Texture
Image dropdown

Step 4: Mapping and Assigning the Walls

Once you have added your texture, you may want to map it in order for it to appear more realistic and neat. In order to do this, remain in the Textures tab, and scroll down until you find the ‘Mapping’ dropdown. Underneath this, change the ‘Coordinates’ to ‘Global’, and the ‘Projection’ to ‘Cube’. If you want to increase or decrease the size of the texture, you can change the ‘X’, ‘Y’, or ‘Z’ sizes.


Image Mapping for Building
Go back into the Materials tab, and select the ‘Assign’ button. This will assign your selected material and texture to the faces you have selected – as long as they are still selected.


Assign button

Step 5: Adding the Second Material

Once you have assigned the material to the walls of your building, select the roof of it by itself, and proceed to add another material. 


Roof Face Selection
Second Material added

With this material selected, go back to the Textures tab and add a texture to it. For this, I’ll be using a concrete texture. Repeat the process of opening the texture underneath the ‘Image’ dropdown.


Add texture to second material

Step 6: Mapping and Assigning the Walls

Once you have opened your texture in the Image dropdown, you may want to map the roof as well. In order to do this, simply scroll down to mapping, just as described beforehand, however, set the ‘Projection’ to ‘Flat’ this time. Keep the ‘Coordinates’ at ‘Global’.


Image Mapping for Roof
Ensure that this texture is assigned to the rooftop. To do this, go back to your Material’s tab and ensure that the roof’s material is selected. Then make sure that your rooftop is still selected on the object onscreen. If both of these are selected, click the ‘Assign’ button again.


Assign button

Step 7: Rendering your Scene

As on now, your building should have two materials assigned to it, each with a different texture. You can view this by changing the object display from ‘Solid’ to ‘Rendered’, or else to get a full rendered view, simply press F12 on your keyboard. This will give you a rendered view through the camera on your screen.


Rendered project
Rendered through camera view

You can use the same technique of applying a material and texture to your roof, as the plane. 


Final Render

Sample Renders:

You could experiment by adding more materials to each surface or the building, or try another shape with more than two materials.
Sample Render - Cylinder

Sample Render - Monkey




close
Banner iklan disini