Log inGet started
Package

position.procNode

Newest version

This package holds more than this page lists. See all of its files in its world.

README.md

sdf.position (procNode)

The point being evaluated, as a Field<Vec3>: the leaf a field of space is built on. Wired into field.noise or any other field of position, it makes that field evaluate wherever the shape is read, which is how sdf.displace takes noise. It takes no inputs.

Inputs

None.

Outputs

  • field (Field<Vec3>): the position each element is read at.

Example

local bumps = g.field.noise({ position = g.sdf.position(), frequency = 4, kind = "gradient" })
local rough = g.sdf.displace({ sdf = g.sdf.sphere({ radius = 0.5 }), amount = bumps, scale = 0.05 })
local mesh = g.sdf.mesh({ sdf = rough, resolution = 24 }).geometry