One of the reasons why we currently only support the .obj file format is we try to make the model loading process really simple and robust. Lots of corner cases are taken care of "automagically" by p3d.in. Here are the details of what's going on when you upload your mesh file.
Geometry
There's no need to triangulate your models, all polygon types including triangles, quads and n-gons are supported.
Some tools will give you the option to export as NURBS or polygon mesh, in that case choose polygon mesh.
Some tools will give you the option to export edges or lines, in that case disable that option since edges will be ignored by p3d.in.
Vertex Normals
Rendering of smooth shaded surfaces requires vertex normals. If your model comes with its own vertex normals we will happily use them, if not we will generate our own. In this case your model might look slightly different than it does in your 3D application.
UV Map
If you plan to add texture maps make sure your model includes the corresponding UV Map and the exporter is set up to save it.
Aligning and orientation
To make navigation easier p3d.in will automatically "fit" your model to the center of the screen.
Any incorrect model orientation should be easily fixable inside the interactive viewer. However for the sake of clarity, we use the standard Left Handed Coordinate System. Most exporters will default to this configuration.
Size
File size is currently limited to 100 MB per model. This is to prevent browser freezing problems on low end computers and mobile devices.
Sculpted or scanned models can be larger than 100 MB. We recommend reducing the amount of polygons with a decimator. We have prepared a video tutorial about doing just that in the free software Blender.
.MTL files
The .obj file contains all the geometry data but the .mtl file contains information about your object's materials and is used to automate some of the material setup and texture assignment. Your 3D software of choice will often export this file alongside the .obj.
The .mtl keywords supported by p3d.in are:
.MTL Keyword |
Type |
Description |
newmtl |
String |
Creates a new material with a given name. |
Kd |
RGB |
The diffuse constant color. |
map_Kd |
Texture map |
The texture map for the diffuse channel. Can include transparency. |
Ks |
RGB |
The specular reflection constant color. |
map_Ks |
Texture map |
The specular reflection color texture. |
Ns |
Float |
The specular glossiness value. |
map_Ns |
Texture map |
The specular glossiness grayscale texture. |
d |
Float |
The opacity value. |
map_refl or refl |
Texture map |
The spherical reflection map. |
map_Ke |
Texture map |
The glow or emissive map. |
map_ao |
Texture map |
The ambient occlusion map. |
map_normal |
Texture map |
The tangent space normal map. |
map_bump |
Texture map |
The bump map texture. |