Skip to content

Repository files navigation

.NET 8 Avalonia 11.3 OpenGL ES 3.0 MIT License

Cross-platform Build PRs Welcome

VirtualPath Core

A cross-platform 3D scene engine with PBR rendering, real-time editing, and multi-viewport support — built with Avalonia UI + OpenGL.

Edit, visualize, and export 3D scenes with a modern dark-themed interface.


Features

PBR Rendering

Physically Based Rendering with Cook-Torrance BRDF, metallic-roughness workflow, IBL-ready lighting, and normal/albedo texture mapping.

Multi-Viewport

Up to 4 simultaneous views: Perspective + Top / Front / Right orthographic projections with dynamic reflow layout and per-viewport labels.

Primitive Library

Built-in primitives: Cube, Sphere, Cylinder, Cone, Torus — each with generated geometry, custom colors, and PBR materials.

Transform Editing

Real-time position, rotation, and scale sliders with numeric readouts. Gizmo overlay for visual translation.

GLTF Import

Import GLTF/GLB models with full mesh data: positions, normals, texture coordinates, and node hierarchy.

MSAA Anti-Aliasing

Configurable multi-sample anti-aliasing (up to 16x) for crisp, high-quality rendering.

Interactive Gizmo

RGB axis gizmo at selected object position with distance-adaptive scaling for precise manipulation.

Grid & Axis Indicator

Configurable scene grid with subdivisions and a 3-axis orientation widget in the viewport corner.

Undo / Redo

Full undo/redo support for scene modifications (add, delete, transform, material changes) with 100-level stack.

Dark Theme

Modern Apple-inspired dark UI with card-based layout, consistent typography, and smooth interactions.


Screenshots

(Replace these with actual screenshots of your app)

Multi-Viewport Layout
Multi-Viewport Layout

Architecture


Image

Design Principles

  • MVVM Architecture — Clean separation between UI and business logic via CommunityToolkit.Mvvm with source generators
  • Abstraction-First — IGraphicsHost<T> interface decouples the GL context from rendering services
  • Observable Everywhere — INotifyPropertyChanged drives both UI updates and render invalidation
  • Thread-Safe Scene — Lock-free snapshot pattern for thread-safe scene iteration during rendering

🛠️ Technology Stack

Category Technology
UI Framework Avalonia UI 11.3 — cross-platform desktop
Language C# 12 (.NET 8.0) with nullable reference types
Graphics API OpenGL ES 3.0 via Silk.NET 2.22
MVVM Toolkit CommunityToolkit.Mvvm 8.4 — source generators
Model Import GLTF/GLB via Silk.NET.Assimp + custom parser
Serialization System.Text.Json for project files (.vpproj)
Packaging Single executable with self-contained publish support

Getting Started

Prerequisites

  • .NET 8.0 SDK or later
  • A GPU with OpenGL ES 3.0 support (integrated or discrete)

Build & Run

# Clone the repository
git clone https://github.com/yourusername/VirtualPath-Core.git
cd VirtualPath-Core

# Build the solution
dotnet build

# Run the desktop application
dotnet run --project VirtualPathCore.Desktop

Publish as Standalone

dotnet publish VirtualPathCore.Desktop -c Release -r win-x64 --self-contained

Controls

Input Action
Left-click + drag Orbit camera
Scroll wheel Zoom in/out
Right-click + drag Pan camera
Click object in tree Select object
Slider drag Modify transform / material

Project Structure

VirtualPath-Core/
├── VirtualPathCore/                    # Core library
│   ├── Contracts/                      # Abstraction interfaces
│   ├── Graphics/
│   │   ├── Core/                       # Scene graph, Transform, Camera, Material, Light
│   │   └── OpenGL/                     # Renderer, Shader, Mesh, Texture, Buffer
│   ├── Helpers/                        # MeshFactory, Math utilities, Converters
│   ├── Models/                         # Serializable data models
│   ├── Resources/
│   │   ├── Shaders/                    # GLSL shaders (PBR, Grid, Gizmo)
│   │   ├── Languages/                  # i18n JSON files (zh-CN, en-US)
│   │   └── Themes/                     # UI theme resources (Dark)
│   ├── Services/                       # Scene management, settings, i18n, undo/redo
│   ├── ViewModels/                     # MVVM view models
│   └── Views/                          # Avalonia XAML+code-behind
└── VirtualPathCore.Desktop/            # Desktop host executable

Roadmap

  • PBR rendering pipeline
  • Primitive generation (Cube, Sphere, Cylinder, Cone, Torus)
  • GLTF model import
  • Multi-viewport layout
  • Transform editing (position, rotation, scale)
  • Undo / Redo system
  • Translation gizmo
  • Dark theme UI
  • Rotation & scale gizmo
  • Material editor (texture selection)
  • Scene hierarchy drag-and-drop
  • Export to GLTF
  • Scene animation / keyframing
  • Linux & macOS packaging

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the project
  2. Create your feature branch (git checkout -b feat/amazing-feature)
  3. Commit your changes (git commit -m 'feat: add amazing feature')
  4. Push to the branch (git push origin feat/amazing-feature)
  5. Open a Pull Request

📄 License

Distributed under the MIT License. See LICENSE for more information.


Made with ❤️ by anomalyco

About

VirtualPath Core is a cross-platform 3D scene engine and real-time editor built on Avalonia UI and OpenGL ES 3.0

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages