beffio - Game Assets Development
Game Assets Development

Medieval Kingdom - Documentation

 

RPG Medieval Kingdom Kit — Documentation

Medieval Kingdom is a next-gen PBR 3D modular art package which contains 900 fully customizable prefabs to create your own RPG or RTS Game with First Person or Top-Down View. 

Scroll down to learn more.

 

Index.

0. What's Inside

1. Modularity

1a. How to use ?
1b. Level Design
1c. Ground Paint

2. Materials & Shaders

2a. Water Sh.
2b. Base Sh.
2c. Fabric Sh.
2d. Fire Sh.
2e. Ground Blending Sh.
2f. Parallax Sh.

2g. Light Shaft Sh.
2h. Tree Sh.
2i. Vegetation Sh.
2j. Stones Sh.

3. Plugins

3a. Explode Part
3b. Tree Swinger
3c. Water Floating Objects

4. Effects

4a. Fog

5. Mobile Optimisation

5a. LOD System
5b. Textures
5c. Occlusion Culling
5d. Lights & Shadows

6. Unity 2018 & SRP

6a. Lightweight Render Piepeline Shaders
6b. Unity 2018 Compatibility

 

1. Modularity


Medieval Kingdom has been made using modular workflow. That means that every element is created in a way, to easily build different variations and configuration for exterior buildings & maps.

1A. How to use it ?

Just drag all needed elements from prefab folder into the scene and start to craft your buildings. Everything depends on your imagination. Then when you will build your final architecture, you can always maniuplate specific parts & textures of materials to change Colors, AO, Roughness, Dirt etc. This part will be described at the bottom in Materials & Shaders Section.

 
 

1B. Level Design

Level design in Medieval Kingdom is made using just unity prefabs & 3rd party brush prefab tools. Let's have a look.


Prefab Scatter

Use Polybrush or any tool to brush prefabs with randomness to distribiute vegetation as shown on example.


Prefab Placement

Every elements in Medieval Kingdom is made as a prefab. Drag prefabs and build your level as you need it.

 

1C. Ground Paint

Paint full PBR textures with brush on any mesh using Polybrush Tool made by ProCore Team.

We've made custom ground blending shader when used with Polybrush gives you huge advantage over outdated Unity Terrain. Just Vertex Color matched with Material Texture and Paint Rock's, Wetness, Intensity to achieve amazing results.

  1. Sculpt Geometry.
    1. Great for custom terrain sections and organic objects.
  2. Paint Vertex Colors.
    1. Create colorful shapes, enhance textures, or even hand-paint lighting.
  3. Blend Textures.
  4. Scatter Detail Meshes.

Full Polybrush Documentation here: http://procore3d.github.io/polybrush/

 

 

 

2. Materials and Shaders


All shader has been crafted using Amplify Shader Editor. You can easily edit each of them and change to your project needs. * Note that only water is not editable in Amplify. Below you can in-detail exaplanation of each shader and example materials tweaks.

 

2A. Water Shader

The goal of our custom water shader was to be able to achieve realistic and stylized look using one material.

Easily customizable shader for get stylized looking water

Water Material Parameters


Depth_top_color - base top water color shift
Shore color - color of water closer to shore
Depth_bottom_color - depth water color shift
Depth_transparency - water transparency shift
Depth_multiply - depth water level multiply
Top_mask_color_shift - water top mask color shift
Water top mask level - water top mask intensity level
Smoothness_level - water smoothness shift
Vertex displacement level - vertex displacement movement intensity shift
Underwater_distortion - underwater distortion effect shift
Normal2_intensity - intensity of 2nd normal map
Normal_blend - normal maps blending
Normal1_intensity - intensity of 1st normal map
UV1_speed - 1st normal map move speed
UV2_speed - 2nd normal map move speed
UV1_tilling - 1st normal map tilling
UV2_tilling - 2st normal map tilling
Edge_fade - object fade transparency shift
Caustic_intensity - caustic effects intensity shift (0-1)

