Git Product home page Git Product logo

3d-moebius-transformations-vertex-shader-in-unity-3d's Introduction

Moebius Transformation Shaders

This repo contains shader code for 4d Moebius transformation of 3d space both in GLSL vertex shade as well as C#.

screenshot

Open the Sample Scene and press play. You can fly around as you do in editor by clicking right click mouse and WSAD, press shift to accelerate. You can press T to rotate the hyper Sphere and G to rotate in the other direction. This baisicly means with T and G you can increase and decrease the effect strenght. Your control center is in Manager Gameobject and Master script. There you can set some balanacing parameters. The most interesting is probably Camera Centeric.

Camera Centeric looks like this:

screenshot

Where as non Camera centeric looks like this:

screenshot


If you just want to have a look at the shader, you find the file in Assets/Shaders/Resources/Moebius3D.shader. All relevant code is in the vertex shader.

If you want to grab the C# version, have a look at the Master.cs, MobieusTrasnform(Vector3 pos).

There are more axis along the 4D sphere you can rotate the mesh at. You can add those yourself for more control.


The code is based on the work from Daniel Piker. If you would like to have more info about this type of transformation, this video is a fantastic visualisation and Daniel has written about his code here.

All the meshes in the video and the mesh in the repo are my meshes licensed under Creative Common, you can grab the meshes on my Sketchfab.

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.