Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - DiffuseMaterial and GeometryModel3D SDK Problem

 
 
Old 04-20-2006   #1 (permalink)
Roman


 
 

DiffuseMaterial and GeometryModel3D SDK Problem

My attampt to associate a material (VisualBrush) with the mesh geomerty
failes. Nothing shows up;

ImageSource imageSource = new BitmapImage(new Uri(@"C:\done.JPG"));
ImageBrush imageBrush = new ImageBrush(imageSource);
Material diffuseMaterial = new DiffuseMaterial(imageBrush);
GeometryModel3D geometryModel3D = new GeometryModel3D(meshGeometry3D,
diffuseMaterial);
Model3DGroup model3DGroup = new Model3DGroup();
model3DGroup.Children.Add(geometryModel3D);

On the other hand, a solid color brush works fine

Material diffuseMaterial = new DiffuseMaterial(new
SolidColorBrush(Colors.DarkKhaki));


My System SpecsSystem Spec
Old 04-20-2006   #2 (permalink)
Jason [Mobiform]


 
 

Re: DiffuseMaterial and GeometryModel3D SDK Problem

TextureCoordinates!


"Roman" <Roman@discussions.microsoft.com> wrote in message
news:CF952186-8DFA-4D55-8697-0E5B3EBED297@microsoft.com...
> My attampt to associate a material (VisualBrush) with the mesh geomerty
> failes. Nothing shows up;
>
> ImageSource imageSource = new BitmapImage(new Uri(@"C:\done.JPG"));
> ImageBrush imageBrush = new ImageBrush(imageSource);
> Material diffuseMaterial = new DiffuseMaterial(imageBrush);
> GeometryModel3D geometryModel3D = new GeometryModel3D(meshGeometry3D,
> diffuseMaterial);
> Model3DGroup model3DGroup = new Model3DGroup();
> model3DGroup.Children.Add(geometryModel3D);
>
> On the other hand, a solid color brush works fine
>
> Material diffuseMaterial = new DiffuseMaterial(new
> SolidColorBrush(Colors.DarkKhaki));
>



My System SpecsSystem Spec
Old 04-20-2006   #3 (permalink)
Roman


 
 

Re: DiffuseMaterial and GeometryModel3D SDK Problem

Couldn't find any code examples. Do you have any?

"Jason [Mobiform]" wrote:

> TextureCoordinates!
>
>
> "Roman" <Roman@discussions.microsoft.com> wrote in message
> news:CF952186-8DFA-4D55-8697-0E5B3EBED297@microsoft.com...
> > My attampt to associate a material (VisualBrush) with the mesh geomerty
> > failes. Nothing shows up;
> >
> > ImageSource imageSource = new BitmapImage(new Uri(@"C:\done.JPG"));
> > ImageBrush imageBrush = new ImageBrush(imageSource);
> > Material diffuseMaterial = new DiffuseMaterial(imageBrush);
> > GeometryModel3D geometryModel3D = new GeometryModel3D(meshGeometry3D,
> > diffuseMaterial);
> > Model3DGroup model3DGroup = new Model3DGroup();
> > model3DGroup.Children.Add(geometryModel3D);
> >
> > On the other hand, a solid color brush works fine
> >
> > Material diffuseMaterial = new DiffuseMaterial(new
> > SolidColorBrush(Colors.DarkKhaki));
> >

>
>
>

My System SpecsSystem Spec
Old 04-20-2006   #4 (permalink)
Roman


 
 

Re: DiffuseMaterial and GeometryModel3D SDK Problem

Jason, I fugured it out. It works. Thanks

"Jason [Mobiform]" wrote:

> TextureCoordinates!
>
>
> "Roman" <Roman@discussions.microsoft.com> wrote in message
> news:CF952186-8DFA-4D55-8697-0E5B3EBED297@microsoft.com...
> > My attampt to associate a material (VisualBrush) with the mesh geomerty
> > failes. Nothing shows up;
> >
> > ImageSource imageSource = new BitmapImage(new Uri(@"C:\done.JPG"));
> > ImageBrush imageBrush = new ImageBrush(imageSource);
> > Material diffuseMaterial = new DiffuseMaterial(imageBrush);
> > GeometryModel3D geometryModel3D = new GeometryModel3D(meshGeometry3D,
> > diffuseMaterial);
> > Model3DGroup model3DGroup = new Model3DGroup();
> > model3DGroup.Children.Add(geometryModel3D);
> >
> > On the other hand, a solid color brush works fine
> >
> > Material diffuseMaterial = new DiffuseMaterial(new
> > SolidColorBrush(Colors.DarkKhaki));
> >

>
>
>

My System SpecsSystem Spec
Old 04-21-2006   #5 (permalink)
Jordan Parker [MSFT]


 
 

Re: DiffuseMaterial and GeometryModel3D SDK Problem

DanLehen has a good explanation of texture coordinates here:

http://blogs.msdn.com/danlehen/archi...06/489627.aspx

Jordan

"Roman" <Roman@discussions.microsoft.com> wrote in message
news:F5E1D0A1-85A6-4D12-9E78-088318531D11@microsoft.com...
> Jason, I fugured it out. It works. Thanks
>
> "Jason [Mobiform]" wrote:
>
>> TextureCoordinates!
>>
>>
>> "Roman" <Roman@discussions.microsoft.com> wrote in message
>> news:CF952186-8DFA-4D55-8697-0E5B3EBED297@microsoft.com...
>> > My attampt to associate a material (VisualBrush) with the mesh geomerty
>> > failes. Nothing shows up;
>> >
>> > ImageSource imageSource = new BitmapImage(new Uri(@"C:\done.JPG"));
>> > ImageBrush imageBrush = new ImageBrush(imageSource);
>> > Material diffuseMaterial = new DiffuseMaterial(imageBrush);
>> > GeometryModel3D geometryModel3D = new GeometryModel3D(meshGeometry3D,
>> > diffuseMaterial);
>> > Model3DGroup model3DGroup = new Model3DGroup();
>> > model3DGroup.Children.Add(geometryModel3D);
>> >
>> > On the other hand, a solid color brush works fine
>> >
>> > Material diffuseMaterial = new DiffuseMaterial(new
>> > SolidColorBrush(Colors.DarkKhaki));
>> >

>>
>>
>>



My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
the problem with ndis.sys Blue Screen of Death problem solved? Vista General
Re: Windows Mail Attachement Problem and Adobe Player Problem with IE8 Vista mail
Generic McAfee Problem Message in Vista Problem Reports Vista performance & maintenance
Vista Upgrade Problem - Windows Explorer Loop problem Vista installation & setup


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

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