Caustic_speed - speed of caustics animation
Caustic_parallax - intensity of underwater parllax depth (projection of caustis on underwater shapes) (0-1)
Caustic_tilling - caustic effects map tilling shift
Edge_Foam_Tiling - tiling of foam texture
Foam_Amount - Intensity of foam
Foam_contrast - Foam color contrast
Foam color - Color of foam
Depth_Intensity - water depth intensity shift
Reflection power - changes the intensity of fresnel influence in reflection power
Waves color - Color of waves close to shore
Waves intensity - intensity of appearance of waves close to shore (0-1)
Fake reflections color - color of fake reflections on surface of water
Waves noise cutout - adds irregularity in waves near shore by cutting some of the waves out.
Waves width - change width of teh waves near shore

Reflection Pass Script Parameters

In order to use relatime reflections this script has to be attached to desired gameobject.


Clip Plane Offset - offset between reflection plane and water surface
Texture Size - Resolution of reflection texture
Activated - Activates/Deactivates reflections
Culling - Activates/Deactivates occlusion culling of reflection camera.
Distance - Culling distance of reflection camera
Reflect Layers - Layers which will be visible for reflection camera
 

 

2B. Base Shader Material

Customizable shader that allow to input couple maps to your model and blend them together using masks.

Easily change color or smoothness using  sliders. Shader uses custom map inputs based on Albedo and Smoothnes maps.

Base Material Parameters


Base color - base material color shift
Detail_color - color shift of 1st detail map
Detail_level - 0 to 1 float bar change of detail map 1 opacity
Detail_2_color - color shift of 2nd detail map
Detail_2_level - 0 to 1 float bar change of detail map 2 opacity
Normal intensity - 0-2 - normal map shiift (1- base intensity of normal map)
Material_Smoothness_shift - smoothnes map shiift (1- base intensity of smoothness alpha channel)
Detail_smoothness_shift - change smoothness of 1st detail map
AO_shift - strength of ambient occlusion map
Edge_wear - strength of the edge wear map
Metallic_shift - strength of the meettalic map
Emmisive color - emmisive color
Emmisive intensity - strenght of the emmisive color
Metal object uses mettalic smoothnes map? - if material uses mettalic map chceck the box

Map Inputs


Albedo_smoothness_map_input - albedo smoothness map input - png map rgb for base diffuse color and alpha for smoothness)
Normal_map_input - normal map input
Metallic_Smoothness_map_input - mettalic smoothness map input
Ambient_Occlusion_map_input - ambient occlusion map input
Edge_mask_map_input - edge mask map input
Emmisive_mask_map_input - emmisive mask map input
Detail_mask_1_map_input - detail map input
Detail_mask_2_map_input - secondary detail map input
Alpha_cutout_mask_map_input
Mask clip value - alpha clip value

 

2C. Fabric Shader Material

Fabric shader allow to input max 3 maps with mask to pattern your model with stripes.

Easily change color and input maps intensity with sliders * Fabric shader allows to change wind speed and intensity

Fabric Material Parameters


Mask clip value - alpha clip value
Stripe_1_color - change color of 1st stripe
Stripe_2_color - change color of 2nd stripe
Stripe_3_color - change color of 3rd stripe
Folds_AO_multiply - Ambient Occlusion shift of material folds (0-2)
Stripes_tillig - material stripes tiling shift (0.1-50)
Folds_tiling shift - change tiling of material folds (1-10)
Smoothness_shift - change strength of the smoothnes map (0-2)
Wind_level - strength of local vertex offset of wind (0-0.2)
Wind speed - frequency speed of local vertex offset (0-10)
Normal_level - normal map intensity level  (0-2, 1- base intensity of normal map)
Holes tiling - change tilling of material holes
Holes amount - change intensity of fabric holes map

Map Inputs


Stripe1 - stripe 1 mask map input
Stripe2 - stripe 2 mask map input
Stripe3 - stripe 3 mask map input
Normal_map_input - fabric folds normal map input
Smoothness_map_input - fabric smoothness map input
Fabric_holes_mask_map_input - fabric holes mask map input
Wind_noise - noise pattern map input
Ambient_Occlusion_map_input - fabric folds ambient occlusion map input

 
 

2D. Fire Shader Material

Custom stylized fire shader.

