PIECE: walldoor 12x7x1

HOW TO USE A "DMU PIECE"

We will present at this "DMU tutorials serie", some "pieces" to be included at the Windows "vistas". There are some converter from some 3D models file types (.3ds) and exporters from some modelers (Blender, Maya) that you can help you to create YOUR collection of "DMU pieces".

LINKS:Converter 3ds->xaml: http://www.ab3d.si

Blender Exporter: http://blogs.msdn.com/danlehen/archive/2006/01/14/513012.aspx

Maya Exporter: http://www.highend3d.com/maya/downloads/tools/3d_converters/3782.html

The "cardinality" usual of the "DMU pieces" is South.

To change the "cardinality", in the .XAML file we need to modify the line:

<AxisAngleRotation3D Angle="0" Axis="0 1 0"/> 

Each piece has a "positional point" that is the vertix left-inferior-front like you can see in the figure above.

To install a piece in some point of the "vista" we need to chance the line:

<TranslateTransform3D OffsetX="9"  OffsetY="0" OffsetZ="-0.5" />

By example, to install the piece at the point: -10, 0, -10, we need to add each element of the vector to what we call:"DeltaPlus", like you can see in the next figure:

"DeltaPlus" is the values to install the piece at 0,0,0 of the "vista".

For some pieces we present its "DeltaPlus", for some other you need to find it. It's not dificult...

Look these parameters for the other "cardinalities":

The definition of the piece is:

<MaterialGroup x:Key="walldoorM">
			<DiffuseMaterial>
				<DiffuseMaterial.Brush>
						<ImageBrush ImageSource="walldoor.png" TileMode="None" ViewportUnits="Absolute" Viewport="0 0 1 1" AlignmentX="Left" AlignmentY="Top" Opacity="1.000000" />
				</DiffuseMaterial.Brush>
			</DiffuseMaterial>
			<SpecularMaterial SpecularPower="29.8667">
				<SpecularMaterial.Brush>
						<SolidColorBrush Color="White" Opacity="1.000000"/>
				</SpecularMaterial.Brush>
			</SpecularMaterial>
		</MaterialGroup>
		<Transform3DGroup x:Key="walldoorT">
			 
				 
				<ScaleTransform3D ScaleX="0.1"  ScaleY="0.1"  ScaleZ="0.1" />
				<RotateTransform3D>
					<RotateTransform3D.Rotation>
						<AxisAngleRotation3D Angle="0" Axis="0 1 0"/>
					</RotateTransform3D.Rotation>
				</RotateTransform3D>
 
				<TranslateTransform3D OffsetX="9"  OffsetY="0" OffsetZ="-0.5" />
			 
		</Transform3DGroup>
		 
		<MeshGeometry3D x:Key="walldoorG"
			TriangleIndices="0,1,2 3,4,5 6,7,8 9,10,11 12,13,14 15,16,17 18,19,20 21,22,23 24,25,26 27,28,29 30,31,32 33,34,35 36,37,38 39,40,41 42,43,44 45,46,47 48,49,50 51,52,53 54,55,56 57,58,59 60,61,62 63,64,65 66,67,68 69,70,71 72,73,74 75,76,77 78,79,80 81,82,83 "
			Normals="0,1,0 0,1,0 0,1,0 0,1,0 0,1,0 0,1,0 0,0,1 0,0,1 0,0,1 0,0,1 0,0,1 0,0,1 0,0,1 0,0,1 0,0,1 0,0,1 0,0,1 0,0,1 0,0,1 0,0,1 0,0,1 0,0,1 0,0,1 0,0,1 1,0,0 1,0,0 1,0,0 1,0,0 1,0,0 1,0,0 0,0,-1 0,0,-1 0,0,-1 0,0,-1 0,0,-1 0,0,-1 0,0,-1 0,0,-1 0,0,-1 0,0,-1 0,0,-1 0,0,-1 0,0,-1 0,0,-1 0,0,-1 0,0,-1 0,0,-1 0,0,-1 -1,0,0 -1,0,0 -1,0,0 -1,0,0 -1,0,0 -1,0,0 0,-1,-2.22045e-016 0,-1,-2.22045e-016 0,-1,-2.22045e-016 0,-1,-2.22045e-016 0,-1,-2.22045e-016 0,-1,-2.22045e-016 0,-1,-2.22045e-016 0,-1,-2.22045e-016 0,-1,-2.22045e-016 0,-1,-2.22045e-016 0,-1,-2.22045e-016 0,-1,-2.22045e-016 9.29428e-008,-1,0 9.29428e-008,-1,0 9.29428e-008,-1,0 9.29428e-008,-1,0 9.29428e-008,-1,0 9.29428e-008,-1,0 -1,0,0 -1,0,0 -1,0,0 -1,0,0 -1,0,0 -1,0,0 1,0,0 1,0,0 1,0,0 1,0,0 1,0,0 1,0,0 "
			TextureCoordinates="1.58615,0.9995 0.88936,0.9995 1.08615,0.9995 1.08615,0.9995 1.38936,0.9995 1.58615,0.9995 0.876388,0.000499547 0.88936,0.000499547 0.88936,0.9995 0.876388,0.851134 0.876388,0.000499547 0.88936,0.9995 0.7828,0.851134 0.876388,0.851134 0.88936,0.9995 0.7828,0.851134 0.88936,0.9995 0.58615,0.9995 0.58615,0.9995 0.58615,0.000499547 0.7828,0.000499547 0.7828,0.851134 0.58615,0.9995 0.7828,0.000499547 0.88936,0.000499547 1.08615,0.000499547 1.08615,0.9995 1.08615,0.9995 0.88936,0.9995 0.88936,0.000499547 0.215341,0.000499547 0.38936,0.000499547 0.38936,0.9995 0.215341,0.851134 0.215341,0.000499547 0.38936,0.9995 0.215341,0.851134 0.38936,0.9995 0.0861497,0.9995 0.102364,0.851134 0.215341,0.851134 0.0861497,0.9995 0.0861497,0.9995 0.0861497,0.000499547 0.102364,0.000499547 0.102364,0.851134 0.0861497,0.9995 0.102364,0.000499547 0.38936,0.000499547 0.58615,0.000499547 0.58615,0.9995 0.58615,0.9995 0.38936,0.9995 0.38936,0.000499547 0.876388,0.000499547 1.10236,0.000499547 1.08615,0.000499547 1.08615,0.000499547 0.88936,0.000499547 0.876388,0.000499547 -0.2172,0.000499547 -0.41385,0.000499547 -0.61064,0.000499547 -0.61064,0.000499547 0.215341,0.000499547 -0.2172,0.000499547 0.7828,0.851134 1.21534,0.851134 1.10236,0.851134 1.10236,0.851134 0.876388,0.851134 0.7828,0.851134 -0.123612,0.851134 0.102364,0.851134 0.102364,0.000499547 0.102364,0.000499547 -0.123612,0.000499547 -0.123612,0.851134 -0.2172,0.000499547 0.215341,0.000499547 0.215341,0.851134 0.215341,0.851134 -0.2172,0.851134 -0.2172,0.000499547 "
			Positions="-90.7826,70.2609,6.26087 30.9565,70.2609,6.26087 30.9565,70.2609,-3.47826 30.9565,70.2609,-3.47826 -90.7826,70.2609,-3.47826 -90.7826,70.2609,6.26087 20.5217,-1.39019e-015,6.26087 30.9565,-1.39019e-015,6.26087 30.9565,70.2609,6.26087 20.5217,59.8261,6.26087 20.5217,-1.39019e-015,6.26087 30.9565,70.2609,6.26087 -20.5217,59.8261,6.26087 20.5217,59.8261,6.26087 30.9565,70.2609,6.26087 -20.5217,59.8261,6.26087 30.9565,70.2609,6.26087 -90.7826,70.2609,6.26087 -90.7826,70.2609,6.26087 -90.7826,-1.39019e-015,6.26087 -20.5217,-1.39019e-015,6.26087 -20.5217,59.8261,6.26087 -90.7826,70.2609,6.26087 -20.5217,-1.39019e-015,6.26087 30.9565,-1.39019e-015,6.26087 30.9565,7.72329e-016,-3.47826 30.9565,70.2609,-3.47826 30.9565,70.2609,-3.47826 30.9565,70.2609,6.26087 30.9565,-1.39019e-015,6.26087 -20.5217,7.72329e-016,-3.47826 -90.7826,7.72329e-016,-3.47826 -90.7826,70.2609,-3.47826 -20.5217,59.8261,-3.47826 -20.5217,7.72329e-016,-3.47826 -90.7826,70.2609,-3.47826 -20.5217,59.8261,-3.47826 -90.7826,70.2609,-3.47826 30.9565,70.2609,-3.47826 20.5217,59.8261,-3.47826 -20.5217,59.8261,-3.47826 30.9565,70.2609,-3.47826 30.9565,70.2609,-3.47826 30.9565,7.72329e-016,-3.47826 20.5217,7.72329e-016,-3.47826 20.5217,59.8261,-3.47826 30.9565,70.2609,-3.47826 20.5217,7.72329e-016,-3.47826 -90.7826,7.72329e-016,-3.47826 -90.7826,-1.39019e-015,6.26087 -90.7826,70.2609,6.26087 -90.7826,70.2609,6.26087 -90.7826,70.2609,-3.47826 -90.7826,7.72329e-016,-3.47826 20.5217,-1.39019e-015,6.26087 20.5217,7.72329e-016,-3.47826 30.9565,7.72329e-016,-3.47826 30.9565,7.72329e-016,-3.47826 30.9565,-1.39019e-015,6.26087 20.5217,-1.39019e-015,6.26087 -20.5217,-1.39019e-015,6.26087 -90.7826,-1.39019e-015,6.26087 -90.7826,7.72329e-016,-3.47826 -90.7826,7.72329e-016,-3.47826 -20.5217,7.72329e-016,-3.47826 -20.5217,-1.39019e-015,6.26087 -20.5217,59.8261,6.26087 -20.5217,59.8261,-3.47826 20.5217,59.8261,-3.47826 20.5217,59.8261,-3.47826 20.5217,59.8261,6.26087 -20.5217,59.8261,6.26087 20.5217,59.8261,6.26087 20.5217,59.8261,-3.47826 20.5217,7.72329e-016,-3.47826 20.5217,7.72329e-016,-3.47826 20.5217,-1.39019e-015,6.26087 20.5217,59.8261,6.26087 -20.5217,-1.39019e-015,6.26087 -20.5217,7.72329e-016,-3.47826 -20.5217,59.8261,-3.47826 -20.5217,59.8261,-3.47826 -20.5217,59.8261,6.26087 -20.5217,-1.39019e-015,6.26087 " />

The texture of the piece, that can be changed (remember to recompile), is included in the download. Important to note that it is inverted and deformed:

REMEMBER: to include the texture file in the .CSPROJ.

In the exercice that you can download we will install the "walldoor" at: -14 0 -5;

Look an image of the exercice runing:

To look the source codes and/or run the exercice, create a folder having the name of the .ZIP file and download it - right-clicking the link - and unzip inside the folder :

tu5v.zip

Try to recreate the exercice changing the code or some texture.

Liberate the firewall and play this web3d application:

We are doing our tests at a: Notebook DELL Latitude D600 - Intel Pentium M755 2.0 GHZ - Memory: 512 MB - VideoCard ATI Radeon 9000 32MB DDR 4xAGP - Resolution 1400x1050 - Communication: ADSL 256 kbps (Download: 45 kBps, Upload: 14 kBps)


PREVIOUS LESSON NEXT LESSON
T.CONTENTS HOMEPAGE