Wings 3D Development Forum
Wings3d to Unity ports - Printable Version

+- Wings 3D Development Forum (https://www.wings3d.com/forum)
+-- Forum: Wings 3D (https://www.wings3d.com/forum/forumdisplay.php?fid=1)
+--- Forum: Design & Development (https://www.wings3d.com/forum/forumdisplay.php?fid=6)
+--- Thread: Wings3d to Unity ports (/showthread.php?tid=2881)

Pages: 1 2


Wings3d to Unity ports - digitaldavinci - 01-02-2020

Just a bullet list:
To align the Cartesian coordinates between Wings and Unity
After building a model in Wings3d, rotate the selection to export 180 degrees on the Y axis.
I have no other way to get these two systems to talk correctly in this effort unless I am missing something.
I am always open to correction or new insights.


RE: Wings3d to Unity ports - digitaldavinci - 01-03-2020

With Wings and unity open with projects linked by created objects the developer can make changes to the
wings model either the Material or selected object. Then when the Wings selected object is exported the Unity serialization process gets triggered due to folder change the model change appears in Unity automagically!
This makes the two application looked like they are linked.
I am doing this on an Asus Intel I7, GTX960m laptop. And the process is sweet.
I have spent the last 5 years waiting for this integration to perform flawlessly and now we have it.

When performing UV mapping the idea is not to do to much in Wings. Just build the model and UV map it. No need to import images to map to. Yes this would still get to Unity but it is not necessary as Unity has shader capabilities. Just make your models and align the selection cuts in the AUV window.
I am using Amplified Shader editor in Unity to create wonderous overlays.
Now I have physics, colliders, and materials in a real time environment.
The power of Wings is a phenomenal creation tool. And using Unity to implement motion adds icing to the grandest of cakes creating a delicious eye candy of an effort.

In UV map generation the most effort is put into deciding the match between the segments cuts and the positioning of the ASE shaders in Unity. It can be fun and tedious. But watching the results unfold before your eyes is deeply satisfying.


RE: Wings3d to Unity ports - digitaldavinci - 01-09-2020

And here we go.
https://www.youtube.com/watch?v=kr9EDOYk79E


RE: Wings3d to Unity ports - micheus - 01-09-2020

Let see if I understood that right: Did you create a plugin for Unity to "interact" with Wings3D?


RE: Wings3d to Unity ports - digitaldavinci - 01-11-2020

I wish. I am the plugin. The idea was to get the workflow down to a minimal robotic process.
Because I have no need to use an imported image in Wings I am not concerned with image mapping. The idea is I segment the object for cuts then align the minor maps in the UV map window. Then simply export selected. With Unity open the change in the file properties triggers Unity to auto refresh. So with Wings and Unity open at the same time I just bounce to and fro sliding UV minors around till I get the mapping lined up.
Now with Amplify Shader editor open I can edit the shader there that is applied to the imported object.
This works really slick even with the exporting/importing step. I hammered this down pat to alleviate most headaches. My notes are a cobbled set of issues, steps, warnings and concerns when in some future I have to return to this process.
It is full proof as long as I always RMB on selected object, LMB on UVmapping. MMB or RMB only on necessary restarts.
The real tweaking and artistry are in the UV map window.
For the model in the video I solved the 'Start meets End' circular lap by just moving the last vertical edge in UVMapping window to the right till the lap was as good as I could get it. Since this process is not dealing with integrated products this was the real effort.
I wanted to duplicate the ease of Moray/Pov-ray as close as possible and spent five years making steps until Unity finally got up to speed with its current set of advances. When an integration plugin is created that will possibly be a Blender killer making Wings3D the primary tool for modeling. Probuilder in Unity is a sad tool and I don't know if Unity will make a choice for a better integrated tool. They are getting too big and there is a sloppy infrastructure underneath as of the date of this post.
The sneaky trick on tori is to cut the midline loop on the internal structure, loop all verticals and unmap to a cylinder. So with this now it is possible to create really complex models. Also in my efforts I only need boolean addition, subtraction and difference. Limited I know but my thinking is that the other complex functions might not pass muster in segmenting to a UV map. Might be more complimented work than I want to pursue at this time. When I want to research another set of headaches then that is where I will start. I believe different complexities will create different workflows. Obviously... But the effort might only be the straightening out UV minors in the mapping window. In this last scenario I have seen abominations of UV minors show up that are nearly impossible to unfold.


RE: Wings3d to Unity ports - micheus - 01-11-2020

digitaldavinci Wrote: To align the Cartesian coordinates between Wings and Unity
After building a model in Wings3d, rotate the selection to export 180 degrees on the Y axis.
I have no other way to get these two systems to talk correctly in this effort unless I am missing something.
No you are not missing anything.
Usually, most the other 3D app may need the Z axis be switched with Y axis and then we have an option for that in the exporters (Swap Y and Z axes). So, as Unity uses a third variation we may need to add an option to switch the X and Z axes:

Rotating 180° in Y axis doesn't looks like you can get the correct representation of the same object in both app.

digitaldavinci Wrote: With Wings and unity open with projects linked by created objects the developer can make changes to the wings model either the Material or selected object. Then when the Wings selected object is exported the Unity serialization process gets triggered due to folder change the model change appears in Unity automagically!
In this scenario, I think the proper solution is to create a Unity plugin able to read wings files. If you are able to serialise the importer process in Unity, that should to work fine.


RE: Wings3d to Unity ports - digitaldavinci - 01-11-2020

"Rotating 180° in Y axis doesn't looks like you can get the correct representation of the same object in both app."
Then the Z axis is reversed. From what I remember. I had so many hurdles to cross some info got waylaid into never, never land. For this it why I created the XYZ vector model and include that with the other imports to alleviate any mysteries. What I had posted before is to leave the model alone and just inverse the X direction vector if that possible.

"In this scenario, I think the proper solution is to create a Unity plugin able to read wings files. If you are able to serialise the importer process in Unity, that should to work fine. "
But the modelling workflow is still in Wings3D. The only way to integrate would be to port the ERL to C#, create a DLL with exposed methods. Or Expose the methods in the Wing3D ERL code to create a DLL but then there are two sets of code to manage. But then the ERL modules maintain original integrity. But this would really shake up the graphics world in a very big way. The temptation would be to sell out the finalized product if Unity offered. And down the corporate rabbit hole it goes.
I have 30 years experience in C and this is getting me curious. Though I have enough cats in the bag at the moment, lol. I don't look forward to reading memory dumps any more.
Thanks for the reply.

What I am getting to here is if the transfer to Unity can be automated by a couple of switches or methods then the rest of the cards will fall into place. No glitz, all process. Unity already is triggered by folder and file change events in the OS. This would facilitate a tighter export/import with Unity and forego any code migrations at this juncture. Of course a bullet list type help concerning this model porting process would be a large mystery dispelled. You can have my somewhat accurate notes if you want. Its a doc file. I have been holding onto it in case there is a gotcha I missed.
On my Alcubierre model I have static imaging to still perform and this will have to happen in Wings3D as Unity stresses this is where the process happens.
What I want to do next is execute some of Dave Brinnen's convoluted models and import them to Amplify Shader and see what happens. Should be most interesting. But this adds an immense amount of vectors that maybe a surface shader could handle. I have performance measuring tools in Unity to check this out.

It is an extremely interesting time we live in.


RE: Wings3d to Unity ports - micheus - 01-11-2020

Switch Z and X axes it's something we can add.

I thought you was thinking to be able to change the model in W3D and then, in Unity it be automatically reloaded using the serialisation feature.
I read a little the Unity docs and it seems to be possible to write a script to import non native file formats. Thinking about that, if it's possible serialise a script like that, then we don't need to write a DLL for that (which makes it multiple platform) and Unity would to reload the model.

Expect Wings3D to automate an export operation is something that probably will not happen. But, auto save its own format is already there.


RE: Wings3d to Unity ports - digitaldavinci - 01-12-2020

Yes, Unity serialization does auto update when you export from Wings3d to the projects directory.
It initial appears as a game object model. When you drag that to the scene heirarchy it turns into a prefab.
Either way the object is auto updated in Unity. So a gameobject also automatically refreshes in the scene and that is the cool part of all this.
Here is what the ex/import does from wings3D to Unity. Wings on the left and unity on the right.
The x vector labels are on the negative side in wings and the positive side in unity.


RE: Wings3d to Unity ports - micheus - 01-12-2020

Yes, I know. It's the same I tried to spot in the post #6 and the reason I said we could add an option to the exporter. Smile
I believe that would to improve a little users to forward W3D models to Unity.

But, for what I read here, I think that creat a importer script at Unity side would make your workflow even easier. That was what I tried to suggest in the previous post.