indiegamedev

How to Repeat UV in Unreal Engine Materials Editor

An easy way to repeat UV in Material Editor of Unreal Engine 4

001-uv-repeat

002-uv-repeat

003-uv-repeat

By |Unreal Engine, Video Games Development|Commenti disabilitati su How to Repeat UV in Unreal Engine Materials Editor

Unreal Engine – Lights – Basic Tutorial

A basic lesson about lighting inside Unreal Engine

Baked Lighs

A baked light is precalculated, it can’t be animated in real time but is is faster than movable light.

1. Unreal Engine> File> New Level> Empty Level

2. LEFT COLUMN> Basic> DRAG AND DROP a Cube, create a ground, put on it a Sphere

3. Play, you will see a black screen because there is no light in the scene

4. LEFT COLUMN> Lights> Directional Light

5. Play> You will see the message: ‘Lights need to be rebuilt’ and the text Preview over the shadow of the Sphere.

6. TOP BAR> Build> DROP DOWN MENU> Lighting Quality ‘High’

7. TOP BAR> Build> DROP DOWN MENU> Build Lighting Only, now light is baked.

8. See RIGHT COLUMN> Details> Transform> Mobility> Static / Stationary need baking

Movable Lights

9. RIGHT COLUMN> Details> Transform> Mobility >Movable

Remove Lights – Add New Lights

1. Select the Light, press CANC from keyboard, the light in the scene does not change, it is because the is the old backing

2. LEFT COLUMN> Lights> Point Light> Add a Point Light, the scene does not change.

3. TOP BAR> Build> Build Lighting Only

Light Setup

RIGHT COLUMN> Transform

– Location: XYZ it does not affect Directional Light, Sky Light
– Rotation: XYZ it does not effect Point Light, Sky Light
– Scale: XYZ it does not affect lights

RIGHT COLUMN> Light

– Intensity: energy that the light emits
a. Directional Light, Intesity is just a brightness multiplie
b. Sky Light, Intesity is just a brightness multiplie
c. Point light, 1= 1 lumen, 1700 lumens= 100W light bult
d. Spot Light, 1= 1 lumen, 1700 lumens= 100W light bult

– Light Color

– Attenuation Radius: it limits the emitter radius, small radius cost less.

– Source Lenght: 0= circular reflection highlight, 300= tube reflection highlight

– Temperature:
color of light in Kelvin Grades 1800= red 3200= halogen 5000= white sun 16000= blue
1. Turn light color to White
2. CHECK ‘Use Temperature’

– Affects World: enable/disable light

– Cast Shadows: enable/disable cast shadows, self shadows will remain active

– Indirect Light Intensity: 0= disable Global Illumination for this Light, 1 default, 6 max

– Light profiles: IES Light Profiles are a curve that defines light intensity in an arc that Unreal Engine 4 will “sweep” around an axis to make Point Lights and Spot Lights appear to be casting light more realistically.
1. You can download nice IES here http://www.lithonia.com/photometrics.aspx
2. Content Browser> Import> myfile.ies
3. DRAG AND DROP myfile.ies over RIGHT COLUMN> Details> Light Profiles

– Light Function: it is a Material used to turn the light into a projector.
Please see the ufficial docs at: https://docs.unrealengine.com/latest/INT/Engine/Rendering/LightingAndShadows/LightFunctions/index.html

– Rendering: enable/disable light

Sky Lights Setup

The Sky Light can work unsing two ways:

1. The Sky Light captures the distant parts of your level (everything further than SkyDistanceThreshold) and applies that to the scene as a light. That means the sky’s appearance and its lighting / reflections will match, even if your sky is coming from atmosphere, or layered clouds on top of a skybox, or distant mountains.

2. You can also manually specify a HDR skybox cubemaps.
a. Select the Sky Light
b. RIGHT COLUMN> Light> Source Type> SLS Specified Cubemap
c. Content Browser> Import> a HDR Cube Map, DRAG AND DROP over Key Light> RIGHT COLUMN> Cubemap empty image slot

NOTICE:
1. The ambient light will be emitted by HDR Cube Map
2. Metals materials will reflect HDR Cube automatically

Ufficial docs at: https://docs.unrealengine.com/latest/INT/Engine/Rendering/LightingAndShadows/LightTypes/SkyLight/index.html

By |Unreal Engine, Video Games Development|Commenti disabilitati su Unreal Engine – Lights – Basic Tutorial

3DS Max – Unwrap UVW – Basic Tutorial

Use Simple Projections

How to unwrap a texture for games using 3DSMax.

1. Select an Editable Poly

