{"id":14960568,"url":"https://github.com/aniketrajnish/4d-engine-unity","last_synced_at":"2025-06-14T18:03:43.341Z","repository":{"id":211828063,"uuid":"729347702","full_name":"aniketrajnish/4D-Engine-Unity","owner":"aniketrajnish","description":"A 4D Raymarching Engine for Unity","archived":false,"fork":false,"pushed_at":"2023-12-27T03:58:29.000Z","size":76,"stargazers_count":22,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-10T10:07:37.113Z","etag":null,"topics":["4d","4d-plugin","4d-raymarching","4d-unity","raymarching","unity-package","unity-plugin","unity-tool","unity3d","unity4d"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aniketrajnish.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-09T00:50:17.000Z","updated_at":"2024-06-24T10:07:28.000Z","dependencies_parsed_at":"2023-12-12T22:30:32.790Z","dependency_job_id":"afbed41a-138f-49b3-84f9-6317fdd3c02b","html_url":"https://github.com/aniketrajnish/4D-Engine-Unity","commit_stats":{"total_commits":12,"total_committers":1,"mean_commits":12.0,"dds":0.0,"last_synced_commit":"1fbf81b7d567fbd5dcda214a1936e3cb161b7a0c"},"previous_names":["aniketrajnish/4d-engine-unity"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aniketrajnish%2F4D-Engine-Unity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aniketrajnish%2F4D-Engine-Unity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aniketrajnish%2F4D-Engine-Unity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aniketrajnish%2F4D-Engine-Unity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aniketrajnish","download_url":"https://codeload.github.com/aniketrajnish/4D-Engine-Unity/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219868117,"owners_count":16555878,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["4d","4d-plugin","4d-raymarching","4d-unity","raymarching","unity-package","unity-plugin","unity-tool","unity3d","unity4d"],"created_at":"2024-09-24T13:22:32.466Z","updated_at":"2024-10-10T10:10:52.391Z","avatar_url":"https://github.com/aniketrajnish.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 4D Engine Unity\nA 4D Raymarching Engine for Unity that helps render 4D objects and has the following features:\n* 20+ 4D shapes to choose from.\n* Control over shape's dimensions and color.\n* Control over shape's 3D translation and rotation.\n* Supports ambient occlusion, lighting information, hard and soft shadows.\n* Control over both global and local 4D translation and rotation.\n\nI have made a 4D pacman game using this engine. You can check it out [here](https://makra.itch.io/pacman-4d-into-the-4th-dimension).\u003cbr\u003e\nIf you want to learn more about what 4D is, check out [this](https://youtu.be/6Gim95bukm8?si=ROa28v9MgNcfmv7B) video that I made using this engine as the backend.\n\nhttps://github.com/aniketrajnish/4D-Engine-Unity/assets/58925008/5236d70c-4b92-4d8d-ae84-e815993945dd\n\n## Usage\n\n### Importing the Package\n* Clone the repository or download the `.unitypackage` from the [Releases Section](https://github.com/aniketrajnish/4D-Engine-Unity/releases/tag/v001) and import it in your project. \u003cbr\u003e\u003cbr\u003e\n  ```\n  git clone https://github.com/aniketrajnish/4D-Engine-Unity.git\n  ```\n* Import the [Unity.Mathematics](https://docs.unity3d.com/Packages/com.unity.mathematics@1.0/manual/index.html) package from the package manager.\n* The package includes a pre-configured `Test` scene that serves as a reference. You can use this as a starting point for your project.\n* If you want to setup a new scene by yourself, simply follow the steps outlined below.\n \n### Setting up a scene\n* Open a new scene and add the `Raymarcher` component to the Main Camera.\n* The `Raymarcher` script has the following parameters in the inspector:\n  \n  | Category             | Variable         | Description                                                                  |\n  |----------------------|------------------|------------------------------------------------------------------------------|\n  | **General Settings** | Shader           | Shader used for raymarching.                                                 |\n  |                      | Sun              | Directional light in the scene.                                              |\n  |                      | Loop             | Repetition of structures in the raymarching shader.                          |\n  | **4D Settings**      | W Pos            | Global W position in 4D space.                                               |\n  |                      | W Rot            | Global W rotation in 4D space.                                               |\n  | **Light Settings**   | Is Lit           | Toggle lighting calculations on/off.                                         |\n  |                      | Is Shadow Hard   | Toggle between hard and soft shadows.                                        |\n  |                      | Is AO            | Enable or disable Ambient Occlusion.                                         |\n  |                      | Light Col        | Color of the light.                                                          |\n  |                      | Light Intensity  | Intensity of the light.                                                      |\n  |                      | Shadow Intensity | Intensity of shadows.                                                        |\n  |                      | Shadow Min       | Minimum shadow distance.                                                     |\n  |                      | Shadow Max       | Maximum shadow distance.                                                     |\n  |                      | Shadow Smooth    | Smoothness of shadow edges.                                                  |\n  |                      | AO Step          | Step size for AO calculation.                                                |\n  |                      | AO Intensity     | Intensity of AO.                                                             |\n  |                      | AO Iteration     | Number of iterations for AO calculation.                                     |\n  | **Render Settings**  | Max Steps        | Maximum number of steps for raymarching.                                     |\n  |                      | Max Dist         | Maximum distance to raymarch before considering a hit.                       |\n  |                      | Surf Dist        | Threshold for considering a hit in raymarching.                              |\n\n### Rendering a shape\n* After adding the `Raymarcher` component to the Main Camera, create an empty gameobject and add the `RaymarchRenderer` component to it.\n* Click the `Create New Dimensions` button to create a scriptable object containing all the data about the shape's dimension that you can control using the custom editor for each shape.\n* The `RaymarchRenderer` script has the following paramters in the inspector:\n  \n  | Category              | Variable         | Description                                                               |\n  |-----------------------|------------------|---------------------------------------------------------------------------|\n  | **Default Inspector** | Shape            | 4D shape to be rendered.                                                  |\n  |                       | Operation        | Operation to be performed (union, subtraction, intersection).             |\n  |                       | Color            | Color of the shape.                                                       |\n  |                       | Rot W            | Local W rotation in 4D space.                                             |\n  |                       | Pos W            | Local W position in 4D space.                                             |\n  |                       | Blend Factor     | Currently not implemented                                                 |\n  |                       | Dimensions       | Scriptable Object holding the shape's dimension data.                     |\n  |                       | Create New Dimensions | Button to create new dimenion scriptable object for the shape |\n  | **Shape Dimensions**  | Dimension Props  | The dimension properties based on the chosen 4D shape.                    |\n\n  \n## Contributing\nContributions to the project are welcome. Things that need work:\n* Currently operations triggers global operation on the last object. Need to change it to local operations with the objects in proximity/chosen objects.\n* Make a better collision detection system.\n* Implement a system to blend different shapes.\n* Implementing [n-dimensional rigid body dynamics](https://marctenbosch.com/ndphysics/).\n  \n## License\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faniketrajnish%2F4d-engine-unity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faniketrajnish%2F4d-engine-unity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faniketrajnish%2F4d-engine-unity/lists"}