Skip to content

Latest commit

 

History

History
146 lines (83 loc) · 5.89 KB

Outward_PBRExample.md

File metadata and controls

146 lines (83 loc) · 5.89 KB

Intro

I am attempting to make more of an effort to document how you do various things in Outward mostly because people starting modding for Outward this late will really struggle with absence of any documentation, because some things are not very intuitive even under the best circumstances.

This will assume you know atleast how to install and use SideLoader in order to export an item into a folder.

PBR - Physically based rendering and why it matters to you.

PBR

is a mostly game dev technique (but not only) for reducing the amount of memory used on textures while still retaining good visuals/reaction to lightning/shadows, this is done by using one of each channel on an image (red, green, blue, alpha) and mapping those values to something in-game.

Now you no longer need a texture for each thing you want to map (wetness, light, emission, metallic, smoothness) you can instead merge these into one texture, where each channel controls the value for a certain property while there is a certain 'standard' this is very much down to the implementation in the shader itself.

Outward

In the case of Outward this means

Red : Metallic

Green : Unused as far as I can tell or maybe Ambient Occlusion

Blue : Smoothness

Alpha : Unused as far as I can tell

The Changes

Now I took the Wolf Tower Shield(A) and made two copies of the item (B Shiny Wolf Shield) and (C Super Shiny No Detail Wolf Shield) being sure to give them new IDs. Then I edited the _GenTex file which is the texture property used by Outwards default shader this is specifically our 'PBRMap'.

If a model does not have a _GenTex or it does but its white/black then you will need to create your own, you can usually just draw a silouhette around the maintexture and draw the outline on top of it.

So if we understand PBR then we know, according to Outwards implementation if we want to make a particular object very shiny(blue) + metallic(red), then we need to color our _GenTex texture purple at the highest values.

Effectively the color we use determine how much each color channel is used.

We also have Shader properties we can play with you will find then in the folder for the material of that particular item in this case its ...'SideLoader/Test/Items/NewWolfShield/Textures/properties.xml' but it will vary slighly for you, in this file you have all the available shader properties where you can change and edit the values, in this case of the edited shield and the super shiny shield I used these values.

The standard shield

Regular Shield at night

Regular Shield at night near a torch

Regular Gen Text

_Original Gen Texture

Edited Shield

Edited Shield Smoothness and Metallic values increased

Edited Shield Smoothness and Metallic values increased

Edited Gen Text

_Increased MetallicSmoothness Texture

Edited Wolf Shield

    <ShaderProperty xsi:type="FloatProp">
      <Name>_SmoothMin</Name>
      <Value>0.5</Value>
    </ShaderProperty>
    <ShaderProperty xsi:type="FloatProp">
      <Name>_SmoothMax</Name>
      <Value>1</Value>
    </ShaderProperty>

Edited Maxed Smoothness and Metallic (Far right shield)

Edited and Super shiny max smoothness shield together (you might notice it looks almost like its wet because both smoothness and metallic are at the maximum possible setting generally you would never go this high Edited and Super shiny max smoothness shield together

Edited and Super shiny max smoothness shield GenTex Maximum MetallicSmoothness Texture

Edited Super Shiny Wolf Shield

    <ShaderProperty xsi:type="FloatProp">
      <Name>_SmoothMin</Name>
      <Value>0.9</Value>
    </ShaderProperty>
    <ShaderProperty xsi:type="FloatProp">
      <Name>_SmoothMax</Name>
      <Value>1</Value>
    </ShaderProperty>

Since this techinque also deals with specularity of an object too, you might want to change the _SpecColor property too, for example if you were making golden armour, you might set this to a very light orange/yellow

SpecColor

    <ShaderProperty xsi:type="ColorProp">
      <Name>_SpecColor</Name>
      <Value>
        <r>0.9</r>
        <g>0.6</g>
        <b>0</b>
        <a>1</a>
      </Value>
    </ShaderProperty>

For a more obvious example heres how this armour set looks before fiddling with the _GenTex

Golden Sand'

Heres that same armour but with metallic and smoothness values maxed and a golden specular color (the brighest spots are the specularity coloring)

Fully mapped smooth and metallic with no Ambient Occulsion (thats why its so dark) image

And here again the same armour but with proper mapping applied

Mapped and Colored image MainTex image GenTex image

As you can see I all the places I wanted to be both shiny and metallic, I painted purple, everywhere else such as the cloth is painted black.