1
0
forked from 0ad/0ad

Added improved normal mapping, parallax mapping, specular mapping, and AO on the Roman buildings.

Created folder for AO textures.

This was SVN commit r12353.
This commit is contained in:
gregory 2012-08-11 06:10:29 +00:00
parent b926a5ee54
commit 9d54763401
20 changed files with 126 additions and 58 deletions

View File

@ -4,8 +4,12 @@
<group> <group>
<variant> <variant>
<mesh>structural/rome_market_struct2.dae</mesh> <mesh>structural/rome_market_struct2.dae</mesh>
<textures><texture file="structural/rome_struct_2.png" name="baseTex"/></textures> <textures>
<texture file="structural/rome_struct_2.png" name="baseTex"/>
<texture file="structural/rome_struct_2_norm.png" name="normTex"/>
<texture file="structural/rome_struct_2_spec.png" name="specTex"/>
</textures>
</variant> </variant>
</group> </group>
<material>player_trans.xml</material> <material>player_trans_parallax_spec.xml</material>
</actor> </actor>

View File

@ -7,9 +7,10 @@
<props> <props>
<prop actor="props/structures/decals/dirt_5x5.xml" attachpoint="root"/> <prop actor="props/structures/decals/dirt_5x5.xml" attachpoint="root"/>
</props> </props>
<textures><texture file="structural/rome_struct_2.png" name="baseTex"/> <textures>
<texture file="structural/rome_struct_2_norm.png" name="normTex"/> <texture file="structural/rome_struct_2.png" name="baseTex"/>
<texture file="structural/rome_struct_2_spec.png" name="specTex"/> <texture file="structural/rome_struct_2_norm.png" name="normTex"/>
<texture file="structural/rome_struct_2_spec.png" name="specTex"/>
</textures> </textures>
</variant> </variant>
</group> </group>
@ -30,5 +31,5 @@
</props> </props>
</variant> </variant>
</group> </group>
<material>rome_struc__player_trans_parallax_spec.xml</material> <material>player_trans_parallax_spec.xml</material>
</actor> </actor>

View File

@ -10,10 +10,10 @@
<prop actor="props/structures/decals/rome_corral_mud.xml" attachpoint="root"/> <prop actor="props/structures/decals/rome_corral_mud.xml" attachpoint="root"/>
</props> </props>
<textures> <textures>
<texture file="structural/rome_struct_2.png" name="baseTex"/> <texture file="structural/rome_struct_2.png" name="baseTex"/>
<texture file="structural/rome_struct_2_norm.png" name="normTex"/> <texture file="structural/rome_struct_2_norm.png" name="normTex"/>
<texture file="structural/rome_struct_2_spec.png" name="specTex"/> <texture file="structural/rome_struct_2_spec.png" name="specTex"/>
</textures> </textures>
</variant> </variant>
</group> </group>
<group> <group>
@ -29,5 +29,5 @@
</props> </props>
</variant> </variant>
</group> </group>
<material>rome_struc__player_trans_parallax_spec.xml</material> <material>player_trans_parallax_spec.xml</material>
</actor> </actor>

View File

@ -8,12 +8,13 @@
<prop actor="props/structures/romans/dock.xml" attachpoint="root"/> <prop actor="props/structures/romans/dock.xml" attachpoint="root"/>
<prop actor=""/> <prop actor=""/>
</props> </props>
<textures> <textures>
<texture file="structural/rome_struct_2.png" name="baseTex"/> <texture file="structural/rome_struct_2.png" name="baseTex"/>
<texture file="structural/rome_struct_2_norm.png" name="normTex"/> <texture file="structural/rome_struct_2_norm.png" name="normTex"/>
<texture file="structural/rome_struct_2_spec.png" name="specTex"/> <texture file="structural/rome_struct_2_spec.png" name="specTex"/>
</textures> <texture file="structural/ao/rome_fortress_ao.png" name="aoTex"/>
</textures>
</variant> </variant>
</group> </group>
<material>rome_struc__player_trans_parallax_spec.xml</material> <material>player_trans_parallax_spec.xml</material>
</actor> </actor>

View File

@ -10,9 +10,10 @@
<prop actor="props/structures/romans/farmstead_plants.xml" attachpoint="root"/> <prop actor="props/structures/romans/farmstead_plants.xml" attachpoint="root"/>
</props> </props>
<textures> <textures>
<texture file="structural/rome_struct_2.png" name="baseTex"/> <texture file="structural/rome_struct_2.png" name="baseTex"/>
<texture file="structural/rome_struct_2_norm.png" name="normTex"/> <texture file="structural/rome_struct_2_norm.png" name="normTex"/>
<texture file="structural/rome_struct_2_spec.png" name="specTex"/> <texture file="structural/rome_struct_2_spec.png" name="specTex"/>
<texture file="structural/ao/rome_fc_ao.png" name="aoTex"/>
</textures> </textures>
</variant> </variant>
</group> </group>
@ -29,5 +30,5 @@
</props> </props>
</variant> </variant>
</group> </group>
<material>rome_struc__player_trans_parallax_spec.xml</material> <material>player_trans_ao_parallax_spec.xml</material>
</actor> </actor>