Fire shader allow to change color, emmisive level and frequency based on input maps

Fire Material Parameters


Base color - change of base color
Emmisive_color - change of fire emmisive color
Emmisive_Frequency - fire frequency speed shift
Emmisive multiply - emmisive level multiply shift
Cracks map color - change cracks map color
Crack map intensity - Crack map intensity
Overall emmisive intenstiy - Multiply overall emmisive level
Vertex_offset_speed - speed of vertex offset move
Vertex_offset_intensity - intensity of vertex offset move
Small noise color - change of small noise color
Small noise shift - small noise map blending

Map Inputs


Base_texture - fire base texture map input
Cracks_map - fire cracks map input
Small_noise_map - fire small noise map input
Fire_glow_map - fire glow map input

 

2E. Goround Blending Material Shader

Custom shader for vertex painting, blending 4 maps based on vertex painting of model and height maps informations (uses RGBA channels).

We used Plybrush for vertex painting data. Just select right color depends of what channel you want to paint with (RGB or A color) and paint on selected surface.

Ground Blending Material Parameters


Color shift (black channel) - shift of black channel map input albedo color
Color shift (red channel) - shift of red channel map input albedo color
Color shift (green channel) - shift of green channel map input albedo color
Color shift (alpha channel) - shift of alpha channel map input albedo color
Smoothness shift (black channel) - shift of smoothness black channel map input
...
Wetness color - change of wetness channel diffuse color
Tilling black - black channel maps tiling shift
...
Blending strenght (red) -  shift of blending strenght channel based on height map input
...
Normal strenght (red) -  shift of normal map strenght channel (1 defaul normal value)
...

Map Inputs


Diffuse (Black Channel) - Albedo smoothness map input for black channel vertex painting
Normal (Black Channel) - Normal map input for black channel vertex painting
Height (Black Channel) - Height map input for black channel vertex painting
etc...

 

2F. Parallax Material Shader

Custom shhader that uses height map information for parralax effect.

Customizable shader that allow to input couple maps to your model and blend them together. Easily change color or smoothness,etc  with sliders. Shader uses custom map inputs based on Albedo/Smoothnes maps.

Parallax Material Parameters


Global_tilling - change tilling of you inputs maps
Base_Color - base material color shift
Detail_mask_color - color shift of 1st detail map
Detail_mask_level - 0 to 1 float bar change of detail map 1 opacity
Detail_mask_2_color - color shift of 2nd detail map
Detail_mask_2_level - 0 to 1 float bar change of detail map 2 opacity
Smoothnes Scale - smoothnes map shiift (1- base intensity of smoothness alpha channel)
Normal Scale - 0-2 - normal map shiift (1- base intensity of normal map)
Ambient_Occlusion_level - strength of ambient occlusion map
Parralax - parallax height shift

Map Inputs


Albedo_smoothness_map_input - albedo smoothness map input - png map rgb for base diffuse color and alpha for smoothness)
HeightMap - Heigth map input
Normal - normal map input
Occlusion - ambient occlusion map input
Detail_mask - detail map input
Detail_mask_2 - secondary detail map input

 

2G. Light Shaft Material Shader

Custom Light Shaft shader for smiluating animated light beam effects.

Allow to change color, opacity, emmisive level, frequency and 5 texture blending.

Light Shaft Material Parameters


Shaft color - change base shaft color
Opacity_shift - change of shaft opacity (0-1)
Frequency - Shaft frequency speed change
Frequency scale - shaft frequency scale shift (0-1)
Mask on/off - When you use additional input map creates seamless shaft based on mask
Emmision level - Emmisive shift (0-50 scale)
Texture 2 blend - blending beetween Texture1 and Texture2
Texture 3 blend - blending beetween Texture3 and Texture1 & 2
Noise_level - Blending beetween textures 1-3 and noise map
Texture1 tilling - change tilling of map (x,y)
Texture2 tilling - change tilling of map (x,y)
Texture3 tilling - change tilling of map (x,y)
Noise_tilling - change tilling of map (x,y)
Texture1 speed - change move speed of map (x,y)
Texture2 speed - change move speed of map (x,y)
Texture3 speed - change move speed of map (x,y)
Noise_speed - change move speed of map (x,y)

