← Changelog

Polygonjs 2.0.58

SDF modeling, exporters, environment lighting

·built with Jai 0.2.029

  • Breaking The primitives take their sweep angles in DEGREES. geo/Sphere (phiStart, phiLength, thetaStart, thetaLength), geo/Tube and geo/Capsule (thetaStart, thetaLength) and geo/Torus (arc) all used radians. A saved scene keeps the number it stored, so a half sweep that read 3.14 now reads as 3.14 degrees. Retype the angle you want: a full turn is 360.
  • Breaking A partial sweep needs the new open toggle. geo/Sphere, geo/Tube, geo/Capsule and geo/Torus only cut their sweep when open is on, so a scene that cut it with the angle alone comes back whole. Turn open on.
  • Breaking geo/Tube’s openEnded is now caps, which means the opposite and is on by default. A scene that had openEnded on loses that setting and gets its caps back, so turn caps off.
  • Breaking The manifold primitives are always built about their own middle. geo/M3DBox and geo/M3DTube lose centered, and geo/M2DPlane’s center changes from a toggle to an in-plane offset. Offset them with center, which a translate manipulator now drags in the viewer. geo/Circle’s center is a 2D offset in the circle’s own plane rather than a 3D position.
  • Breaking A light’s lightSize is merged into softness. One number now sizes the PCF blur, the PCSS penumbra and the shadow an SDF object marches for itself, and it is a fraction of the light’s frustum rather than a count of shadow-map texels. Raising the shadow resolution no longer narrows the soft edge. Retune softness on lights that had it set.
  • Breaking geo/ManifoldDebug is now geo/ManifoldDisplay, and it reports an error rather than only drawing. A scene saved with the old node drops it on load, so rebuild it.
  • New Model with signed distance fields. The geo/SDF* nodes are out: primitives (SDFSphere, SDFBox, SDFBoxFrame, SDFCapsule, SDFTorus, SDFTube, SDFRoundCone, SDFEllipsoid, SDFOctahedron, SDFPyramid, SDFTriPrism, SDFHexPrism, SDFPlane, SDFSolidAngle), their 2D counterparts (SDFCircle, SDFBox2D, SDFEllipse2D, SDFHexagon2D, SDFEquilateralTriangle2D, SDFSegment2D), geo/SDFBoolean for union, subtraction and intersection with a hard, rounded or chamfered seam, and the shaping nodes SDFRound, SDFOnion, SDFElongate, SDFMirror, SDFRepeat, SDFExtrude, SDFRevolve and SDFSlice. An SDF object is raymarched in the viewer, so you shape the field itself and only turn it into a mesh when you want one. Start from SDF Boolean Basic.
  • New geo/SDFImprint marks one SDF object with another: a raised pad, a recess, a groove or an engraving. geo/SDFSeam builds the joint between two of them as a solid rod, for a weld bead, a piping or a trim line. Each SDF primitive carries its own colour, roughness and metalness, so a boolean keeps every part looking like itself: SDF Boolean with different colors.
  • New geo/SDFTriangulate converts an SDF back to a mesh, to a closed solid, or, from a 2D field, to its outline. It marches on a cell count or a cell size, takes an isoValue to grow or shrink the surface, and its solid output goes straight into the exporters: SDF for 3D printing.
  • New geo/SDFCreate turns real geometry into a field, so a mesh can be blended, hollowed or imprinted like a primitive. geo/SDFBuilder defines a field from the code/SDF* nodes inside it, for a shape none of the primitives cover.
  • New Four exporters. geo/GLTFExporter writes binary glTF (.glb) with per-object transforms and material colours, export-gltf. geo/ThreeMFExporter writes 3MF with units, several objects and colour, export-3mf. geo/OBJExporter writes Wavefront OBJ with one named block per object, export-obj. geo/DXFExporter writes DXF R12 for laser cutters and CNC, with cut and engrave lines on separate layers, export-dxf. PLY and STL merge their input objects so nothing is silently left out: export-ply, export-stl.
  • New The geo/PrinterPrepare polynode puts a model in the state a printer expects, in one node: it checks the model is a closed solid, turns the scene’s Y-up into the Z-up every slicer reads, scales the scene unit into millimetres, and measures the result against the build volume. It errors before an exporter writes a file that cannot be printed.
  • New geo/Environment lights the whole scene from one environment map, with a background mode to show it or hide it. The geo/EnvironmentHelper polynode puts a mirror ball and a matte grey ball in the scene so you can read what the map is doing. tex/FileHDR loads Radiance .hdr files, and the editor gets an HDRI and EXR picker with real image previews.
  • New geo/MaterialAttributes sets colour, roughness, metallic and emission on geometry in one node, and those attributes survive a manifold boolean.
  • New The geo/DimensionDisplay polynode writes a part’s size beside it, per axis, in millimetres and inches, which is the readout someone wants before downloading a file: showing a part’s size. geo/DimensionPromote converts geometry between 2D and 3D.
  • New geo/FileOBJ imports Wavefront .obj geometry, with presets. tex/Color fills a texture with a flat colour, for any input that wants a texture but only needs a constant. geo/VolumeSmooth smooths a volume’s voxel values.
  • New render/Taa is available, to allow temporal antialiasing. It’s currently useful to have smooth edges when modeling with SDF nodes.
  • Improved A glTF compressed with Draco or meshopt now imports. 2.0.57 refused those files with an error naming the extension, which is still what happens for an extension Polygon does not support.
  • Improved A node can WARN as well as error. A warning marks the node and reaches the logger without stopping the graph, and geo/AttributeDisplay is the first to use it. A polynode also surfaces the error of the node inside it rather than failing silently.
  • Improved Expressions do more. bbox() and centroid() take a node path, so bbox("/geo1/box1").size.x reads another node’s bounds. format(value, decimals) turns a number into a string, which is what lets a StringParam read "X " + format(bbox("/box1").size.x, 1) + " mm". A cycle between expressions is detected and reported instead of looping.
  • Improved geo/GroupCreate gains byPattern: build a group from the members of groups that already exist, or by entity index, using the same syntax as any other group field.
  • Improved Manipulators translate on the XY plane, and the manifold primitives carry one for center.
  • Improved geo/Text gains vertical alignment, handles line breaks properly, and describes itself in the help panel.
  • Improved geo/Merge preserves the object groups of its inputs. geo/Delete no longer clones its input, so it is faster on large scenes. geo/Wireframe emits one segment per edge rather than one per half edge. geo/Clip interpolates attributes across the cut.
  • Improved geo/SceneGLTF references nodes by relative path, names and lays out the generated sub-graph better, and gets a flight helmet preset.
  • Improved The 3MF export carries colour, writes the tags Bambu Studio reads, and drops its pretty printing to keep files small.
  • Improved code/TextureSample2D gains mipMapBias, and the code context gets divide and invert through MathBinary and MathUnary.
Also in this release
  • The wireframe hotkey is G, and Shift+G walks the cycle backwards. It was Ctrl+W, which browsers take to close the tab, so it never worked on the web.
  • Fixed: a crash when creating a node with Enter from the tab menu, a crash when dropping a polynode with no inputs onto a connection, a crash when clicking a read-only panel in the LLM tab, and a crash on resize in the web build, which the blog embeds were hitting.
  • Fixed: the colour picker did not match the colour it was editing when used for the renderer background. A node context menu could be opened from outside the network panel. Renderer leaks and a double free on the GPU side.