View File

@ -14,9 +14,10 @@
<prop actor="props/units/weapons/arrow_front.xml" attachpoint="loaded-projectile"/> <prop actor="props/units/weapons/arrow_front.xml" attachpoint="loaded-projectile"/>
</props> </props>
<textures> <textures>
<texture file="structural/rome_struct_2.png" name="baseTex"/> <texture file="structural/rome_struct_2.png" name="baseTex"/>
<texture file="structural/rome_struct_2_norm.png" name="normTex"/> <texture file="structural/rome_struct_2_norm.png" name="normTex"/>
<texture file="structural/rome_struct_2_spec.png" name="specTex"/> <texture file="structural/rome_struct_2_spec.png" name="specTex"/>
<texture file="structural/ao/rome_fortress_ao.png" name="aoTex"/>
</textures> </textures>
</variant> </variant>
</group> </group>
@ -40,5 +41,5 @@
</props> </props>
</variant> </variant>
</group> </group>
<material>rome_struc__player_trans_parallax_spec.xml</material> <material>player_trans_ao_parallax_spec.xml</material>
</actor> </actor>

View File

@ -34,9 +34,9 @@
<group> <group>
<variant> <variant>
<textures> <textures>
<texture file="structural/rome_struct_2.png" name="baseTex"/> <texture file="structural/rome_struct_2.png" name="baseTex"/>
<texture file="structural/rome_struct_2_norm.png" name="normTex"/> <texture file="structural/rome_struct_2_norm.png" name="normTex"/>
<texture file="structural/rome_struct_2_spec.png" name="specTex"/> <texture file="structural/rome_struct_2_spec.png" name="specTex"/>
</textures> </textures>
</variant> </variant>
</group> </group>
@ -51,5 +51,5 @@
</props> </props>
</variant> </variant>
</group> </group>
<material>rome_struc__player_trans_parallax_spec.xml</material> <material>player_trans_parallax_spec.xml</material>
</actor> </actor>

View File

@ -24,5 +24,5 @@
</props> </props>
</variant> </variant>
</group> </group>
<material>rome_struc__player_trans_parallax_spec.xml</material> <material>player_trans_parallax_spec.xml</material>
</actor> </actor>

View File

@ -15,9 +15,10 @@
<prop actor="props/units/shields/rome_parma_e.xml" attachpoint="shield2"/> <prop actor="props/units/shields/rome_parma_e.xml" attachpoint="shield2"/>
<prop actor="props/units/shields/rome_parma_a.xml" attachpoint="shield3"/> <prop actor="props/units/shields/rome_parma_a.xml" attachpoint="shield3"/>
</props> </props>
<textures><texture file="structural/rome_struct_2.png" name="baseTex"/> <textures>
<texture file="structural/rome_struct_2_norm.png" name="normTex"/> <texture file="structural/rome_struct_2.png" name="baseTex"/>
<texture file="structural/rome_struct_2_spec.png" name="specTex"/> <texture file="structural/rome_struct_2_norm.png" name="normTex"/>
<texture file="structural/rome_struct_2_spec.png" name="specTex"/>
</textures> </textures>
</variant> </variant>
</group> </group>
@ -38,5 +39,5 @@
</props> </props>
</variant> </variant>
</group> </group>
<material>rome_struc__player_trans_parallax_spec.xml</material> <material>player_trans_parallax_spec.xml</material>
</actor> </actor>

View File

@ -4,9 +4,10 @@
<group> <group>
<variant name="Wall long"> <variant name="Wall long">
<mesh>structural/rome_wall_long.dae</mesh> <mesh>structural/rome_wall_long.dae</mesh>
<textures><texture file="structural/rome_struct_2.png" name="baseTex"/> <textures>
<texture file="structural/rome_struct_2_norm.png" name="normTex"/> <texture file="structural/rome_struct_2.png" name="baseTex"/>
<texture file="structural/rome_struct_2_spec.png" name="specTex"/> <texture file="structural/rome_struct_2_norm.png" name="normTex"/>
<texture file="structural/rome_struct_2_spec.png" name="specTex"/>
</textures> </textures>
</variant> </variant>
</group> </group>
@ -20,5 +21,5 @@
</props> </props>
</variant> </variant>
</group> </group>
<material>rome_struc__player_trans_parallax_spec.xml</material> <material>player_trans_parallax_spec.xml</material>
</actor> </actor>

View File

@ -4,9 +4,10 @@
<group> <group>
<variant name="Wall medium"> <variant name="Wall medium">
<mesh>structural/rome_wall_medium.dae</mesh> <mesh>structural/rome_wall_medium.dae</mesh>
<textures><texture file="structural/rome_struct_2.png" name="baseTex"/> <textures>
<texture file="structural/rome_struct_2_norm.png" name="normTex"/> <texture file="structural/rome_struct_2.png" name="baseTex"/>
<texture file="structural/rome_struct_2_spec.png" name="specTex"/> <texture file="structural/rome_struct_2_norm.png" name="normTex"/>
<texture file="structural/rome_struct_2_spec.png" name="specTex"/>
</textures> </textures>
</variant> </variant>
</group> </group>
@ -20,5 +21,5 @@
</props> </props>
</variant> </variant>
</group> </group>
<material>rome_struc__player_trans_parallax_spec.xml</material> <material>player_trans_parallax_spec.xml</material>
</actor> </actor>

