dungeons+ pack pbr · dungeons+ pack pbr ... dungeon scenes are prefaced ... drag the maps exported...

12
Dungeons+ Pack PBR VISIT WWW.INFINTYPBR.COM FOR THE LATEST UPDATES, FORUMS, SCRIPT SAMPLES & MORE ASSETS. 1. INTRODUCTION 2. QUICK SET UP 3. PROCEDURAL VALUES 4. SCRIPTING 5. ANIMATIONS 6. LEVEL OF DETAIL 7. CHANGE LOG Please leave a rating & review for us at the Unity Asset Store! If you need support, email us or write us on the forums, but an honest review of our package will help other developers make a decision to purchase this and support us as we make more killer assets.

Upload: duongngoc

Post on 26-May-2018

223 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Dungeons+ Pack PBR · Dungeons+ Pack PBR ... Dungeon scenes are prefaced ... Drag the maps exported earlier into the corresponding boxes. Do this for all of the materials you may

Dungeons+ Pack PBR VISIT WWW.INFINTYPBR.COM FOR THE LATEST UPDATES, FORUMS, SCRIPT SAMPLES & MORE ASSETS.

1. INTRODUCTION 2. QUICK SET UP 3. PROCEDURAL VALUES 4. SCRIPTING 5. ANIMATIONS 6. LEVEL OF DETAIL 7. CHANGE LOG

Please leave a rating & review for us at the Unity Asset Store! If you need support, email us or write us on the forums, but an honest review of our package will help other developers make a

decision to purchase this and support us as we make more killer assets.

Page 2: Dungeons+ Pack PBR · Dungeons+ Pack PBR ... Dungeon scenes are prefaced ... Drag the maps exported earlier into the corresponding boxes. Do this for all of the materials you may

IMPORTANT: WE SUGGEST YOU DO *NOT* PUT THIS PACKAGE INTO YOUR MAIN PROJECT DIRECTLY. INSTEAD, CREATE A NEW

PROJECT (5.3.4 OR 5.4 WHEN AVAILABLE RECOMMENDED) WHERE YOU CAN CREATE ALL THE TEXTURES YOU’D LIKE FOR THE

OBJECTS YOU PLAN ON PUTTING INTO YOUR GAME.

ONCE YOU’VE CREATED THE TEXTURES & ATTACHED THEM TO YOUR PREFABS, EXPORT ALL YOUR PREFABS (WITH

DEPENDENCIES) INTO A .UNITYPACKAGE FILE, AND IMPORT THAT INTO YOUR MAIN PROJECT.

Page 3: Dungeons+ Pack PBR · Dungeons+ Pack PBR ... Dungeon scenes are prefaced ... Drag the maps exported earlier into the corresponding boxes. Do this for all of the materials you may

1. Introduction “Dungeon+ Pack PBR” is a procedural PBR model set designed for video games developers. The procedural aspect means there are virtually unlimited looks you can give to the models, creating unique looks that no one else has. Physically Based Rendering means the look can appear hyper realistic.

Due to all of this — and the physical size of the package and it’s many parts — there is a little setup involved. It shouldn’t take long and maybe it’ll be quite fun, as you’ll get to fine-tune the look of your character.

In most cases the Quick Set Up section will be all that you need. If you’re interested in knowing more about each of the values you’re able to tweak, check out the Procedural Values section.

For advanced users, if you’re interested in scripting run time changes in the texture of the model, refer to the Scripting section.

We plan on updating our assets periodically, so please check the Asset Store for available updates.

* If you have upgraded from a previous version, please check the Change Log at the end of this document to make sure we haven’t changed anything you rely on.

Page 4: Dungeons+ Pack PBR · Dungeons+ Pack PBR ... Dungeon scenes are prefaced ... Drag the maps exported earlier into the corresponding boxes. Do this for all of the materials you may

2. Quick Set Up This quick guide will work for most users, and does not allow for run time changes in the look of the textures. For videos, please visit our website at www.InfinityPBR.com where you will find much more detailed examples. We highly suggest you create your maps in a new project. Our YouTube page has videos showing this process.

Create Base Materials 1. In any new scene, create a cube or sphere or flat object. 2. Find our Base Material generators in Assets/SFBayStudios/SFB Base Materials/Material Generators/ 3. For each of the base materials (“BaseMarble” etc), expand the arrow and drag the Procedural Material

