![]() |
|
Convert OpenGL materials to WPF - Printable Version +- AB4D Forum (https://forum.ab4d.com) +-- Forum: Products Forums (https://forum.ab4d.com/forumdisplay.php?fid=4) +--- Forum: Ab3d.PowerToys (https://forum.ab4d.com/forumdisplay.php?fid=9) +--- Thread: Convert OpenGL materials to WPF (/showthread.php?tid=4113) |
Convert OpenGL materials to WPF - abutler77 - 07-02-2018 I am finding a number of sites on the Internet that define material properties for various real world items. For example: http://www.it.hiof.no/~borres/j3d/explain/light/p-materials.html Is there some easy want to map the OpenGL definitions to WPF? Thanks, Arthur RE: Convert OpenGL materials to WPF - abenedik - 07-02-2018 Good find Arthur! You can use the following code to convert the samples from the web site you found to WPF: Code: //BrassAfter that you can assign materialGroup to a Material property. You get better results when you also add some AmbientLight to the scene - for example the following xaml does that: Code: <ModelVisual3D>RE: Convert OpenGL materials to WPF - abutler77 - 07-02-2018 Excellent! Thank you. |