Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

DiffuseMaterial and GeometryModel3D SDK Problem

Closed Thread
 
Thread Tools Display Modes
Old 04-20-2006   #1 (permalink)
Roman
Guest


 

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));

Old 04-20-2006   #2 (permalink)
Jason [Mobiform]
Guest


 

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));
>



Old 04-20-2006   #3 (permalink)
Roman
Guest


 

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));
> >

>
>
>

Old 04-20-2006   #4 (permalink)
Roman
Guest


 

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));
> >

>
>
>

Old 04-21-2006   #5 (permalink)
Jordan Parker [MSFT]
Guest


 

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));
>> >

>>
>>
>>



Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi-select problem in Windows Explorer BIG PROBLEM!!!!!! Jim Hansen Vista General 3 12-16-2007 08:09 PM
Generic McAfee Problem Message in Vista Problem Reports cyberbuff53 Vista performance & maintenance 0 12-01-2007 07:55 AM
fixed unable to delete email problem, now I have new problem j2 Vista mail 19 03-29-2007 08:25 PM
Canvas as VisualBrush on GeometryModel3D : z-index problem znelson Avalon 5 03-26-2007 04:14 PM
Vista Upgrade Problem - Windows Explorer Loop problem Steve S Vista installation & setup 0 06-27-2006 10:15 AM








Vistax64.com 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 2005-2008

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