View File

@ -4,9 +4,10 @@
<group> <group>
<variant name="Wall short"> <variant name="Wall short">
<mesh>structural/rome_wall_short.dae</mesh> <mesh>structural/rome_wall_short.dae</mesh>
<textures><texture file="structural/rome_struct_2.png" name="baseTex"/> <textures>
<texture file="structural/rome_struct_2_norm.png" name="normTex"/> <texture file="structural/rome_struct_2.png" name="baseTex"/>
<texture file="structural/rome_struct_2_spec.png" name="specTex"/> <texture file="structural/rome_struct_2_norm.png" name="normTex"/>
<texture file="structural/rome_struct_2_spec.png" name="specTex"/>
</textures> </textures>
</variant> </variant>
</group> </group>
@ -20,5 +21,5 @@
</props> </props>
</variant> </variant>
</group> </group>
<material>rome_struc__player_trans_parallax_spec.xml</material> <material>player_trans_parallax_spec.xml</material>
</actor> </actor>

View File

@ -12,9 +12,10 @@
<prop actor="props/units/weapons/arrow_front.xml" attachpoint="loaded-projectile"/> <prop actor="props/units/weapons/arrow_front.xml" attachpoint="loaded-projectile"/>
<prop actor="props/units/weapons/arrow_front.xml" attachpoint="projectile"/> <prop actor="props/units/weapons/arrow_front.xml" attachpoint="projectile"/>
</props> </props>
<textures><texture file="structural/rome_struct_2.png" name="baseTex"/> <textures>
<texture file="structural/rome_struct_2_norm.png" name="normTex"/> <texture file="structural/rome_struct_2.png" name="baseTex"/>
<texture file="structural/rome_struct_2_spec.png" name="specTex"/> <texture file="structural/rome_struct_2_norm.png" name="normTex"/>
<texture file="structural/rome_struct_2_spec.png" name="specTex"/>
</textures> </textures>
</variant> </variant>
</group> </group>
@ -36,5 +37,5 @@
</props> </props>
</variant> </variant>
</group> </group>
<material>rome_struc__player_trans_parallax_spec.xml</material> <material>player_trans_parallax_spec.xml</material>
</actor> </actor>

View File

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<material>
<shader effect="model"/>
<alternative material="player_trans_ao_spec.xml" quality="8"/>
<define name="USE_PLAYERCOLOR" value="1"/>
<!-- REQUIRES: Actor must provide a texture named "normTex", where the Alpha channel
is the heightmap (white = high).
COMMENT: Pixels that are exactly white are calculated more efficiently (on average)
if dynamic branching is supported by the player's GPU.
EFFICIENCY: This is a moderately expensive effect, so use with care. -->
<conditional_define name="USE_PARALLAX_MAP" value="1" type="draw_range" conf="PARALLAX_DIST"/>
<conditional_define name="USE_HQ_PARALLAX" value="1" type="draw_range" conf="PARALLAX_HQ_DIST"/>
<!-- REQUIRES: Actor must provide a texture named "normTex", where the RGB channels
are a normal map corresponding to XYZ normals.
EFFICIENCY: This is a relatively inexpensive effect that should run easily on most hardware. -->
<define name="USE_NORMAL_MAP" value="1"/>
<!-- REQUIRES: Actor must provide a texture named "specTex", where the RGB channels
provide a specular colour multiplier.
Material must provide a uniform definition for "specularPower" that controls
the glossiness of the effect.
COMMENT: The intensity of the colour controls the specular amount, so black pixels have
no specularity.
COMPATIBILITY: This effect is incompatible with the old "USE_SPECULAR" effect.
EFFICIENCY: This is a relatively inexpensive effect that should run easily on most hardware. -->
<define name="USE_SPECULAR_MAP" value="1"/>
<!-- REQUIRES: That "USE_SPECULAR_MAP" is enabled and a texture named "specTex" is provided by the Actor.
The Alpha channel of the texture defines the amount of self-illumination, with
transparency being no self-illumination.
COMMENT: Full self-illumination means the screen colour of a pixel is equal to its baseTex value.
EFFICIENCY: This is a very cheap effect, however it also requires the calculation of specular. -->
<define name="USE_SELF_LIGHT" value="1"/>
<!-- REQUIRES: Actor must provide a texture named "aoTex", where the R channel is the Ambient Occlusion.
The model must provide a second, non-overlapping set of UV coordinates.
COMMENT: The texture is combined using a multiply blend of (2 * ao * baseTex). -->
<define name="USE_AO" value="0"/>
<!-- Settings for effects above:
First value: Normal mapping intensity.
Second value: Specular power.
Third value: Parallax scale.
Fourth value: AO amount. -->
<uniform name="effectSettings" value="1.0 50.0 0.0075 0.85"/>
</material>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.