How to export Line / Trail Renderers as obj or fbx?

Hello,

I am trying to implement a 3D drawing in Hololens and want to export the painting as obj or fbx file.
I am making use of OBJExporter to export selected game objects from my scene.
However this is not supporting Line or Trail renderers as they don’t have any mesh components.

Is there any way to export line renderer as well? Any link to existing script or logic on how to do it will be helpful.

Thanks!

Hi,

Unfortunately, there is currently no way to do this.

1 Like

Maybe you can try editable poly the line or rail

We have actually added support for this in Unity 2018.2: there is a new script API for particles, lines and trails, called BakeMesh, which will copy their geometry into a mesh.

1 Like

Could you provide a short example of how you would use BakeMesh? I cannot seem to find anything about it in the documentation. Thank you. I love the support that Unity provides on the forums.

Unity 2018.2 isn’t in beta yet, so isn’t available. Coming very soon though :slight_smile:

Also, docs don’t usually land until very near final release, so those won’t be online yet either.

Once it’s available, it’s pretty simple:

yourLineRenderer.BakeMesh(yourMesh);

:slight_smile:

1 Like