locked
Very very basic question RE 3d XAML RRS feed

  • Question

  • I am attempting to get a 3d object into Expression Blend 2.5

    I downlaoded Blender http://www.blender.org/download/get-blender/ and added the Xaml Exporter v0.44 from http://www.codeplex.com/xamlexporter/Release/ProjectReleases.aspx?ReleaseId=10234

    I then pasted the XAML created using the XAML exporter into a Silverlight 2 project created in Expression Blend 2.5 (please see XAML below under XAML EXPORTER v0.44 )

    Expression Blend returns Invalid XAML and that virtually all of the name tags used, for example Model3DGroup, GeometryModel3D etc 'do not exist in the namespace "http://schemas.microsoft.com/client/2007"'

    So I tried to create the 3D XAML by exporting a 3ds object from Viewer 3Ds http://www.wpf-graphics.com/Viewer3ds.aspx (please see XAML below under Viewer 3Ds )

    The XAML is quite different but equally Invalid XAML to Expression Blend 2.5

    I've had a look around for some really basic tutorials that might shd some light on where I am going wrong but have had no luck so far.

    Should I be placing the exported 3d XAML in <UserControl>, <Grid> or <Canvas>? (it doesn't seem to make any difference)

    Would really appreciate it if anyone could point out where I am going wrong or in the direction of a good tutorial on 3d XAML and Expression Blend.
    (I'm sure this http://www.kindohm.com/technical/WPF3DTutorial.htm is an excelent tutorial for developers but it's just too deep for me  I need something aimed more at Designers with some scripting and front end coding skills).

    Thanks


    XAML EXPORTER v0.44

    <Model3DGroup xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
        <GeometryModel3D x:Name="OB_Cube">
            <GeometryModel3D.Material>
                <DiffuseMaterial x:Name="MA_Material">
                    <DiffuseMaterial.Brush>
                        <SolidColorBrush Color="#cccccc"/>
                    </DiffuseMaterial.Brush>
                </DiffuseMaterial>
               
               
            </GeometryModel3D.Material>
            <GeometryModel3D.BackMaterial>
                <DiffuseMaterial x:Name="MA_Material_2">
                    <DiffuseMaterial.Brush>
                        <SolidColorBrush Color="#cccccc"/>
                    </DiffuseMaterial.Brush>
                </DiffuseMaterial>
               
               
            </GeometryModel3D.BackMaterial>
            <GeometryModel3D.Geometry>
                <MeshGeometry3D x:Name="ME_Cube_001"
     Positions="1.0 1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 1.0 -1.0 1.0 0.999999 1.0 -1.0 1.0 1.0 -1.0 -1.0 1.0 0.999999 -1.000001 1.0 1.0 1.0 -1.0 1.0 0.999999 1.0 0.999999 -1.000001 1.0 1.0 -1.0 -1.0 1.0 -1.0 -1.0 0.999999 -1.000001 1.0 -1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 -1.0 1.0 0.999999 1.0 1.0 1.0 -1.0 -1.0 1.0 -1.0 -1.0 1.0 1.0"
     Normals="0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 1.0 -0.0 0.0 1.0 -0.0 0.0 1.0 -0.0 0.0 1.0 -0.0 0.0 -0.0 -1.0 -0.0 -0.0 -1.0 -0.0 -0.0 -1.0 -0.0 -0.0 -1.0 -0.0 -1.0 0.0 -0.0 -1.0 0.0 -0.0 -1.0 0.0 -0.0 -1.0 0.0 -0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0"
     TextureCoordinates=""
     TriangleIndices="0 1 2 0 2 3 4 5 6 4 6 7 8 9 10 8 10 11 12 13 14 12 14 15 16 17 18 16 18 19 20 21 22 20 22 23"
    />
            </GeometryModel3D.Geometry>
        </GeometryModel3D>
    </Model3DGroup>







    Viewer 3Ds 

    <!-- Exported with Viewer3ds (www.wpf-graphics.com) (c) 2006 by Andrej Benedik. Original file name: 'C:\wpf-Graphics\cube.3ds' -->
    <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        >
      <DockPanel>
        <DockPanel.Resources>
    <MeshGeometry3D x:Key="mesh_0"
    Positions="1,0.9999999,-1 1,-1,-1 -1.0000001,-0.9999998,-1 -0.9999996,1.0000004,-1 1.0000005,0.9999995,1 0.9999993,-1.0000006,1 -1.0000004,-0.9999996,1 -0.9999999,1,1 "
    TriangleIndices="0 1 2  0 2 3  4 7 6  4 6 5  0 4 5  0 5 1  1 5 6  1 6 2  2 6 7  2 7 3  4 0 3  4 3 7  "
    TextureCoordinates=""
    Normals=""
    />

        </DockPanel.Resources>
        <Viewport3D Name="Viewport1" ClipToBounds="True">
          <Viewport3D.Camera>
    <PerspectiveCamera Position="-5.3707975,-3.1008315,2.8798024"
    LookDirection="5.37079755134726,3.10083141203332,-2.87980239851295"
    UpDirection="0,0,1"
    NearPlaneDistance="1"
    FarPlaneDistance="28"
    FieldOfView="50" />
          </Viewport3D.Camera>
          <ModelVisual3D>
            <ModelVisual3D.Content>
              <Model3DGroup>
    <GeometryModel3D Geometry="{StaticResource mesh_0}">
    <GeometryModel3D.Material><DiffuseMaterial><DiffuseMaterial.Brush><SolidColorBrush Color="#FF9B45AB" /></DiffuseMaterial.Brush></DiffuseMaterial></GeometryModel3D.Material>
    </GeometryModel3D>
    <DirectionalLight Color="#FFFFFFFF" Direction="0,0,-1" />

              </Model3DGroup>
            </ModelVisual3D.Content>
          </ModelVisual3D>
        </Viewport3D>
      </DockPanel>
    </Page>


         
    Monday, May 26, 2008 3:10 PM

All replies

  • Howdy
     
    Silverlight does not support 3D


    Cheers
    Learn Expression Blend at learnexpressionstudio.com -- my blog : http://x-coders.com/blogs/sneaky/default.aspx
    Tuesday, May 27, 2008 12:51 PM
    Moderator