-
Notifications
You must be signed in to change notification settings - Fork 9
.obj import
First of all I want to say that you should not really be using prop2mesh's obj support to import detailed game ready assets, it should be used to make shapes that you can't otherwise make. Storing large obj content on a dupe will substantially increase the time it takes to arm and paste the dupe, as well as network the meshes to others.
Due to the way prop2mesh stores the obj data on dupe files, rounding your vertices can reduce the file size by a significant amount.
Imagine a vertex:
x = 102.512623
y = 256.127382
z = 311.125363
Now if we round it:
x = 103
y = 256
z = 311
Now multiply that reduction by the number of vertices and it's easy to see how much less information is stored.
How:
First, you must apply all transforms to your model to freeze the vertex locations:
Next, click the "scripting" tab at the top of the Blender window. Click the "New" button, and paste the following python code (you can save it for later use and use the "Open" button if you want):
import bpy, math
for obj in bpy.context.scene.objects:
for vert in obj.data.vertices:
vert.co.x = round(vert.co.x)
vert.co.y = round(vert.co.y)
vert.co.z = round(vert.co.z)
After clicking the "Run" button, this will loop through every object in your scene and round all of their vertices, which will alter the geometry of your model, but in most cases, as long as the model is large enough, it will not be particularly noticeable.
Result:
If your model is symmetrical it makes no sense to import the entire thing. Instead, you can cut the model in half and attach it twice, the tool is smart enough to only upload and store each unique obj once.
In blender, select your entire model in edit mode and choose the bisect tool
Draw a line anywhere in the viewport and then alter the settings to match those shown below
Export the model as .obj and attach it to p2m as you normally would
Attach the model a second time, but make the scale negative and mess with the rotation until it looks right