> [!abstract] Summary
> Overview of the coordinate spaces used when shading and texturing — World, Object, UV, and Pref (rest position) — plus when to use each. Picking the right space is the difference between a texture that follows an animated character correctly and one that swims across the surface.
---
# Why coordinate spaces matter
The same noise node can produce a completely different result depending on whether it reads World, Object, UV, or Pref coordinates.
> [!important] Rule of thumb
> Textures should **stick to the surface as it deforms and moves**. That usually means avoiding World space and choosing Object, UV, or Pref depending on the situation.
---
# The main coordinate spaces
| Space | Origin / frame | Follows deformation? | Follows animation? | Typical use |
| ---------- | ------------------------------------- | -------------------- | ------------------ | --------------------------------------------------- |
| **World** | Global scene origin | ❌ No | ❌ No | Environment / fog noise tied to world. Scatter work |
| **Object** | Object local origin (pre-deformation) | ❌ No | ✅ Yes | Single non-deforming props |
| **UV** | 2D texture coordinates on the surface | ✅ Yes | ✅ Yes | Painted textures, tiled tileable textures |
| **Pref** | Reference / rest pose position | ✅ Yes | ✅ Yes | Procedural noise on deforming geometry |
---
# World
- Coordinates relative to the **global scene origin**.
- The texture **does not move with the object** — the object slides through the noise as it animates.
- Useful when you want the texture to belong to the environment (e.g. world-space fog, dust, or a wide noise overlay on a locked-down shot).
> [!warning] Can be usefull to use on instances
> If you use World space on many instances, each instance samples a different region of the noise → they all look different. Making nice variations on it
---
# Object
- Coordinates relative to the **object's local origin**, before deformation.
- The texture **sticks to the object's rigid transform** (translate / rotate / scale follow the object).
- Simple and reliable for **non-deforming props**.
> [!warning] Fails on deforming geometry
> On rigged characters, cloth sim, or any deforming mesh, Object space does **not** follow the deformation — the texture will swim across the surface during animation.
---
# UV
- 2D parametric coordinates laid out on the surface during **UV unwrapping**.
- **Follows the surface perfectly** — even under heavy deformation — because UVs are stored per-point and travel with the geometry.
- The standard choice for **painted textures** (Substance, Mari, Photoshop maps).
> [!tip] Good to know
> - UVs can have seams, stretching, and overlapping regions — lookdev needs to check for these.
> - For tileable textures, you can scale the UVs in the shader without touching the unwrap.
> - For environments, **Triplanar projection** is a workaround when UVs are not worth authoring (megascans assemblies, large environments).
---
# Pref — Reference Position
**Pref** (short for "Point Reference" or "Position Reference") stores the **rest-pose position** of each point of the mesh as a primitive attribute. The shader then reads Pref instead of the animated `P` attribute when sampling procedural textures.
Result: procedural noise, cellular patterns, worley etc. behave as if the mesh was **frozen in its rest pose**, regardless of how it deforms or animates afterwards.
## When to use Pref
- Procedural textures (noise, cellular, voronoi) on a **deforming character, cloth, or muscle system**.
- Any case where you want a 3D procedural to **stick to the surface during animation**.
## How it works
1. At rest pose (T-pose, bind pose, frame where the mesh is undeformed), the current point positions are **baked into a `rest` / `pref` attribute**.
2. During animation, the deformer modifies `P` but **leaves `rest` / `pref` untouched**.
3. The shader reads `rest` / `pref` when evaluating procedural textures.
## How to set it up
| Software | Node / workflow |
| -------------- | ----------------------------------------------------------------------------------- |
| **Houdini** | Add a `rest` attribute with a `Rest SOP` or `Rest Position SOP` before deformation |
| **Maya / Arnold** | `aiUserDataVector` reading the `Pref` attribute, or use `state -> Pref` |
| **Renderman** | `PxrAttribute` reading `Pref`, or use built-in reference space options |
> [!tip] Without a Pref attribute, Arnold / Karma fall back to Object space — so your procedural will swim across the surface as it deforms.
---
# Quick decision guide
> [!todo] Which space should I pick?
> - **Painted texture from Substance / Mari** → **UV**
> - **Procedural noise on a non-deforming prop** → **Object**
> - **Procedural noise on a deforming character / cloth** → **Pref**
> - **Environment fog / world-locked noise** → **World**
> - **Texturing many instances with consistent look** → **Object**
> - **Unwrapping would be expensive (environment assemblies)** → **Triplanar in World or Object space**
---
# Further reading
- Houdini docs: `rest` and `rest2` attributes — standard workflow for Pref in Solaris / Karma
- Arnold docs: User data and reference positions