playMaker

Author Topic: runtime FBX Exporter?  (Read 228 times)

wetcircuit

  • Junior Playmaker
  • **
  • Posts: 98
    • View Profile
    • wetcircuit.com
runtime FBX Exporter?
« on: October 27, 2020, 09:58:31 AM »
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?

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • View Profile
    • Can't code? Who cares! Make games anyway!
Re: runtime FBX Exporter?
« Reply #1 on: November 03, 2020, 03: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  :)
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

wetcircuit

  • Junior Playmaker
  • **
  • Posts: 98
    • View Profile
    • wetcircuit.com
Re: runtime FBX Exporter?
« Reply #2 on: November 04, 2020, 03: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.

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • View Profile
    • Can't code? Who cares! Make games anyway!
Re: runtime FBX Exporter?
« Reply #3 on: November 04, 2020, 05: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  :)
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

wetcircuit

  • Junior Playmaker
  • **
  • Posts: 98
    • View Profile
    • wetcircuit.com
Re: runtime FBX Exporter?
« Reply #4 on: November 04, 2020, 06: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!