(circle icon), onto your primitive object. Select the material in the project view to load it in the inspector. 4. There are many options to choose from. Customize the materials to something you may wish to use in

your scene. When you’re ready to save the texture, select “Export Material” from the Windows menu. (Hot key available)

5. I personally like to dock this window in my view, as I’ll be using it a lot. If the material you want to export isn’t already featured in the top field, drag it in.

6. Give a general “Group Name”, such as “Base Materials” — something descriptive that keeps things organized, as you may be producing hundreds of these.

7. In most cases you can remove the Emissive, and often the Height. However, I suggest keeping the heigh for now, and obviously keep the emissive if the base material is emissive itself.

8. Ensure that “Set Normal Map Mode” is NOT checked. 9. Check “Merge With Group Name”. If this is not checked, the system will create a 2nd folder with the

group name you’ve chosen followed by a number. 10. If you’d like to give your base material a more descriptive name, check “Override Material Name?” and

choose a custom name. Otherwise, it will be named “BaseMarble” etc with sequential numbering. For Base Materials, this is often fine.

11. If you’ve already exported one look, you can share textures from previous exports by clicking the “Copy Previous Group” and choosing the previous group name. This is mostly used for textures which are meant to be used in game. The textures you are creating now will not be used directly in game, so you can ignore this.

12. Click the Export button. You’ll find the new files in Assets/SFBayStudios/Exported Materials/ 13. Repeat this until you have a bunch of Base Materials that you want to use in your game.

Get More Materials 1. Go to www.InfinityPBR.com 2. If you have not already signed up, sign up and confirm your email, and register the Dungeon+ Pack PBR

with your receipt code from Unity.

Page 5: Dungeons+ Pack PBR · Dungeons+ Pack PBR ... Dungeon scenes are prefaced ... Drag the maps exported earlier into the corresponding boxes. Do this for all of the materials you may

3. You’ll now be able to download dozens of Base Materials that you can use in your levels. Almost all are heavily customizable, and many have very cool, very unique looks.

Choose a group of objects you want to work on. 1. Create a new project, and import the Dungeon+ package. 2. Open a demo Scene (Assets/SFBayStudios/SFB Demo Scenes/) that you’d like to work on. Dungeon

scenes are prefaced “SFB Dun.Tex.Cre” for “Dungeon Texture Creation”. Perhaps open the “Foors Walls and Ceilings” scene

Base Material Palette 1. You’ll find 6 objects in the scene called “Base Material Palette” with a type of material. These are

prefabs, and will likely be empty or pure white or multiple colors. We will be populating them with the Base Materials you’ve exported from the previous step.

2. Select one of the objects, and scroll to the bottom of the Inspector where you will find areas titled “Custom Material#”. Expand the first one.

3. Drag the maps exported earlier into the corresponding boxes. Do this for all of the materials you may wish to use in your game. This is the only time you will have to drag these in.

4. Scroll back up and check “Enable Texture Modification” from the “Main” section. 5. You should see your materials represented on the Palette objects in the scene. Be sure to “Apply” the

changes to the prefab, so that changes are reflected in all Texture Creation scenes.

Texture Creation Scene 1. Each Texture Creation scene has a small number of objects, usually grouped by type. We do this

because one scene using all of our procedural materials at once will likely crash slower computers. Our materials are meant for editor customization and should not be used in game.

2. Each Object has a Procedural Material attached to it. Some objects have sub-meshes that allow for different materials (such as archways). Most materials start out with just a color ID map, while others (like Doors), will have pre-drawn textures you can use, or modify.

3. Select an object, perhaps one with multiple colors. Each color represents one “section” of the model, which you can apply a base material to. There are more options, and much much more you can do using all of the features of the material, but for now, we’ll simply add base materials and leave it at that.

4. Select a “CT2T” object from the hierarchy that corresponds to the object you want to work on. If you’re in the “Floors Walls and Archways” scene, try selecting the object “CT2T - Archways”.

5. Each row represents one “section” of the model, as written. The Palettes are pre-populated as the source materials. For each section, choose a source material and a source Texture. You can look at the Palette objects in the scene to remind yourself of which material is in which spot. If you’d like to update just one section, click the “Copy” button to the right of that row. If you’d like to copy all the sections of one material, click the green button at the bottom of that section. At the very bottom there is a big green button that will copy all of the materials at once.

