7
$\begingroup$

I'm using Blender for Unity3D game asset creation. The Array Modifier does something great (see below) that I would love to be able to do for arbitrary collections of objects. I'm hoping someone might provide instructions / pointers / plugin / ... to help achieve! So...

An unapplied Array Modifier creates an entity that behaves like a single mesh during export but can still be modified easily (e.g. change the curve, parameters, etc).

I wish to 'group' arbitrary objects to export the same way (possibly sub-including the results of an Array Modifier).

A concrete example

A table comprises legs and top.

The legs are identical so array-ed or group instanced (depending upon layout). (Those legs might internally use Curve Modifier which we want to tweak in the future and their spacing might also need tweaking (picture doing this with a long curving fence if you're thinking manual answers!)). On export, the arrayed legs appear as a single mesh (which appears in Unity3D as a single GameObject). Perfect!

The table top needs including (otherwise its separation degrades performance due to requiring an extra draw call).

  • Group-ing in Blender does nothing (that I can tell?).
  • Parent-ing them merely produces same parenting in Unity = same performance issue.
  • Join-ing them will make the single object but prevent easy future modification.

Potentials

My research found is-it-possible-to-group-several-objects-and-then-manipulate-them-scale-rotate which suggests both parenting and grouping but otherwise nothing.

The only potentials I see involves temporarily joining before / during export. This seems annoying overhead. 'Before' requires keeping the blend files outside Unity losing the lovely auto-update. IIUC Unity imports blend files through some magic Blender-invoking that does an FBX export. 'During' might involve some programming hooks that might join things during that export but not modify the original file?

All thoughts welcome! Thanks in advance!

$\endgroup$
  • 1
    $\begingroup$ Welcome to blender.SE! Unfortunately this question appears to be off-topic because Blender exports object grouping information in the FBX file, so the issue is on Unity3D's end. $\endgroup$ – Aldrik Aug 12 '13 at 15:36
  • $\begingroup$ @Aldrik I don't think this requires closing, the question is not about an issue with Unity or fbx, but about finding a possible solution in blender to efficiently group objects before export while keeping the objects editable. $\endgroup$ – Ray Mairlot Aug 12 '13 at 17:09
  • $\begingroup$ @RayMairlot The standard object grouping does this. This issue is that Unity is apparently not doing anything with this information. $\endgroup$ – Aldrik Aug 12 '13 at 17:37
  • $\begingroup$ @Aldrik You are right, despite reading the q several times it appears I was completely distracted by the mention of 'fbx' and 'export'. $\endgroup$ – Ray Mairlot Aug 12 '13 at 17:55
  • $\begingroup$ Does Unity import all layers? $\endgroup$ – wchargin Aug 12 '13 at 21:59
4
$\begingroup$

It seems that joining (CtrlJ) is exactly what you are looking for.

Joining shouldn't prevent future modification. Within the joined mesh, there will still be two disjoint islands (or five, if each leg is disjoint): the table top and the rest of the mesh.

If you want to separate it again to work with, you can use PBy Selection. You can even, immediately after joining, save the table top as a vertex group so you don't have to worry about selecting it again later, although the Select Linked function (L or Ctrl L) should work for that anyway.

Are there any other concerns for joining? If so, perhaps there's a workaround.

$\endgroup$
-1
$\begingroup$

The only answer I could offer would be to write a python script that will take your selected objects (the objects you are hoping to export as 1 game object), duplicate them, join them into one object, call the fbx export operator and then delete the duplicated object.

This has the benefit of automating the task for you, while leaving your original objects intact, but the disadvantage of not allowing unity to manage your files directly as you currently have.

$\endgroup$
  • $\begingroup$ It's my understanding that Unity manages assets directly via blender, so this would break the workflow. $\endgroup$ – Aldrik Aug 12 '13 at 17:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.