hypodyne / Xaml-Exporter-for-Blender

A XAML Exporter for Blender
5 stars 6 forks source link

does not work with new Blender vision #1

Open Code-Author opened 4 years ago

Code-Author commented 4 years ago

I Tried but I cannot get this to work with the new Blender 2.81a. And I did go back and download Blender 2.79 and it work for it, but I do not know Blender 2.9. It is so so very different from Blender 2.81a. are you going to update this so it can work for the newest blender ?

tyanyuy3125 commented 4 years ago

I did a fix, and you can refer to my pull request for detail (if you still want a solution after months). Seems that this project is abandoned, perhaps I could take it over.

Shreyasj96 commented 3 years ago

@btb4198 Does it support exporting along with the animations?. If you have tried it, please let me know. Thanks

Code-Author commented 3 years ago

sorry I am just seeing this.

Code-Author commented 3 years ago

I did a fix, and you can refer to my pull request for detail (if you still want a solution after months). Seems that this project is abandoned, perhaps I could take it over.

does it work now? I did not see anything in the Pull request

tyanyuy3125 commented 3 years ago

Sorry for delaying, but @hypodyne has merged my PR into the master branch.

The plugin now supports mesh exporting but there are still some issues with UVs.

And, @Shreyasj96 , it does not support animation exporting.

tyanyuy3125 commented 3 years ago

This plugin is still unfinished and unstable, to convert blender models to XAML files with correct UVs, animations and on, I recommend using the import/export tool of helix-toolkit. (https://github.com/helix-toolkit/helix-toolkit)

Code-Author commented 3 years ago

what is Helix-toolkit ? and how does it work ? will I be able to use my blender models in WPF?

tyanyuy3125 commented 3 years ago

Helix-toolkit is a dotNET library designed for 3D graphics on WPF. It offers a few methods to convert your blender models to XAML code.

What you need to do is to create a new temporary C# project, and then install helix-toolkit via Nuget, then try the following code:

using HelixToolkit.Wpf;

...

model3DGroup = new ObjReader().Read(@"Your .obj file");
XamlExporter exporter = new XamlExporter();
FileStream fs = new FileStream(@"Your output .xaml", FileMode.Create);
StreamWriter sw = new StreamWriter(fs);
exporter.Export(model3DGroup, fs);

It's worth noticing that the output from the code above can be directly used in any WPF projects without installing helix-toolkit.

Code-Author commented 3 years ago

[image: image.png]

which one?

On Mon, Feb 8, 2021 at 7:31 PM Tianyu Huang notifications@github.com wrote:

Helix-toolkit is a dotNET library designed for 3D graphics on WPF. It offers a few methods to convert your blender models to XAML code.

What you need to do is to create a new temporary C# project, and then install helix-toolkit via Nuget, then try the following code:

using HelixToolkit.Wpf;

...

model3DGroup = new ObjReader().Read(@"Your .obj file"); XamlExporter exporter = new XamlExporter(); FileStream fs = new FileStream(@"Your output .xaml", FileMode.Create); StreamWriter sw = new StreamWriter(fs); exporter.Export(model3DGroup, fs);

It's worth noticing that the output from the code above can be directly used in any WPF projects without installing helix-toolkit.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hypodyne/Xaml-Exporter-for-Blender/issues/1#issuecomment-775610427, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHEPWLNUK4M5LGU6RVPAMEDS6CNAFANCNFSM4KE4XZHQ .

Code-Author commented 3 years ago

Do you have an example of how to convert a blender model to WPF using this ?

On Mon, Feb 8, 2021 at 7:46 PM Echo bboone900@gmail.com wrote:

[image: image.png]

which one?

On Mon, Feb 8, 2021 at 7:31 PM Tianyu Huang notifications@github.com wrote:

Helix-toolkit is a dotNET library designed for 3D graphics on WPF. It offers a few methods to convert your blender models to XAML code.

What you need to do is to create a new temporary C# project, and then install helix-toolkit via Nuget, then try the following code:

using HelixToolkit.Wpf;

...

model3DGroup = new ObjReader().Read(@"Your .obj file"); XamlExporter exporter = new XamlExporter(); FileStream fs = new FileStream(@"Your output .xaml", FileMode.Create); StreamWriter sw = new StreamWriter(fs); exporter.Export(model3DGroup, fs);

It's worth noticing that the output from the code above can be directly used in any WPF projects without installing helix-toolkit.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hypodyne/Xaml-Exporter-for-Blender/issues/1#issuecomment-775610427, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHEPWLNUK4M5LGU6RVPAMEDS6CNAFANCNFSM4KE4XZHQ .

tyanyuy3125 commented 3 years ago

The code I provided is all you need to write to convert. And I could not see the image you attached.

Code-Author commented 3 years ago

[image: HelixTook.png]

There are a few different ones in Nuget. Which one do I need?

On Mon, Feb 8, 2021 at 7:50 PM Tianyu Huang notifications@github.com wrote:

The code I provided is all you need to write to convert. And I could not see the image you attached.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hypodyne/Xaml-Exporter-for-Blender/issues/1#issuecomment-775617900, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHEPWLN2XCHVVD4IO4LW2I3S6CPILANCNFSM4KE4XZHQ .

tyanyuy3125 commented 3 years ago

HelixToolkit.Wpf

Shreyasj96 commented 3 years ago

@CodingEric Ok. Fine

Code-Author commented 3 years ago

Hi,

did you get my last email ? I made the xmal file, but How do I use it ? [image: error RedDevil.PNG]

On Mon, Feb 8, 2021 at 10:13 PM Shreyasj96 notifications@github.com wrote:

@CodingEric https://github.com/CodingEric Ok. Fine

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hypodyne/Xaml-Exporter-for-Blender/issues/1#issuecomment-775669163, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHEPWLIMVRPQVM7WZIZ4XH3S6DAAPANCNFSM4KE4XZHQ .

Code-Author commented 3 years ago

it does not come with an xmal.cs file

On Tue, Feb 9, 2021 at 10:45 AM Echo bboone900@gmail.com wrote:

Hi,

did you get my last email ? I made the xmal file, but How do I use it ? [image: error RedDevil.PNG]

On Mon, Feb 8, 2021 at 10:13 PM Shreyasj96 notifications@github.com wrote:

@CodingEric https://github.com/CodingEric Ok. Fine

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hypodyne/Xaml-Exporter-for-Blender/issues/1#issuecomment-775669163, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHEPWLIMVRPQVM7WZIZ4XH3S6DAAPANCNFSM4KE4XZHQ .

hypodyne commented 3 years ago

I can't run the latest blender on my computer, so won't be able to do anything.

tyanyuy3125 commented 3 years ago

@btb4198 Did you convert your blender model into .obj file? Otherwise it would have been an STFW problem. I am sorry that I might not be able to help solve those basic problems.

Code-Author commented 3 years ago

Yes I did... But I did not get a .cs file

Sent from my iPhone

On Feb 9, 2021, at 10:21 PM, Tianyu Huang notifications@github.com wrote:

 @btb4198 Did you convert your blender model into .obj file? Otherwise it would have been an STFW problem. I am sorry that I might not be able to help solve those basic problems.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

hypodyne commented 3 years ago

You get a .xaml file, Xaml does not need a code behind file. ( .cs )

Code-Author commented 3 years ago

So, why cannot I use it ?[image: error RedDevil.PNG]

On Wed, Feb 10, 2021 at 4:15 AM hypodyne notifications@github.com wrote:

You get a .xaml file, Xaml does not need a code behind file. ( .cs )

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hypodyne/Xaml-Exporter-for-Blender/issues/1#issuecomment-776636315, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHEPWLMEWWBVYBPCTCLYF5LS6JTELANCNFSM4KE4XZHQ .

Code-Author commented 3 years ago

error two [image: error two.PNG] Also, why cant I see it ?

On Wed, Feb 10, 2021 at 10:31 AM Echo bboone900@gmail.com wrote:

So, why cannot I use it ?[image: error RedDevil.PNG]

On Wed, Feb 10, 2021 at 4:15 AM hypodyne notifications@github.com wrote:

You get a .xaml file, Xaml does not need a code behind file. ( .cs )

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hypodyne/Xaml-Exporter-for-Blender/issues/1#issuecomment-776636315, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHEPWLMEWWBVYBPCTCLYF5LS6JTELANCNFSM4KE4XZHQ .

Code-Author commented 3 years ago

error two error RedDevil does anyone know why this is?

zhengwei9948 commented 6 months ago

I Tried but I cannot get this to work with the new Blender 4.0. are you going to update this so it can work for the newest blender ?

DoctorDib commented 3 months ago

I Tried but I cannot get this to work with the new Blender 4.0. are you going to update this so it can work for the newest blender ?

@hypodyne - I have created a pull request for to fix this issue, please see: https://github.com/hypodyne/Xaml-Exporter-for-Blender/pull/3

@zhengwei9948 - If you are still looking for a fix, simply rename io_export_xaml_2.8.py to io_export_xaml_28.py. Blender doesn't seem to like when you have 2.8.py.

zhengwei9948 commented 3 months ago

I Tried but I cannot get this to work with the new Blender 4.0. are you going to update this so it can work for the newest blender ?

@hypodyne - I have created a pull request for to fix this issue, please see: #3

@zhengwei9948 - If you are still looking for a fix, simply rename io_export_xaml_2.8.py to io_export_xaml_28.py. Blender doesn't seem to like when you have 2.8.py.

i have rename io_export_xaml_2.8.py to io_export_xaml_28.py. but in Blender 4.0,it can work,but the work result is wrong.

DoctorDib commented 3 months ago

I Tried but I cannot get this to work with the new Blender 4.0. are you going to update this so it can work for the newest blender ?

@hypodyne - I have created a pull request for to fix this issue, please see: #3 @zhengwei9948 - If you are still looking for a fix, simply rename io_export_xaml_2.8.py to io_export_xaml_28.py. Blender doesn't seem to like when you have 2.8.py.

i have rename io_export_xaml_2.8.py to io_export_xaml_28.py. but in Blender 4.0,it can work,but the work result is wrong.

How complicated is the model and what's wrong with the export?

Just some quick things to check:

hypodyne commented 3 months ago

Sorry for the late reply. I can't help with this as I cannot install blender 4.0 due to my old hardware. I have retired from programming aswell.

On Sat, 27 Apr 2024, 4:22 pm James, @.***> wrote:

I Tried but I cannot get this to work with the new Blender 4.0. are you going to update this so it can work for the newest blender ?

@hypodyne https://github.com/hypodyne - I have created a pull request for to fix this issue, please see: #3 https://github.com/hypodyne/Xaml-Exporter-for-Blender/pull/3 @zhengwei9948 https://github.com/zhengwei9948 - If you are still looking for a fix, simply rename io_export_xaml_2.8.py to io_export_xaml_28.py. Blender doesn't seem to like when you have 2.8.py.

i have rename io_export_xaml_2.8.py to io_export_xaml_28.py. but in Blender 4.0,it can work,but the work result is wrong.

How complicated is the model and what's wrong with the export?

Just some quick things to check:

  • Are all your face orientation correct?
  • Are all connecting Vertices merged?
  • what happens if you lower the poly count?
  • Have you tried installing the old blender and using the original exporter, does it produce the same defects in the model?
  • have you tried exporting a less complicated model first, e.g. a box or cylinder?

— Reply to this email directly, view it on GitHub https://github.com/hypodyne/Xaml-Exporter-for-Blender/issues/1#issuecomment-2080414004, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG33QXEH5NUZWTE6MS5SZDTY7NN4DAVCNFSM4KE4XZH2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBYGA2DCNBQGA2A . You are receiving this because you were mentioned.Message ID: @.***>

DoctorDib commented 3 months ago

Sorry for the late reply. I can't help with this as I cannot install blender 4.0 due to my old hardware. I have retired from programming aswell. On Sat, 27 Apr 2024, 4:22 pm James, @.> wrote: I Tried but I cannot get this to work with the new Blender 4.0. are you going to update this so it can work for the newest blender ? @hypodyne https://github.com/hypodyne - I have created a pull request for to fix this issue, please see: #3 <#3> @zhengwei9948 https://github.com/zhengwei9948 - If you are still looking for a fix, simply rename io_export_xaml_2.8.py to io_export_xaml_28.py. Blender doesn't seem to like when you have 2.8.py. i have rename io_export_xaml_2.8.py to io_export_xaml_28.py. but in Blender 4.0,it can work,but the work result is wrong. How complicated is the model and what's wrong with the export? Just some quick things to check: - Are all your face orientation correct? - Are all connecting Vertices merged? - what happens if you lower the poly count? - Have you tried installing the old blender and using the original exporter, does it produce the same defects in the model? - have you tried exporting a less complicated model first, e.g. a box or cylinder? — Reply to this email directly, view it on GitHub <#1 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG33QXEH5NUZWTE6MS5SZDTY7NN4DAVCNFSM4KE4XZH2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBYGA2DCNBQGA2A . You are receiving this because you were mentioned.Message ID: @.>

@hypodyne - Are you the only one that manages this repo, is it possible to get other people to continue supporting it? Also, retiring from programming, enjoy the new stress free life :P

DoctorDib commented 3 months ago

@zhengwei9948 - In regards to your issue, if it's related to missing faces then a quick fix is to triangulate your model faces. I have managed to find out that the XAML export will only work for faces that have either 3 or 4 vertices, any more or less will cause it to not load in the xaml 3D viewer.

I hope this helps :)