A 3D modeling and rendering programming language utilizing SDFs.

Overview

ForgedThoughts is a modeling and rendering programming language utilizing SDFs and is in early development.

For documentation and examples see the Website.

image

Goals

Forged Thoughts strives to create high-quality distance field models for rendering and poligonization. It utilizes multi-threaded CPU based rendering in 64-bit to prevent the limitations of SDFs on the GPU. The focus is on quality, rather than speed.

The overall project goals are:

  • Create signed distance fields for rendering and poligonization.
  • Focus is on quality rather than speed (although all example render in just a few hundred ms on my machine).
  • CPU based rather than GPU based. All computation is done in 64-bit.
  • Provide an easy but powerful syntax to model and render SDFs without any limitations.
  • Access to all SDF modeling primitives, modifiers and tricks (In progress).
  • Various integrated renderers (TODO)\
  • Animation( TODO)
  • Object hierarchies by including sub-class scripts (TODO)
  • Share objects and materials via an integrated database (TODO)
  • Model and work with 2D SDFs and Text as an overlay to the 3D layer (TODO)
  • Terrain (TODO)
  • Physics (TODO)

Example

The above helmet was created with the following code:

camera.origin.z = 0.75;

settings.width = 600;
settings.height = 600;

settings.background = F3("444");
settings.antialias = 5;
//settings.opacity = 0.0;

let phong = Phong();
phong.specular = F3(0.5, 0.5, 0.5);
settings.renderer = phong;

let light = PointLight();
light.position = F3(3.0, 3.0, 5.0);
light.intensity = 1.5;

// Main shape

let sphere = Sphere(0.24);
let cone = Cone(0.3, 0.25, 0.0);

let helmet = smin(sphere, cone, 0.5);
helmet.material.rgb = F3("9F6F4A");

// Make it hollow

let cut_out = helmet.copy();
cut_out.position.y -= 0.04;
cut_out.scale = 0.98;

helmet -= cut_out;

// Eye holes

let eyes = Ellipsoid();
eyes.size = F3(0.10, 0.03, 0.1);
eyes.position.x = 0.07;
eyes.position.y -= 0.03;
eyes.position.z = 0.3;
eyes.mirror.x = true;
helmet -= eyes;

// Nose and mouth

let cut = Box(F3(0.07, 0.2, 0.1));
cut.position.y -= 0.25;
cut.position.z = 0.2;

let modifier = RayModifier("x", "*", "sin", "y");
modifier.frequency = 10.0;
modifier.amplitude = 0.7;
modifier.addend = 1.0;
cut.modifier = modifier;

helmet -= cut;

// Stripe

let stripe = Box(F3(0.011, 0.17, 0.2));
stripe.position.y = 0.16;
stripe.position.z = 0.2;
helmet += Groove(stripe, 0.01, 0.02);

Supporting Forged Thoughts

You can support the Forged Thoughts project by becoming a GitHub Sponsor.

License

Forged Thoughts is licensed under the MIT.

Unless explicitly stated otherwise, any contribution intentionally submitted for inclusion in Forged Thoughts, shall be MIT licensed as above, without any additional terms or conditions.

You might also like...
A light-weight Anchor-Offset based 2D sprite rendering system for the bevy engine.
A light-weight Anchor-Offset based 2D sprite rendering system for the bevy engine.

Bevy AoUI A light-weight anchor-offset based 2D sprite layout system for the bevy engine. Bevy AoUI provides a light-weight rectangular anchor-offset

A programming language designed for the DiamondFire Minecraft server.

Blackstone Blackstone is a programming language designed to help create plots on the MCDiamondFire Minecraft server. Community Links Discord: https://

McShell - A programming language compiles to Minecraft mcfunction files

MCSH MCSH语言是一个语法类似Rust的编译型编程语言,其编译目标是mcfunction文件,以在Minecraft中运行。 MCSH有内存条,可实现函数递归操作。 MCSH 编译 使用 CLI 在虚拟仿真运行 编译 语法 标准库 编译 您需要先安装Rust 然后在您的控制台运行 git cl

