dimanche 10 mai 2015

Is there any way to add color to Model3D in WPF?

I am writing a program in WPF. I am using HelixToolkit to load models from file (I need to load several models from files) like this:

var importer = new HelixToolkit.Wpf.ModelImporter();
Model3D triangle = importer.Load("hand.obj");

ModelVisual3D Model = new ModelVisual3D();
Model.Content = triangle;
MainViewPort.Children.Add(Model);

And I need the entire Model3D, which I am getting from HelixToolkit, to change color (for example, it should be either red or black). Also I need to do it in realtime.

I found this: http://ift.tt/1PaeTMl, but in this case model is generated inside a program, and what I need to do is do the same to model from external file.

How can I do this?

Aucun commentaire:

Enregistrer un commentaire