Getting Started

Pine3D

A full 3D rendering engine for TradingView, powered by Pine Script v6, with meshes, transforms, perspective projection, lighting, shadows, depth sorting, culling, and data visualization primitives.

Updated Publisher Alien_AlgorithmsPine Script v6
TradingView Library
Pine3D Graphical Rendering Engine
Open the published Pine3D library and add it to your Pine Script workflow.

What is Pine3D?

Pine3D lets Pine developers describe what to draw while the library handles world transforms, camera math, projection, depth ordering, visibility, lighting, caching, and TradingView drawing limits.

It supports both scene composition and data visualization. The same engine can render a lit mesh scene, a dense contour surface, a categorical bar chart, a streaming oscillator ribbon, or a 500-point scatter cloud.

A renderer built for Pine constraints
Pine3D is designed around the platform’s hard limits of 100 polylines, 500 lines, and 500 labels. Its rendering backends and caches focus on extracting useful 3D geometry from those fixed budgets.

Rendering pipeline

  • Transform local mesh vertices into world space.
  • Move world geometry into camera space.
  • Apply back-face and near-plane culling.
  • Drop hidden geometry with sparse raster occlusion.
  • Depth-sort visible faces and overlays.
  • Apply diffuse lighting and shadow tests.
  • Project 3D points into TradingView drawing coordinates.
  • Emit polylines, lines, linefills, and labels.

Chainable, tag-addressable API

Four-line scene compositionpine
p3d.Mesh box = p3d.cube(40.0, color.orange)
  .setTag("hero")
  .rotateBy(0.0, 45.0, 0.0)

scene.add(box)
scene.lookAt("hero")
p3d.render(scene)

Meshes and overlays can carry tags. Tags let you retrieve, target, animate, and remove scene objects without retaining a separate variable for every item.

Core capabilities

Geometry
Cubes, spheres, cylinders, tori, planes, grids, discs, custom topology, and merged meshes.
Camera
Perspective positioning, targets, orbit controls, and field-of-view scaling.
Light
Directional and point lighting, ambient shading, cast shadows, and self-shadowing.
Surfaces
Contour-band heightmaps with bridge stitching and in-place updates.
Charts
Bars3D, Trail3D, scatter clouds, labels, lines, and polylines.
Renderer
Culling, occlusion, depth sorting, drawing backends, and automatic cache management.

Where to go next

Pine3D is created by Alien_Algorithms. Import the published library with Alien_Algorithms/Pine3D/1.

Pine3D is a graphical rendering library for Pine Script. TradingView drawing, execution, and publication limits still apply. © Alien_Algorithms.