Page 6: Dungeons+ Pack PBR · Dungeons+ Pack PBR ... Dungeon scenes are prefaced ... Drag the maps exported earlier into the corresponding boxes. Do this for all of the materials you may

6. This may take a few minutes. If you have “Save Changes?” option unchecked it will take less time, as Unity will not have to re-import the Procedural Materials. However, when you quit your updates may not have saved. This is fine for quick changes, but not for longer projects where you may want to come back and do more work on it.

7. When Unity is done, you’ll see the changes in the scene view. You can now make fine-tune changes to each material if you’d like, or change the Source Material & Texture. The single “copy” button is good for making changes to an individual section to see what works best.

Mass Exporter 1. Each scene also contains a “Mass Exporter” object pre-populated with all the Procedural Materials

featured in that scene. Click it to load it into the Inspector. 2. Choose a “Group Name” — this is the folder all of your materials will be put into. Something descriptive

is usually a good idea, and I personally like to separate this by style or level. I may use “Demo #3”, but perhaps “Castle Frankenstein” would be a good option as well, if the level in your game is called the same.

3. In most cases, “Remove Emissive” can be kept on, unless some of your textures include emissive options. “Remove Height” is up to you, but if you’re unsure, don’t select it. You can always delete those maps later.

4. Make sure “Set Normal Map Mode” is checked. The texture maps you’re about to create are intended to be used in game, so normal maps need to be set to the proper mode. Best to do it now, rather than by hand later.

5. Click “Merge With Group” as well. Since we have separated the entire dungeon package into multiple scenes, this will ensure that the Procedural Materials from each Texture Creation scene will end up in the same folder in your project, well organized.

6. Finally, if you’re making a 2nd version and you know you can share maps with a previous export, then enter the “Previous Group Name” and choose which maps to share.

7. Click “Export”, and wait. Depending on your system and how many Procedural Materials there are, this could take a while as Unity imports all of the files.

8. When done, you’ll find all of your Materials, nicely named, in Assets/Exported Materials/[Group Name]/ 9. Be sure to choose the proper size and compression type for your textures. 10. There are many packages on the Asset Store that will combine textures into texture atlases. If you’re

looking to decrease draw calls, you may wish to look into those.

* For more in depth instructions, please refer to the videos linked at http://www.InfinityPBR.com

Page 7: Dungeons+ Pack PBR · Dungeons+ Pack PBR ... Dungeon scenes are prefaced ... Drag the maps exported earlier into the corresponding boxes. Do this for all of the materials you may

3. Procedural Values The included Run Time procedural materials are designed to be used in game. They start with “SFB_RT_”. You’ll find some basic scripting guidelines here, but we encourage you to use the Forums on the Unity website if you have more questions, as we aren’t the best coders. NOTE: Due to the multiple sub-meshes, these would have to be used, and updated in code, per material. However, they should all blend perfectly together.

SFB_RT_TextureBlend: Use this to blend between two textures. It accepts two groups of exported maps, and has a float value to blend between the two. One potential use is to blend between a “clean” and “damaged” version of an object. Perhaps the more it is used, the more the “Damaged” version is shown.

SFB_RT_DirectionalBlood: Bring in your ready-to-go texture maps, along with the Positional Map for the object (included in the package). Choose the direction appropriate for your object, and then you can code the material to update in script. This could be used to add blood to an object whenever it’s “used”, and the blood can fade out over time.

SFB_RT_TextureBlend

Category Name ID | Type Min,Max Description

N/ABlend Amount blendAmount

float (0.0,1.0)Blend amount between Texture group 1 and Texture group 2.

SFB_RT_SFX

Category Name ID | Type Min,Max Description

SFX

Water Level SFXWaterLevel float (0.0,1.0)

How much water

Water Details SFXWaterDetails float (0.0,1.0)

Details of the water

Refraction SFXRefraction float (0.0,1.0)

Refraction of the water. (Try 0 for an “ooze” look)

Reflection SFXReflection float (0.0,1.0)

Reflection amount

Reflection Distance SFXReflectionDistance float (0.0,1.0)

Reflection distance

Flow Direction SFXFlowDirection float (0.0,1.0)