Map Inputs


Texture1 - 1st mask map input
Texture2 - 2nd mask map input
Texture3 - 3rd mask map input
Texture4 - 4st mask map input, noise mask
Ray_mask - additional map input, shaft mask

 

2H. Tree Bark Material Shader

Custom shader for trees bark. Easily change color, smoothness & extra details with sliders.

Shader uses custom map inputs based on Albedo/Smoothnes maps. Shader allow to rotate models and always leave side mask for ex. moss or snow based on world object position.

Tree Bark Material Parameters


Base_color - base material color shift
Base_Smoothness - smoothnes map shiift (1- base intensity of smoothness alpha channel)
Base_Normal_intensity - 0-1 - normal map shiift (1- base intensity of normal map)
Moss_color - side mask color shift
Moss_mask_intensity - strength of the side mask
Moss_tilling - change tilling of side mask input
Moss_smoothness - change smoothness of side mask
Moss_normal_intensity - side mask normal map intensity (0-2)
Edge_wear_level - strength of the edge wear map
Ambient_Occlusion_shift - strength of ambient occlusion map

Map Inputs


Albedo_smoothness_map_input - albedo smoothness map input - png map rgb for base diffuse color and alpha for smoothness)
Normal_map_input - base normal map input
World_space_normals_input - stone world space normals map input
Ambient_Occlusion_map_input - ambient occlusion map input
Edge_mask_map_input - edge mask map input
Moss_texture_grayscale - top mask albedo smoothness map input
Moss_normal -  top mask normal map input

 

2I. Vegetation Material Shader

Custom shader for vegetation, grass, bushes, ferns, ivy's, flowers or tree leaves.

Vegetation shader allows to change wind speed and intensity.

Vegetation Material Parameters


Base_color - base material color shift
Smoothness_Shift - smoothnes shiift 0-2
2nd_color - 2nd color shift based on input map
2nd_color_intensity - 0 to 1.5 float bar change of 2nd color mask map
AO_intensity - strength of ambient occlusion map
Wind_speed - frequency speed of local vertex offset (0-10)
Wind_level - local vertex strenght offset of wind (0-0.2)

Map Inputs


Albedo_map_input - albedo map input
2nd_color_mask_input - 2nd color mask map input
Ambient_Occlusion_map_input - ambient occlusion map input
Alpha_cutout_mask_map_input - Alpha cutout mask map input
Wind_noise - wind noise map input

 

2J. Stone Material Shader

Custom shader for rocks and stones. Easily change color or smoothness,etc  with sliders.

Shader uses custom map inputs based on Albedo/Smoothnes maps. Shader allow to rotate models and always leave top mask for ex. moss or snow based on world object position.

Stone Material Parameters


Base color - base material color shift
Material_Smoothness_shift - smoothnes map shiift (1- base intensity of smoothness alpha channel)
Base_Normaliintensity - 0-2 - normal map shiift (1- base intensity of normal map)
Edge_color - edge wear color shift
Edge_wear - strength of the edge wear map
Detail_1_level - 0 to 1 float bar change of detail map 1 opacity
Detail_color - color shift of 1st detail map
Top_mask_level - strength of the top map
Top_mask_color - top mask color shift
Top_mask_tilling - change tilling of top mask input
Top_Mask_smoothness_shift - change smoothness of top map
Top_mask_normal_intensity - top mask normal map intensity (0-2)
AO_shift - strength of ambient occlusion map

Map Inputs


Albedo_smoothness_map_input - albedo smoothness map input - png map rgb for base diffuse color and alpha for smoothness)
Normal_map_input - stone base stone normal map input
Ambient_Occlusion_map_input - ambient occlusion map input
Top_mask_texture - top mask albedo smoothness map input
Top_mask_normal -  top mask normal map input
Edge_mask_map_input - edge mask map input
Detail_mask_1_map_input - detail map input

 

3. Plugins


3A. Explode Part Script

Script to easy animate your object in scene and after begin playmode active them on keyboard key with smooth tween. It remembers position, rotation and scale.

Features