A Rust wrapper and bindings of Allegro 5 game programming library

RustAllegro A thin Rust wrapper of Allegro 5. Game loop example extern crate allegro; extern crate allegro_font; use allegro::*; use allegro_font::*;

My first attempt at game programming. This is a simple target shooting game built in macroquad.

sergio My first attempt at game programming. This is a simple target shooting game built in macroquad. Rules Hit a target to increase score by 1 Score

virtualization-rs provides the API of the Apple Virtualization.framework in Rust language.
virtualization-rs provides the API of the Apple Virtualization.framework in Rust language.

virtualization-rs Rust bindings for Virtualization.framework virtualization-rs provides the API of the Apple Virtualization.framework in Rust language

A dead simple configuration language.

Rakh! A dead simple configuration language. No seriously, it's simple. With only 26 lines of code, it's one of the tiniest configuration languages the

Locate local installations of the Wolfram Language.

wolfram-app-discovery Discovery local installations of the Wolfram Language and Wolfram applications. This crate provides: The wolfram-app-discovery l

Creating a simple flappy bird game in Rust language

Creating a simple flappy bird game in Rust language The main goal of this project is to get my hands dirty with rust, while creating something fun. Ex

Owner
Markus Moenig
Creator of Open Source graphic applications and games using Rust, Swift and Metal. Enjoying life in Thailand.
Markus Moenig
Text Renderer written in Rust using HarfBuzz for shaping, FreeType for rasterization and OpenGL for rendering.

Provok Text Renderer written in Rust using HarfBuzz for shaping, FreeType for rasterization and OpenGL for rendering. Input Provok is fed with a JSON

Ossama Hjaji 67 Dec 10, 2022
Vulkan and Rust rendering~game engine which creation is covered with YouTube videos

Vulkan and Rust rendering~game engine which creation is covered with YouTube videos

小鳥 11 Dec 4, 2022
Bell is a work in progress programming language that compiles to MCfunction (Minecraft's language for creating datapacks).

Bell is a work in progress programming language that compiles to MCfunction (Minecraft's language for creating datapacks). It provides a higher level,

Yoav 17 Aug 25, 2022
Vulkan rendering sandbox for raytracing

sol-rs ☀ sol-rs is a small rendering toolkit for Vulkan, with a focus on real-time raytracing (which is not currently available via other APIs such as

Éric Renaud-Houde 65 Dec 7, 2022
A tilemap rendering crate for bevy which is more ECS friendly.

bevy_ecs_tilemap A tilemap rendering plugin for bevy which is more ECS friendly by having an entity per tile. Features A tile per entity Fast renderin

John 414 Dec 30, 2022
Proof-of-concept of getting OpenXR rendering support for Bevy game engine using gfx-rs abstractions

Introduction Proof-of-concept of getting OpenXR rendering support for Bevy game engine using gfx-rs abstractions. (hand interaction with boxes missing

Mika 52 Nov 14, 2022
Self Study on developing a game engine using wgpu as the rendering API. Learning as I go.

Fabled Engine Any issues, enhancement, features, or bugs report are always welcome in Issues. The obj branch is where frequent development and up to d

Khalid 20 Jan 5, 2023
🤹‍ 2D sprite rendering extension for the specs ECS system

specs-blit 2D sprite rendering extension for the Specs ECS system. All sprites are loaded onto a big array on the heap. Example // Setup the specs wor

Thomas Versteeg 8 Aug 14, 2022
Collection of rust crates providing rendering abstractions.

render-rs License Licensed under either of Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0) MIT license (LIC

Graham Wihlidal 31 Aug 25, 2022
Cross platform rendering in Rust

Miniquad Miniquad is a manifestation of a dream in a world where we do not need a deep dependencies tree and thousands lines of code to draw things wi

Fedor Logachev 937 Jan 4, 2023