Changes the direction the water appears to be flowing

Water Color SFXWaterColor Color

Color of the water (clear = default)

Ice SFXIce float (0.0,1.0)

How much of the water has turned to ice? Water is required for this to work.

Page 8: Dungeons+ Pack PBR · Dungeons+ Pack PBR ... Dungeon scenes are prefaced ... Drag the maps exported earlier into the corresponding boxes. Do this for all of the materials you may

Ice Details SFXIceDetails float (0.0,1.0)

Details of the ice

Snow SFXSnow float (0.0,1.0)

Amount of snow

Moss SFXMoss float (0.0,1.0)

Amount of moss

Moss Scale SFXMossScale int (1,4)

Scale of the moss texture

Moss Color SFXMossColor Color

Color of the moss

Category Name ID | Type Min,Max Description

SFB_RT_DirectionalBlood

Category Name ID | Type Min,Max Description

N/AAxis axis

int (1,6)Which direction should be blood go? X, X-inverted, Y, Y-inverted, Z, Z-inverted

Blood

Height bloodHeight float (0.0,1.0)

How high does the blood extend

Level bloodLevel float (0.0,1.0)

How “thick” is the blood, works in conjunction with height

Contrast bloodContrast float (0.0,1.0)

The contrast of the pattern

Color bloodColor Color()

Color of the blood

Roughness bloodRoughness float (0.0,1.0)

How reflective the blood is, suggested range 0.25-0.8

Page 9: Dungeons+ Pack PBR · Dungeons+ Pack PBR ... Dungeon scenes are prefaced ... Drag the maps exported earlier into the corresponding boxes. Do this for all of the materials you may

4. Scripting It’s possible to change values during run time. We include a few versions of the material, some of which are optimized for common run-time options. In those cases, you’ll likely want to bake maps for the base materials you plan on using (which do not change at run time), and use the optimized versions. This will speed up the changes in game.

Please Note: We are not the best coders. There may be more ways of doing what we’re doing, perhaps better ways. Please use the forums on our site and the Unity forums if you’d like to discuss or ask the community about various ways of doing this. We are also using Unity Script because, simply, it’s what we currently understand. Check out our demo scripts for more extensive examples.

var substance : ProceduralMaterial;

// Set an Int or a Float value substance.SetProceduralFloat("Grunge2Volume", 0.5);

// Set a Color value substance.SetProceduralColor("Grunge2Color", Color(1,1,1,1));

// Get a Vector2 value var currentOffset : Vector2 = substance.GetProceduralVector("Grunge2Offset");

// Set a Vector2 value substance.SetProceduralVector(“Grunge2Offset", Vector2(currentOffset[0],currentOffset[1]));

Note: Visit http://www.InfinityPBR.com for tutorials and videos showing more things you can do with our work.

Page 10: Dungeons+ Pack PBR · Dungeons+ Pack PBR ... Dungeon scenes are prefaced ... Drag the maps exported earlier into the corresponding boxes. Do this for all of the materials you may

5. Animations

Some of the objects, like doors, may or may not contain animations. At this point we haven’t decided. But, they’re easy to create. Refer to the Unity Documents if you need help.

Page 11: Dungeons+ Pack PBR · Dungeons+ Pack PBR ... Dungeon scenes are prefaced ... Drag the maps exported earlier into the corresponding boxes. Do this for all of the materials you may

6. Level Of Details

Most of these objects do not include LODs, as they are pretty small already. If you’d like to create some, please check out Simplygon, a package (FREE) in the Asset Store. We use that to create LODs for our characters, and highly recommend it for all of your LOD requirements.

Page 12: Dungeons+ Pack PBR · Dungeons+ Pack PBR ... Dungeon scenes are prefaced ... Drag the maps exported earlier into the corresponding boxes. Do this for all of the materials you may

7. Change Log

v3Demo3 available for download. Please update the package before installing the demo.

Added “Curved Stairs & More”, a set of curved stairs with accompanying pieces

v2

Added new “Brick Wall” material generator (but name is misleading, does a hell of a lot more)

Added “Copy This To That" editor script, making it easy to customize textures, using the new Texture Creation scenes

Added a “Mass Exporter” that will export all of the textures into game-ready Standard Shader materials with a single click

Added a “Sewer” floor set

v1 Initial Version.