Preparing a Model in 3ds Max
This article explains what a model should look like to end up in the Light Stream scene at the right size, right side up, and without losses. It talks about 3ds Max, but the requirements are the same for any 3D editor: what matters to the program is not what the model was made in, but what is written in the *.obj file. The import process itself is covered in the article Importing OBJ Models.
A model for Light Stream should be prepared not to look "prettier" but to be "clearer." There will be no beautiful rendering here: the program displays the object with a simple fill and a single texture. On the other hand, snapping works off the model's vertices, and its objects become rows in a list that you will scroll through for the entire project — so what matters most is the correct scale, clean geometry, and meaningful names.
What Carries Over Into Light Stream and What Doesn't
| Carries Over | Doesn't Carry Over |
|---|---|
|
|
Units and Scale
Coordinates are taken from the file as they are: there is no scaling window on import, so you won't be able to adjust the size "on the way in."
The Light Stream scene is measured in millimeters: one file length unit equals one millimeter. A facade 30 m tall should take up 30,000 units in the file, and a single pixel of an LED strip — thirty to forty units. The easiest way to check the scale is with a cube created in the program itself: a cube sized 1000 × 1000 × 1000 is a one-meter cube — place it next to the model and compare.
In 3ds Max it's most convenient to work like this: set the system units to millimeters and model at real-world size — then nothing needs to be recalculated on export, and the scale factor stays at 1. If the scene was built in other units, set the scale factor on export: from meters — 1000, from centimeters — 10, from inches — 25.4.
A units mistake is the most common reason "nothing is visible" after import. A model exported in meters ends up a thousand times smaller than it should be and gets lost among the fixtures; a model accidentally scaled up a thousand times moves kilometers away from the origin, and the camera shows emptiness.
Orientation
Up in the Light Stream scene is the Z axis — just as in 3ds Max. So in the OBJ export settings, uncheck the Flip YZ-axis checkbox (which swaps axes for Y-up): with it checked, the model will end up lying on its side in the scene. If the model does end up on its side, toggle this checkbox and export again.
Before exporting, it's useful to reset transforms and place the model in 3ds Max where it should end up relative to the origin: the position of objects relative to one another and the coordinates from the file are preserved completely on import.
Splitting into Objects and Names
The file is parsed into separate objects, and each of them becomes a row in the 3D Objects window with its own visibility checkbox, its own material, and its own lock. The rules are simple:
- All geometry must be inside named objects. Anything written to the file before the first object is not imported.
- Every object must have a name. An unnamed object or group cuts off the reading of the file: anything written below it will no longer make it into the scene, and the model will arrive only half-complete.
- Names must be in Latin characters, no Cyrillic. Cyrillic letters in object names and file names turn into a string of question marks on import.
- Split by meaning: "facade", "roof", "column_left". A model made of one solid piece will be a single row in the list — you won't be able to hide or recolor part of it later.
- Don't overdo the opposite either: several hundred small objects turn the 3D Objects list into an endless ribbon that's inconvenient to search through.
Polygons
Light Stream reads triangles and quads. Faces with five or more vertices are silently skipped — there will be holes in the scene where they should be.
So in the export settings, in the Faces group, choose Triangles or Quads, not Polygons. Before exporting, collapse the modifiers and convert the objects to a polygon mesh: NURBS, patches, bodies with boolean operations, and other non-tessellated objects will either not make it into the OBJ, or will make it in looking different from how they looked in the viewport.
One more requirement for the geometry: don't export vertex colors. If the exporter appends the vertex's color to its coordinates as well, such a vertex won't be read correctly, and the faces that reference it will end up built from someone else's points — the model will arrive turned inside out.
Normals
Normals must be written to the file — in the export settings this is the Normals checkbox. The program uses them to calculate shading: without normals, the object is drawn as one flat fill in the background light color, that is, it looks like a flat dark silhouette with no volume.
Smoothing groups by themselves aren't read, but there's no need to set them up separately either: the exporter writes the result of smoothing into the normals, and the object arrives in the scene just as smooth or faceted as it was in the editor.
Light Stream has no backface culling — a face is visible from both sides, so a part turned inside out won't disappear. But a normal pointing away from the light kills the shading: such a face will be noticeably darker than its neighbors. If there are dark patches on the model after import, check the direction of the normals in the editor.
Lines for Fixtures
Lines written to the file arrive in the scene as ready-made splines — you can place fixtures along them right away, without having to trace the edges by hand. This is the most convenient way to bring the paths of strips, garlands, and contour lighting into Light Stream: draw them as splines in 3ds Max in their proper place, and in the program all that's left is to link them to the mapping.
For the lines to come through:
- enable their export — the Shapes/Lines checkbox in the OBJ export settings;
- convert the splines to polylines with the required number of points: curves are written to the file as segments, and the smaller the step, the more points will arrive in the scene;
- join the segments into a single line. Each line in the file becomes a separate spline, so a path assembled from unconnected segments will arrive as a scattering of short splines;
- turn off the export of texture coordinates if the splines don't appear: some exporters append them to the line entries too, and Light Stream skips such lines.
There's no need to make a separate object for fixtures: light sources from 3ds Max are not saved into OBJ at all. If you'd also like to bring pre-placed fixtures into the program, export the model to *.fbx — from there, in addition to objects and splines, individual fixtures come through as well.
Materials and Textures
OBJ stores materials in a separate file next to the model, and textures are separate images too, so enable material export and always move the whole model together, the entire folder.
What you should know about materials in advance:
- One object — one material. A multi-component material (Multi/Sub-Object) is carried over as only one of its parts. If parts of a piece should be different colors, split the piece into objects by material.
- Only the base color and base texture are taken from the material. Opacity, reflections, bump, self-illumination, and any procedural maps are ignored — it's better to bake them into an ordinary image or not rely on them at all.
- Textures are ordinary JPG, PNG, BMP, or GIF images. Put them next to the model or in a subfolder: the program looks for the file by name in neighboring folders as well. File names must be in Latin characters.
- A texture needs a UV unwrap. An object without an unwrap will get the texture smeared into a single color.
- Light Stream has no self-illuminating materials. If a part should look like it's glowing — a sign, a screen, a light line — turn on the Glow checkbox for it after import, in the Material section of the Properties window.
Color, texture, and glow can also be assigned entirely by hand once in the program, so for utility geometry you don't need to set up materials in the editor at all: an object with no material arrives white.
Model Complexity
The model becomes part of the project file entirely, so its weight is the project's weight, its opening time, and the GPU load on every preview frame. And in the program the mesh takes up more space than in the editor: each face is stored with its own vertices.
A reasonable minimum of preparation before exporting:
- delete everything not visible on the object: insides, the reverse side, hidden details, helper objects, duplicate copies;
- remove small details that won't be visible in the preview: bolts, profiles, texture detail, one-millimeter chamfers;
- reduce the number of segments on fillets and pipes — smoothness is expensive;
- leave vertices where they're needed: Snap to Vertices works off them, and fixtures will land precisely on corners and edges. If a row of fixtures should run along a flat wall, add edges to the model along its border.
Export Order
- In the 3ds Max scene, gather only what should go to Light Stream: the model itself and the lines for fixtures.
- Collapse the modifiers, convert the objects to a polygon mesh, delete anything hidden or unnecessary.
- Check the object names: they must exist, and they must be in Latin characters.
- Check the dimensions and bring the model to the "one unit — one meter" scale.
- Export the selection to
*.obj. - In the export settings: Faces — Triangles or Quads; Normals — enable; Texture coordinates — enable if there are textures; Shapes/Lines — enable if the scene has lines for fixtures; Flip YZ-axis — uncheck; material export — enable.
- Save the model, the material file, and the textures in a single folder and import from there.
The exporter reserves the first line of the resulting file for a service entry about itself — if you edit the file by hand, don't delete it: on import the first line isn't read, and anything you put in its place will be lost along with it.
What to Check After Import
- Press Z in the 3D View window with nothing selected — the camera will frame the whole scene. Create a cube sized 1000 × 1000 × 1000 next to it and compare: if a one-meter cube next to the facade looks like a one-meter cube, the scale is correct.
- Look at the 3D Objects list: are all the parts there, are their names readable, did the splines from the lines come through.
- Fly the camera around the model and look for holes where complex faces were and dark patches where normals were flipped.
- Make sure the objects aren't white or gray, if you exported materials.
Anything that doesn't match up is more reliably fixed in 3ds Max and re-imported: geometry can't be fixed with Light Stream's own tools, and a model fixed in the editor can also be reused in other projects.
What Else Will Be Useful
- How the import itself goes and what to do with the model in the scene — Importing OBJ Models.
- Names, visibility, lock, and materials of imported objects — 3D Objects.
- Snap to vertices and the other buttons of the 3D View window — 3D Toolbar.
- How to place fixtures along a finished model — Adding 3D Splines and Linking 2D and 3D.