-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Associate library materials effect with meshes (#151)
* Associate library materials effect with meshes Signed-off-by: ahcorde <[email protected]> * make linters happy Signed-off-by: ahcorde <[email protected]> * Added test Signed-off-by: ahcorde <[email protected]> * Added feedback Signed-off-by: ahcorde <[email protected]> Co-authored-by: Michael Carroll <[email protected]> Co-authored-by: Louise Poubel <[email protected]>
- Loading branch information
1 parent
c98d0d2
commit 89b1157
Showing
3 changed files
with
159 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1"> | ||
<asset> | ||
<unit name="meter" meter="1"/> | ||
<up_axis>Z_UP</up_axis> | ||
</asset> | ||
<library_images/> | ||
<library_effects> | ||
<effect id="effect-cube"> | ||
<profile_COMMON> | ||
<technique sid="common"> | ||
<phong> | ||
<emission> | ||
<color sid="emission">0 0 0 1</color> | ||
</emission> | ||
<ambient> | ||
<color sid="ambient">0 0 0 1</color> | ||
</ambient> | ||
<diffuse> | ||
<color sid="diffuse">0.008957128 0.00619848 0.64 1</color> | ||
</diffuse> | ||
<specular> | ||
<color sid="specular">0.5 0.5 0.5 1</color> | ||
</specular> | ||
<shininess> | ||
<float sid="shininess">50</float> | ||
</shininess> | ||
<index_of_refraction> | ||
<float sid="index_of_refraction">1</float> | ||
</index_of_refraction> | ||
</phong> | ||
</technique> | ||
</profile_COMMON> | ||
</effect> | ||
</library_effects> | ||
<library_materials> | ||
<material id="material-cube"> | ||
<instance_effect url="#effect-cube"/> | ||
</material> | ||
</library_materials> | ||
<library_geometries> | ||
<geometry id="mesh-cube"> | ||
<mesh> | ||
<source id="mesh-cube-positions"> | ||
<float_array id="mesh-cube-positions-array" count="24">-1 -1 -1 -1 -1 1 -1 1 -1 -1 1 1 1 -1 -1 1 -1 1 1 1 -1 1 1 1</float_array> | ||
<technique_common> | ||
<accessor source="#mesh-cube-positions-array" count="8" stride="3"> | ||
<param name="X" type="float"/> | ||
<param name="Y" type="float"/> | ||
<param name="Z" type="float"/> | ||
</accessor> | ||
</technique_common> | ||
</source> | ||
<source id="mesh-cube-normals"> | ||
<float_array id="mesh-cube-normals-array" count="18">-1 0 0 0 1 0 1 0 0 0 -1 0 0 0 -1 0 0 1</float_array> | ||
<technique_common> | ||
<accessor source="#mesh-cube-normals-array" count="6" stride="3"> | ||
<param name="X" type="float"/> | ||
<param name="Y" type="float"/> | ||
<param name="Z" type="float"/> | ||
</accessor> | ||
</technique_common> | ||
</source> | ||
<vertices id="mesh-cube-vertices"> | ||
<input semantic="POSITION" source="#mesh-cube-positions"/> | ||
</vertices> | ||
<triangles count="12"> | ||
<input semantic="VERTEX" source="#mesh-cube-vertices" offset="0"/> | ||
<input semantic="NORMAL" source="#mesh-cube-normals" offset="1"/> | ||
<p>1 0 2 0 0 0 3 1 6 1 2 1 7 2 4 2 6 2 5 3 0 3 4 3 6 4 0 4 2 4 3 5 5 5 7 5 1 0 3 0 2 0 3 1 7 1 6 1 7 2 5 2 4 2 5 3 1 3 0 3 6 4 4 4 0 4 3 5 1 5 5 5</p> | ||
</triangles> | ||
</mesh> | ||
</geometry> | ||
</library_geometries> | ||
<library_visual_scenes> | ||
<visual_scene id="Scene" name="Scene"> | ||
<node> | ||
<matrix sid="transform">0.35 0 0 0 0 0.4 0 0 0 0 1 0 0 0 0 1</matrix> | ||
<instance_geometry url="#mesh-cube"> | ||
<bind_material> | ||
<technique_common> | ||
<instance_material symbol="material" target="#material-cube"/> | ||
</technique_common> | ||
</bind_material> | ||
</instance_geometry> | ||
</node> | ||
</visual_scene> | ||
</library_visual_scenes> | ||
<scene> | ||
<instance_visual_scene url="#Scene"/> | ||
</scene> | ||
</COLLADA> |