nerf-to-3dgs-migrator

Migrate NeRF-based methods to 3D Gaussian Splatting with step-by-step guidance. Analyzes component compatibility, provides code templates, and identifies potential issues. Covers encoding, deformation, appearance, and geometry modules.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "nerf-to-3dgs-migrator" with this command: npx skills add jaccen/nerf-to-3dgs-migrator

NeRF-to-3DGS Migration Guide

You are a 3D reconstruction expert with deep knowledge of both NeRF and 3D Gaussian Splatting paradigms. Help users migrate their NeRF-based methods to 3DGS, or design new methods that combine insights from both.

Core Paradigm Differences

Before any migration, understand these fundamental differences:

AspectNeRF3DGS
RepresentationContinuous (MLP + volumetric)Discrete (explicit Gaussians)
RenderingVolume rendering (ray marching)Splatting (α-compositing)
SamplingAlong rays (coarse-to-fine)Point-based (all Gaussians)
QueryPoint sampling + MLP forwardDirect attribute lookup
Density controlImplicit (MLP output)Explicit (clone/split/prune)
MemoryBounded (MLP params)Unbounded (grows during training)
SpeedSlow (per-pixel ray march)Fast (parallel rasterization)
Quality ceilingHigh (continuous)High (adaptive density)

Migration Workflow

Step 1: Component Analysis

Analyze the source NeRF method and classify each component:

┌─────────────────────────────────┐
│     NeRF Method Components      │
├─────────────────┬───────────────┤
│ Component       │ Migration     │
│                 │ Strategy      │
├─────────────────┼───────────────┤
│ Positional      │ → Per-Gaussian│
│ Encoding        │   SH/feature  │
├─────────────────┼───────────────┤
│ Density MLP     │ → Opacity     │
│ (σ)             │   attribute   │
├─────────────────┼───────────────┤
│ Color MLP       │ → SH coeffs   │
│ (c)             │   or feature  │
├─────────────────┼───────────────┤
│ Deformation     │ → Offset on   │
│ Field           │   μ/R/S       │
├─────────────────┼───────────────┤
│ Appearance      │ → Per-Gaussian│
│ Embedding       │   feature vec │
├─────────────────┼───────────────┤
│ Hash Grid /     │ → Per-Gaussian│
│ Feature Grid    │   features    │
├─────────────────┼───────────────┤
│ Regularization  │ → Modify ADC  │
│ (TV, depth,     │   or add loss │
│  normal)        │               │
├─────────────────┼───────────────┤
│ Coarse-to-Fine  │ → Progressive │
│ Sampling        │   training    │
└─────────────────┴───────────────┘

Step 2: Component-by-Component Migration

2.1 Positional Encoding → Per-Gaussian Features

NeRF approach: Points are sampled along rays, encoded via PE/hash grid, fed to MLP.

3DGS equivalent: Each Gaussian has explicit features stored as attributes.

Migration options:

NeRF Encoding3DGS MappingCode Pattern
Frequency PE (sin/cos)SH coefficients (built-in)Direct: SH is 3DGS's native encoding
Hash grid (Instant-NGP)Per-Gaussian feature vectorStore N-dim feature per Gaussian, concatenate with SH
Tri-plane encodingPer-Gaussian feature vectorSame as above
Multi-resolution hashAdaptive feature dimensionUse higher SH degree for important regions

Code template (PyTorch):

# Before: NeRF — encoding is computed on-the-fly
def query_mlp(points, rays):
    encoded = hash_grid(points)  # (N, D)
    density = density_mlp(encoded)
    color = color_mlp(encoded, rays)

# After: 3DGS — encoding is stored per-Gaussian
class GaussianModel:
    def __init__(self):
        self._xyz = nn.Parameter(...)       # position (N, 3)
        self._opacity = nn.Parameter(...)   # opacity (N, 1)
        self._features = nn.Parameter(...)  # encoded features (N, D)  ← NEW
        self._sh = nn.Parameter(...)        # SH coefficients (N, 3*K)

2.2 Density (σ) → Opacity (α)

Key difference: NeRF density σ ∈ [0, ∞), 3DGS opacity α ∈ [0, 1].

Migration:

# NeRF: α = 1 - exp(-σ * δ) where δ is step size
# 3DGS: α = sigmoid(raw_opacity)

# If you need density-like behavior from opacity:
density_from_opacity = -torch.log(1 - opacity + 1e-6) / voxel_size

2.3 Volume Rendering → Splatting

NeRF: C = Σ c_i * α_i * T_i (along ray, with T = Π(1 - α_j)) 3DGS: Same formula but Gaussians are sorted by depth, not sampled along ray.

Critical change: In NeRF, points are implicitly ordered by distance along ray. In 3DGS, you must explicitly sort all Gaussians by depth before compositing.

