Giter Club home page Giter Club logo

ifsrenderer's Introduction

IFSRenderer     


3D IFS fractal renderer and editor

DemoWikiDownload

release library dotnet

help license

IFSRenderer started as a weekend project to help me understand how the fractal flame algorithm works. My initial goal was to just implement it in 3D, but it has grown into a passion project and then into my master's thesis. I'm releasing it as an open-source project in the hope that it will be useful to the fractal artist community.

🗸 Features

  • Render 3D IFS (Iterated Function System) fractals
  • Real-time interaction
  • Node-based editor
  • Mutation-style generator
  • Extendable with Plug-Ins
  • Animations
  • Fisheye projection, ideal for planetarium dome masters

Planned:

  • Gradient editor
  • Animation curve editor
  • More intuitive coloring methods
  • Add Your Ideas

📀 Installation

Minimum Requirements

  • Windows 10 or later
  • OpenGL 4.5 capable graphics card

Downloads

Get the latest installer or portable version HERE.
Previous versions can be found on the Releases tab.

Build instructions

You may build the project yourself using Visual Studio 2022 (with .NET Desktop Development workload). Since the default transforms are hosted in a separate repo, use the --recurse-submodules switch when cloning:

git clone --recurse-submodules https://github.com/bezo97/IFSRenderer.git

The Setup project uses a VS extension, which is not required to build the portable IFSRenderer executable. You can ignore the "unsupported" warning and keep the Setup project unloaded.

Contributing

Please follow the .editorconfig file in the root of the repository. If you submit a pr it must have the right formatting, otherwise the PR fails. You can fix the formatting by using the cleanup found in Visual Studio / Visual Studio Code / Rider, which will respect the editorconfig.

To fix the formatting through the CLI run the following in the root of the project:

# You only need to restore the first time, or when the tools change
dotnet tool restore

dotnet dotnet-format

🕹️ Usage

Using the editor

Beginners should start with the Getting Started Guide. See the Wiki for more.

Using the library

Add the latest NuGet package to your project. Here are some getting-started snippets.

Show snippets

Generate a random fractal:

//Initialize
using RendererGL renderer = new(graphicsContext);
renderer.Initialize(loadedTransforms);
Generator generator = new(loadedTransforms);
//Generate fractal
IFS fractal = generator.GenerateOne(new GeneratorOptions{ });
fractal.ImageResolution = new Size(1920, 1080);
//Render
renderer.LoadParams(fractal);
renderer.DispatchCompute();
renderer.RenderImage();
//Save HDR image
var histogramData = await renderer.ReadHistogramData();
using var fstream = File.Create(path);
OpenEXR.WriteStream(fstream, histogramData);

Modify a fractal programmatically:

//Load from file
IFS myFractal1 = IfsSerializer.LoadJson("myFractal1.ifsjson", loadedTransforms, true);
//Change params
Iterator selected = myFractal1.Iterators.First(i => i.Opacity == 0);
Iterator duplicated = myFractal1.DuplicateIterator(selected);
duplicated.Opacity = 1;
duplicated.TransformVariables["Strength"] = 10.0;
//Save to file
IfsSerializer.SaveJson(myFractal1, "myFractal1.ifsjson");

Render images:

for (double i = 0.0; i <= 1.0; i += 0.1)
{
    selectedIterator.TransformVariables["weight"] = i;
    renderer.InvalidateParams();
    renderer.DispatchCompute();
    renderer.RenderImage();
    var image = await renderer.ReadPixelData();
    myRenderedImages.Add(image);
}

Alternatively, image data can be written directly to a bitmap:

await renderer.CopyPixelDataToBitmap(myBitmapPtr);

❔ Support

Acknowledgements

Below is a list of awesome people who contributed to IFSRenderer, thank you! I'd like to also mention people who indirectly helped the project succeed through teachings/mentorship/advices/etc.: ancientc, BenceKovari, drecouse, lycium, tibitoth

Contributors

bezo97 (Creator & Maintainer), AliBee, KuraiAndras, Rychveldir, Sekkmer, Bastitron, Add Your Name


⚖️ License

Copyright (C) 2021-2024 Dócs Zoltán & contributors
IFSRenderer is licensed under GPLv3.

ifsrenderer's People

Contributors

bakobenjamin avatar benjaminbako avatar bezo97 avatar kuraiandras avatar tibordravecz avatar wrightwriter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ifsrenderer's Issues

Apply watermark on exported images

Implement the option "Apply Watermark" in the settings window, which prints the author name/logo/something on the artwork automatically.

Right click node connection has bugs

Describe the bug
Right click drag causes unexpected connections and disconnections

To Reproduce
Steps to reproduce the behavior:
Try to connect and disconnect nodes with right click

Expected behavior
Right click drag into empty: add/remove connection to self
Right click drag into other node: add/remove connection to other node

Camera orientation unexpectedly changes

Camera orientation sometimes unexpectedly changes when the mouse is clicked on interactive display.
Reproduction: Open the background color picker, then click on the interactive display area without choosing a color first.
Reported by: @somosb

Add an optional @Tags field to plugins

Example: @Tags: blur, 2d
Then add a search box to the editor gui which lets the user filter through many plugins.
Another idea: Ability to favorite plugins and show them on the top of the list.

MVVM main window

  • use viewmodels on main window
  • additional viewmodels for main window panels

Palette editor

Design and implement a palette editor gui. It should open in a new window and let's the user create, edit and save palettes. Starting point: similar to ChaosHelper, but with the ability to edit existing files(?)

Selectable node connections

Make connections between nodes (arrows) selectable to edit their properties, like the weight. This can work very similar to how nodes are selected.

Display syntax errors in broken plugins

Currently all the plugin snippets are inserted into the kernel and compiled at once, so it's difficult to tell where the syntax error lies in the plugin file.

Serialize node positions

Node positions are currently not serialized, so they're always placed in a default (random) position.
Problem: The library does the serialization, which does not know about the GUI node positions.

Aperture feature do not working in Equirectangular Projection

Describe the bug
Aperture feature do not working in Equirectangular Projection

To Reproduce
Steps to reproduce the behavior:

  1. Set Aperture in Perspective Projection to blur out of focus range
  2. Click on Equirectangular Projection
  3. See no blur

Expected behavior
Expected to see the same blur in Equirectangular Projection that was in Perspective Projection

Desktop (please complete the following information):

  • IFSRenderer version: v1.4.0.0 (installed)
  • OS: latest Windows 10
  • Videocard: Nvidia GTX 1650

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.