42
$\begingroup$

Situation

I have obtained some blender files & licences for 3d models of transit vans and some trucks. Currently, when I export these objects to .obj files they are rather large, take a while to render and look to have been built in segments.

Problem

These models need to be used on Android devices and they need to be observable through one .obj file. What is happening is when I open the .obj I am not seeing the same model as I do in Blender. The doors and wheels of the vans for instance don't appear.

End Product

I need to find a way of reducing these models to be just one single object. Items on the interior of the van don't matter, seats for example. The file would ideally also be around 200kb, and exportable in a single .obj file. Can anybody shed some light on how I would go about doing this?

$\endgroup$

migrated from gamedev.stackexchange.com Aug 28 '13 at 16:26

This question came from our site for professional and independent game developers.

59
$\begingroup$

Remove the objects you no longer want in your model, like the interior objects. Then select all of your objects that you want in a single model and hit Ctrl + J then click Join selected meshes. The multiple objects will now be one model you can export.

For further reducing the complexity of the model for better performance, you'll need to either remove more objects before joining them or you need to remove details from the objects you want to keep.

$\endgroup$
  • 1
    $\begingroup$ To further aid anybody who stumbles across this. I found the decimator modifier very good for reducing the overall size of the exported .obj file. $\endgroup$ – Alec. Sep 13 '13 at 9:43
  • $\begingroup$ For also future use... use the Select Linked command to select the individual meshes inside the object! $\endgroup$ – 835 Jun 5 '15 at 15:31
  • 2
    $\begingroup$ How do I select all of the part that I want to? I clicked on all of them and they were a light blue,does that mean they are all selected? I could still not combine them into one whole,I did ctrl + J. $\endgroup$ – user16892 Sep 3 '15 at 22:26
  • $\begingroup$ I use "B" for box-selecting, but I can not get Ctrl+J to join the meshes either. $\endgroup$ – tmighty Sep 20 '15 at 18:57
  • 1
    $\begingroup$ At least in some cases, it appears to help if you clear parents of the objects being joined. $\endgroup$ – Samuli Kärkkäinen Nov 28 '15 at 11:30
4
$\begingroup$

As you have stated that you want to also make the objects "lighter", I have a suggestion for you.

The models that are not optimized for games usually have a lot of unnecessary edge loops which add extra triangles. While they can be removed using the Decimator modifier, the more proper way to do it is to use the Limited Dissolve command.

After combining the objects into one, just TAB into edit mode, press A two times to select all faces and then press X and select Limited Dissolve.

This will combine all the planar connected faces into one face and thus reducing the number of triangles.

$\endgroup$
2
$\begingroup$

If you want to join meshes through Blender's Python API:

item='MESH'
bpy.ops.object.select_all(action='DESELECT')
bpy.ops.object.select_by_type(type=item)
bpy.ops.object.join()

where item can take any of the following values according to this documentation:

[‘MESH’, ‘CURVE’, ‘SURFACE’, ‘META’, ‘FONT’, ‘ARMATURE’, ‘LATTICE’, ‘EMPTY’, ‘CAMERA’, ‘LAMP’, ‘SPEAKER’]
$\endgroup$

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.