Playmaker Forum

PlayMaker Feedback => Action Requests => Topic started by: wetcircuit on October 27, 2020, 12:58:31 PM

Title: runtime FBX Exporter?
Post by: wetcircuit on October 27, 2020, 12:58:31 PM
It looks like recent versions of Unity's FBX Exporter can work at runtime.

There is some sample (incomplete?) code here:
http://wiki.unity3d.com/index.php/ObjExporter

I'm illiterate when it comes to C#. I understand the gist, but not how to make it happen at runtime on my procedural meshes.  :-[

Is it possible to trigger this with Playmaker in a standalone build? Assign one of my scene objects, and then export to an FBX on the hdd?
Title: Re: runtime FBX Exporter?
Post by: mdotstrange on November 03, 2020, 05:33:46 PM
Do you want to export to .fbx or to .obj like the sample link you posted?

Let me know and I'll see if I can make an action for it-

btw: I really like your Cutsceneartist site. Its the most helpful/useful site I've found when it comes to real time filmmaking stuff so thanks  :)
Title: Re: runtime FBX Exporter?
Post by: wetcircuit on November 04, 2020, 05:39:14 AM
Hi thank you... ;D

I pasted the wrong link, here is Unity's example code for a runtime FBX export (which I'd intended to paste)
https://docs.unity3d.com/Packages/com.unity.formats.fbx@2.0/manual/devguide.html

But tbh, runtime export of static models is my immediate need…. (Unity has no official OBJ exporter)

Lots of Unity Assets for importing… but I use a specific procedural modeler in Unity, and would like to build a little app that can create a model and export it for casual users to load in other 3D programs.

So OBJ or FBX… honestly which ever works.
Title: Re: runtime FBX Exporter?
Post by: mdotstrange on November 04, 2020, 07:29:59 AM
Ok- do you want to export from a skinned mesh renderer or a normal mesh renderer?

Hmm that Unity code includes "using UnityEditor;" so that code sample doesn't work at runtime-

It says " Currently a custom importer/exporter needs to be written in order to do so, as the FBX Exporter is Editor only."

I'm not that good at coding yet but I'll see what I can do  :)
Title: Re: runtime FBX Exporter?
Post by: wetcircuit on November 04, 2020, 08:41:11 AM
8) I mean, exporting a skinned mesh sounds like boss-level super powers, hahaha

but the Editor export FBX does work well with skinned meshes (my experience). I'm guessing that what works for skinnedmeshes would also work for static meshes…

I personally would find a use for both, ha!
Title: Re: runtime FBX Exporter?
Post by: Maart on January 10, 2022, 04:41:14 AM
did someone got this to work?