2. RIGHT COLUMN> Modifier List> UVW Mapping Clear

3. RIGHT COLUMN> Modifier List> Unwrap UVW

a. Mapping the first group of polys

Unwrap UVW Modifiers> Selection> Polygon> select in the 3D viewport the polys

Unwrap UVW Modifiers> Projection> Planar, Align Options, try ‘Best Align’ or use XYZ buttons

Unwrap UVW Modifiers> Configure> uncheck ‘Normalize Map’

Notice: “Normalize Map” of 3DS Max will maintain the correct proportions for the various polygons.
Removing this means that in the “Edit UVWs” window polygons will be bigger and you will need to zoom out with the mouse wheel.

>Edit UVWs window> mouse whell to zoom out, the polys are red (selected)

>Edit UVWs window> in the bottom deselect ‘Polygon’ after that riselect ‘Polygon’, click in an empty area to unselect polys, after that select the polys

>Edit UVWs window> in the top select ‘Scale Selected Subobjects’, scale the polys to fit them inside the UV CheckerPattern (rotate Mouse Wheel to zoom out-in)

>Edit UVWs window> in the top select ‘Move Selected Subobjects’, move the polys over the UV CheckerPattern (press Mouse Wheel to pan)

b. Mapping the second group of polys

Unwrap UVW Modifiers> Selection> Polygon> select in the viewport others polys

> … return to point a. …

Welding UVWs points

Put the UVWs pieces in the right size and order, use the commands:

Edit UVWs window>

– To navigate in the window rotate Mouse Wheel to zoom out-in, press Mouse Wheel to pan

– To move UVWs pieces in the bottom select ‘Vertex, Edge, Polygon’, check/uncheck ‘select by Element’

Weld the Points:

Edit UVWs window>

– in the bottom select ‘Vertex’, select the vertex, you can see the vertex in the 3D viewport also.

– Main Top Menu> Tools> Target Weld, DRAG AND DROP a vertex over another one

Repack

>Edit UVWs window> Tools> Pack UVs

Create the Template

>Edit UVWs window> Tools> Render UVW Template, save the bitmap texture.

Seams

1. Create Seams

Loop Seams

Unwrap UVW Modifiers> Selection> Edge> select in the 3D viewport an edge

Unwrap UVW Modifiers> Selection> Modify Selection> Loop: XY Edges

Unwrap UVW Modifiers> Peel> Seams> Convert Edge Selection To Seams

Manual Seam Selection

Unwrap UVW Modifiers> Peel> Seams> Edit Seams, click in the 3D Viewport edges, LMB to add / LMB+Alt to remove seams

OR

Unwrap UVW Modifiers> Peel> Seams> Point-to-Point Seams, click in the 3D Viewport vertex

2. Expand Polygon Selection to Seams

Unwrap UVW Modifiers> Selection> Polygon> inside 3D Viewport select a poly

Unwrap UVW Modifiers> Peel> Seams> ‘Expand Polygon Selection to Seams’ button

Unwrap UVW Modifiers> Peel> Quick Peel

> … return to point a. …

By |3D Graphic, 3DS Max|Commenti disabilitati su 3DS Max – Unwrap UVW – Basic Tutorial

Game Dev – Normal Map – from Photoshop to Game Engine

Modeling real 3D Geometry can be a tedious task, sometimes it is more confortable paint secondary geometry using a 2D Software as Photoshop.

1. Open Photoshop, paint a picture like this:

001

NOTICE: white is the highest, black the lowest

Save in .PNG format to avoid compression artifacts

2. Open BitmapToMaterial> from Windows DRAG AND DROP the bitmap over BitmapToMaterial slot> ‘Load in the Main Input Tweak’

3. BitmapToMaterial select the label on top ‘Normal’ you will see the image below:

002

NOTICE: compare first and second image

4. BitmapToMaterial> Right Column> Outputs> turn ‘Normal’ ON, disable the others, the result is:

003

5. BitmapToMaterial> Export> Export as a Bitmap> select .PNG format, Select Output(s) to export: check’Normal’, uncheck others

6. Load the nomal map inside the Game Engine, Unity, Unreal or others…

7. Done!

By |3D Graphic, 3DS Max, Video Games Development|Commenti disabilitati su Game Dev – Normal Map – from Photoshop to Game Engine

Unreal Engine 4 – Basic Flat Color – Sample

Unreal Engine 4 – Basic Flat Color – Sample

basic-flat-color-gray

basic-flat-color-pink

By |Unreal Engine, Video Games Development|Commenti disabilitati su Unreal Engine 4 – Basic Flat Color – Sample