Difference between revisions of "HPL3/Materials/Materials Overview"
| Line 11: | Line 11: | ||
HPL3 Material are created and edited using the Material Editor. | HPL3 Material are created and edited using the Material Editor. | ||
| + | |||
| + | |||
| + | {{tip|<code>.mat</code> files can be opened directly with the material editor application, if you set it as the default app in your computer's settings.}} | ||
==Example== | ==Example== | ||
Revision as of 20:58, 29 August 2020
|
This article is actively undergoing a major edit. The user who added this notice will be listed in its edit history should you wish to contact them. |
A material is a .mat text file that defines a two-dimensional surface. It contains all of the information needed for HPL3 to simulate the surface visually, aurally, and physically.
The main attributes of a material are:
- Material Type
- Corresponding Physics Material
- Texture Units
- Material Variables
HPL3 Material are created and edited using the Material Editor.
.mat files can be opened directly with the material editor application, if you set it as the default app in your computer's settings.Example
<Material>
<Main BlendMode="Add" DepthTest="true" ForceFullScaleTextures="true" PhysicsMaterial="Bed" Type="soliddiffuse" UVSubDivs="1 1" UseAlpha="false" />
<TextureUnits>
<Diffuse AnimFrameTime="1" AnimMode="None" AnimStartTime="0" Compress="false" File="textures/detail/algae_detail.dds" MipMaps="true" Type="2D" Wrap="Repeat" />
</TextureUnits>
<SpecificVariables>
<Var Name="HeightMapScale" Value="0.05" />
<Var Name="HeightMapBias" Value="0" />
<Var Name="IlluminationBrightness" Value="1" />
<Var Name="FrenselBias" Value="0.2" />
<Var Name="FrenselPow" Value="8" />
<Var Name="AlphaDissolveFilter" Value="false" />
<Var Name="DissolveLayer" Value="0" />
<Var Name="DetailUvMul" Value="4 4" />
<Var Name="DetailWeight_Diffuse" Value="1" />
<Var Name="DetailWeight_Specular" Value="1" />
<Var Name="DetailWeight_Normal" Value="1" />
<Var Name="DetailFadeStart" Value="5" />
<Var Name="DetailFadeEnd" Value="10" />
<Var Name="SwayActive" Value="false" />
<Var Name="SwayForceFieldAffected" Value="true" />
<Var Name="SwayFreq" Value="1" />
<Var Name="SwayAmplitude" Value="0.1" />
<Var Name="SwaySpeed" Value="1" />
<Var Name="SwayOctaveMuls" Value="0.125 0.25 1" />
<Var Name="SwayForceFieldMul" Value="0.3" />
<Var Name="SwayForceFieldMax" Value="0.6" />
<Var Name="SwayYFreqMul" Value="0" />
<Var Name="SwaySingleDir" Value="false" />
<Var Name="SwaySingleDirVector" Value="0 0 1" />
<Var Name="SwaySingleSampleVector" Value="1 0 0" />
<Var Name="LiquidTrickleColor" Value="0 0 0 1" />
<Var Name="LiquidTrickleSpecular" Value="0 0 0 0" />
<Var Name="LiquidTrickleLoopFade" Value="false" />
<Var Name="LiquidTrickleFadeSpeed" Value="0.5 0.5" />
<Var Name="LiquidTrickleEdgeSize" Value="0.5" />
<Var Name="LiquidTrickleDryness" Value="0.5" />
<Var Name="LiquidTrickleBlendMode" Value="Alpha" />
</SpecificVariables>
</Material>
Finding Materials
.mat files can be found in several locations:
- Inside a sub-folder under the
/texturesfolder of the game. - Inside a sub-folder under the
/static_objectsfolder of the game. - Inside a sub folder under the
/entitiesfolder of the game.