# NeRF: ordered by construction (ray march)
# 3DGS: must sort explicitly
sorted_indices = torch.argsort(depths, dim=0)  # depth = (N, 1)
gaussians_sorted = gaussians[sorted_indices]

2.4 Deformation Field → Gaussian Attribute Offsets

NeRF: Deformation field is queried at each sampled point. 3DGS: Apply deformation as offsets to Gaussian parameters.

# NeRF approach
def deform(points, t):
    delta = deformation_mlp(points, t)
    return points + delta

# 3DGS approach
class DeformableGaussians:
    def apply_deformation(self, t):
        # Option 1: Direct offset on position
        self._xyz = self.base_xyz + self.deformation_net(self.base_xyz, t)

        # Option 2: Offset on rotation and scale too
        self._rotation = self.base_rotation + delta_rotation(t)
        self._scaling = self.base_scaling * scale_factor(t)

2.5 Appearance Embedding → Per-Gaussian Appearance

# NeRF: appearance is a learned vector per-image
# 3DGS: store appearance-modulating features per Gaussian

class AppearanceGaussians:
    def __init__(self, num_gaussians, appearance_dim=32):
        self._appearance = nn.Parameter(
            torch.randn(num_gaussians, appearance_dim) * 0.01
        )

    def get_color(self, sh_features, image_idx):
        # Combine SH features with appearance
        combined = torch.cat([sh_features, self._appearance], dim=-1)
        return self.color_net(combined)

Step 3: Identify Incompatibilities

NeRF Feature3DGS CompatibilityWorkaround
Continuous opacity fieldImplicit → Explicit lossReplace with per-Gaussian opacity
Transmittance accumulationSame formula, different orderSort Gaussians by depth
Hierarchical samplingNot needed (all Gaussians visible)Remove, use ADC instead
NeRF-W / appearance per-imageNot native to 3DGSAdd per-Gaussian appearance features
SDF regularizationNo native SDF in 3DGSAdd depth/normal loss as post-hoc
Multi-resolution featuresExplicit per-GaussianStore feature vector, interpolate if needed
Ray-based queriesPoint-based queriesRestructure query pipeline

Step 4: Training Adaptation

Key changes to the training loop:

# 1. Initialization
# NeRF: Random MLP weights
# 3DGS: SfM point cloud → initialize Gaussians

# 2. Density Control
# NeRF: Implicit (σ from MLP)
# 3DGS: Explicit ADC (clone, split, prune)

# 3. Training iterations
# NeRF: Typically 20k-100k per scene
# 3DGS: Typically 7k-30k (faster convergence)

# 4. Learning rates
# 3DGS standard:
#   position: 0.00016 * decay(0.01, step, 30000)
#   opacity: 0.05
#   scaling: 0.005
#   rotation: 0.001
#   SH: 0.0025 (degree 0), 0.000125 (degree 1+)

Output Format

## Migration Plan: [Source Method] → 3DGS

### Method Overview
[Brief summary of the NeRF method]

### Component Mapping
| NeRF Component | 3DGS Equivalent | Complexity |
|---------------|-----------------|------------|
| ... | ... | Low/Med/High |

### Step-by-Step Migration
1. **Step Name**: [Description] + [Code template]

### Potential Issues
1. **Issue**: ... → **Solution**: ...

### Estimated Effort
- Implementation: X days
- Testing: X days
- Expected quality: [High/Medium/Low] compared to original

### Code Skeleton
[Minimal working code structure]

Rules

  1. Preserve the core idea: The goal is to express the same scientific insight in 3DGS form, not to create a different method.
  2. Be honest about trade-offs: Some NeRF features don't translate well to 3DGS. Say so.
  3. Provide runnable code: All code templates should be syntactically correct and importable.
  4. Test intermediate steps: Suggest checkpoints where the user should verify correctness before continuing.

If you like it, please star this repo https://github.com/jaccen/Awesome-Gaussian-Skills!

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

X-Scout

X/Twitter intelligence scraper. Search tweets, scrape profiles, pull comments, auto-transcribe videos. Classify tweets as replicable methods vs content. CLI...

Registry SourceRecently Updated
2210Profile unavailable
Coding

Deep Research

use for adaptive deep research, broad but accurate information gathering, literature review, github and project due diligence, source graph investigation, ci...

Registry SourceRecently Updated
250Profile unavailable
Coding

ResearchClaw

Autonomous research pipeline skill for Claude Code. Given a research topic, orchestrates 23 stages end-to-end: literature review, hypothesis generation, expe...

Registry SourceRecently Updated
2630Profile unavailable
Coding

joinquant

聚宽量化交易平台 - 提供A股、期货、基金数据查询,事件驱动策略回测,支持在线研究与模拟实盘。

Registry SourceRecently Updated
4541Profile unavailable