Explode Part Editor - here you define your animation

Set initial transform - set you start object postion, scale and rotation
Set final transform - set you final object position, scale and rotation
Explode preview - move scroll bar to see your animation in editor

Explode Part Manager Script - put this on parent object

Animation Time - speed of your animation
Key - your ketboard shortcut key

Explode Part Script - put this on child object that you want to animate

Your object data for position, rotation and scale

 

3B. Tree Swinger Script

Tree Swinger allows you to quick and easy apply script into Trees Parent and play with options to animated movement of trees.

Features


Speed settings
Swing Speed X - How fast do the trees swing in the X axis
Swing Speed Randomness X - The difference in swing speed of each tree in the X axis
Swing Speed X - How fast do the trees swing in the Y axis
Swing Speed Randomness Y - The difference in swing speed of each tree in the Y axis

Angle settings
Swing Max Angle X - How far do the trees swing in the X axis
Swing Max Angle Randomness X - The difference in how far does each trees swing in the X axis
Swing Max Angle Y - How far do the trees swing in the Y axis
Swing Max Angle Randomness Y - The difference in how far does each trees swing in the Y axis

Direction settings
Direction The - \"wind\" direction in angles from standard X axis
Direction Randomness - The \"wind\" direction randomness
Eneable Y - Axis Swinging

 

3B. Water Floating Objects  Script

Tree Swinger allows you to quick and easy apply script into Trees Parent and play with options to animated movement of trees.

Features


Speed settings
Swing Speed X - How fast do the trees swing in the X axis
Swing Speed Randomness X - The difference in swing speed of each tree in the X axis
Swing Speed X - How fast do the trees swing in the Y axis
Swing Speed Randomness Y - The difference in swing speed of each tree in the Y axis

 

4. Effects



4A. Fog Effect

'Shader' [Shader] The shader to use should always be 'Beffio/Image Effects/Dithering Image Effect'.

'Palette Asset' [Asset]: A palette asset in your project. The texture and 'Mixed Color Count' contained within will be used in the shader.

'Pattern Asset' [Asset]: A pattern asset in your project. The texture contained within will be used in the shader. (Will only be visible if no 'Pattern Texture' is specified)

'Pattern Texture' [Texture(R)]: A pattern texture to be used in the shader. (Will only be visible if no 'Pattern Asset' is specified)

 

5. Mobile Optimisation


Medieval Kingdom is prepared in a way to optimise it to mobile. Use systems & tips bellow to speed up performance on mobile. Rememeber that the most important thing is to reduce number of elements in your scenes.


5A. LOD System

- ‘Base Albedo’ [Color and/or Texture(rgba)]: Color the dithering effect should represent. The texture is colorized with the color.
- ‘Base Metallic’ [0; 1]: Metallic value of the represented color.
- ‘Smoothness’ [0; 1]: Smoothness or glossiness value of the represented color.
- ‘Base Metallic-Smoothness Map’ [Texture (red & alpha)]: ‘Base Metallic’ value in Red channel, ‘Base Smoothness’ value in Alpha channel. Replaces sliders for the two above properties.
- ‘Normal Map’ [Normal Texture]: Normal map, for defining the per pixel lighting directions.
- ‘Normal Strength’ [Multiplier]: Strength of the normals in the above normal map.
- ‘Occlusion Map’ [Texture (blue)]: Certain areas like cavities should be less affected by indirect lighting, these can be specified with the occlusion map.
- ‘Occlusion Strength’ [0; 1]: Strength of the above occlusion map.
- ‘Emission Map’ [Color or Texture (rgb)]: The unlit color of the object.
- ‘Emission Brightness’ [Multiplier]: Strength of the above emissive value or map. Above 1 will be HDR.
- 'Tiling' [Multipliers] and 'Offset' [X/Y coordinates]: Edit the UV coordinates of the textures used.


 

 

7. Unity 2018 & SRP rendering Piepeline


 

8. Support

If you have any questions or problems with this product, use platforms below to contact with us.

Twitter: @beffio

Facebook: fb.com/beffio

Contact Form: beffio.com/contact

 

10. Thank you guys for support!  ————  beffio team