Giter Site home page Giter Site logo

alelievr / mixture Goto Github PK

View Code? Open in Web Editor NEW
1.2K 34.0 124.0 520.71 MB

Mixture is a powerful node-based tool crafted in unity to generate all kinds of textures in realtime

Home Page: https://trello.com/b/2JiH2Vsp/mixture

License: MIT License

ShaderLab 11.67% C# 72.11% HLSL 11.38% GLSL 4.84%
texture-synthesis procedural-generation node-editor graphics-programming

mixture's Issues

UnityEngine.UIElements.IntegerField compile error

var indexField = new UnityEngine.UIElements.IntegerField { label = "index", value = foreachNode.index };

var countField = new UnityEngine.UIElements.IntegerField { label = "count", value = foreachNode.count };

Does there have compile errors?
I'm in 2021.3.19. Unity don't have in UnityEngine.UIElements.IntegerField. It is UnityEditor.UIElements.IntegerField

[BUG] ShaderNode using ShaderGraph's shaders are broken when compiling Mixture for the first time

Describe the bug
All ShaderGraph nodes, as Normal From Height Node are broken when compile Mixture for the first time or when reimport package (I got this bug two times, when I cloned the repo the first time and when reimport project due to Unity Version mismatch).
Nodes don't output anything (or output a transparent texture ?)

unknown

Fix
To fix it, I simply open any ShaderGraph and save it. This fix every occurrence of the bug

To Reproduce
Steps to reproduce the behavior:

  • Clone the repository
  • Create a new graph
  • Add any ShaderGraph Node
  • Connect it to another node
  • Output is a full (0, 0, 0, 0) map

Setup:

  • OS: Windows
  • Unity Version: 2020.3.2
  • Render Pipeline : Built-In

[BUG] Editor crash when Texture Shape is set to 2D Array

What happened?
Silent editor crash occurs with the following:
StackOverflowException: The requested operation caused a stack overflow.
at Mixture.MixtureEditor.RequiresConstantRepaint () [0x00000] in D:\Github\hdrp-scenario-test-ut\scenario-test-ut\Packages\com.alelievr.mixture\Editor\Graph\MixtureInspector.cs:198
at Mixture.MixtureEditor.RequiresConstantRepaint () [0x00000] in D:\Github\hdrp-scenario-test-ut\scenario-test-ut\Packages\com.alelievr.mixture\Editor\Graph\MixtureInspector.cs:198
at Mixture.MixtureEditor.RequiresConstantRepaint () [0x00000] in D:\Github\hdrp-scenario-test-ut\scenario-test-ut\Packages\com.alelievr.mixture\Editor\Graph\MixtureInspector.cs:198
at Mixture.MixtureEditor.RequiresConstantRepaint () [0x00000] in D:\Github\hdrp-scenario-test-ut\scenario-test-ut\Packages\com.alelievr.mixture\Editor\Graph\MixtureInspector.cs:198
at Mixture.MixtureEditor.RequiresConstantRepaint () [0x00000] in D:\Github\hdrp-scenario-test-ut\scenario-test-ut\Packages\com.alelievr.mixture\Editor\Graph\MixtureInspector.cs:198
at Mixture.MixtureEditor.RequiresConstantRepaint () [0x00000] in D:\Github\hdrp-scenario-test-ut\scenario-test-ut\Packages\com.alelievr.mixture\Editor\Graph\MixtureInspector.cs:198
at Mixture.MixtureEditor.RequiresConstantRepaint () [0x00000] in D:\Github\hdrp-scenario-test-ut\scenario-test-ut\Packages\com.alelievr.mixture\Editor\Graph\MixtureInspector.cs:198
...

To Reproduce
Steps to reproduce the behavior:

  1. Create a new project with mixture package added
  2. Import a texture
  3. Set size to 4k (might still repro without 4k)
  4. Select Apply
  5. Observe the editor crash

Setup:

  • OS: Windows
  • Unity Version: 2022.2.0a9
  • Mixture Version [0.4.0]

Additional informations
Exact texture with repro: https://drive.google.com/file/d/19SNbw2PQmnCbxsFvLuehBrM2d-V0tEGX/view?usp=sharing

Note that after editor is reopened and once texture is selected editor crashes again.

[BUG] Crash when using other graph based on NodeGraphProcessor

What happened?
Crashes here (there are several instances of this code)

		static bool IsCompatibleWithRealtimeGraph(BaseGraph graph)
			=> (graph as MixtureGraph).type == MixtureGraphType.Realtime;

Crashes when trying to create new node in no-MixtureGraph. For me it is obvious the code here is not shielded in those cases and this seems as a problem.

Mixture Variant from C#

Hi,

I try to create a node that is able to import a graph asset and generate a custom port for each texture output of the imported graph. It's really experimental, but it's working
ImportNode
(left is the import graph node, right is imported graph)

I'm now trying to have access to graph parameters and be able to modify it from the Node Inspector. It works, but it modify the source graph asset, that is not a desired behaviour. I think Mixture variant is the thing i'm looking for, but I can't find a way to create mixture variants on the fly from the input graph (retrieve from the Texture with MixtureDatabase.GetGraphFromTexture() ).
Does the Variant must necessarily be write on disk ? Maybe it could be a child asset of the current graph ? Do you have any advice to adress this issue ?

I don't know if i'm very clear, and sorry for my english.

Thank you

Please incorporate a natural language prompt node.

What this feature will allow you to achieve and how it will improve your workflow?
It will bring AI into a Node Native Application

Describe the solution you'd like
any ai text and image to image node or api
or even just text to image

something like midjourney that gives you the filter

Does this feature exists in other tools? If so please give examples on how you use?
ComfyUI

[BUG] Replaces the current Render pipeline!!

Describe the bug
It was a bit dumb of me to no test it in isolation but I messed a project pretty badly just by installing Mixture through UPM (first time I use Open UPM), maybe add a note in the readme?

To Reproduce
Steps to reproduce the behavior:

  1. cd to your HDRP Unity Project
  2. openupm add com.alelievr.mixture
  3. See error:
WARN 404 package com.unity.render-pipelines.core@10.0.0-preview.27 is not a valid choice of...
WARN 404 fall back to com.unity.render-pipelines.core@9.0.0-preview.77

[BUG] Can't see links in mixture graph

Hi!

I don't see any links for mixture

  • I open github project in Unity
  • and open mixture file, in graph window,
  • can't see any links between nodes.

Windows
Unity Version: 2021.1.11f1
R3950, GTX1080, 32Gb

What i do wrong?
Thanks for answer!

Screen - https://prnt.sc/15d6nny

[BUG] "graph.onGraphChanges += ProcessGraphWhenChanged;" accumulates infinitely

What happened?
You can get into a situation where the graph runs an arbitrary number of times upon changes (instead of just one time).

To Reproduce
Open a Mixutre graph.
Close the graph editor.
Open the same graph again.
Attach a debugger and put a breakpoint in MixtureGraphProcessor.ProcessNodeList
Make a change to your graph that would trigger it to run again.
Notice that your breakpoint is hit twice.
Close the graph editor and repeat the process.
Notice that your breakpoint is hit three times.
And so on.

Setup:
Windows
"version": "0.3.0",
"unity": "2020.3",

[BUG] The double buffered option for shaderNode is incorrect

What happened?
The double buffered option for shaderNode is incorrect

To Reproduce
Steps to reproduce the behavior:
image

Setup:

  • OS: [e.g. Windows]
  • Unity Version: [e.g. 2023.1.7]
  • Mixture Version [0.4.2]

Additional informations
Add any other context about the problem here.

External Parameters not working

What happened?
When external parameter is created and linked to a UV node input (e.g. UV bias), changing the parameter's value does not have any visible effect. Texture is not changed in node editor, nor in inspector (when update texture is called), nor when changed using script.

To Reproduce
Create a new static mixture graph, add UV node to the input of default noise. Create exposed parameter of type Vector3 and link it to a UV bias input of the UV node. Changing a exposed parameter has no effect.

Setup:

  • OS: Windows 11
  • Tested in Unity Version:2022.1.4f1, 2021.3.6f1, 2021.1.20f1
  • Mixture Version [0.4.0]
  • HDRP version 11

Realtime Texture is not so realtime?

What this feature will allow you to achieve and how it will improve your workflow?
In our project, we are generating a texture from external signals using compute shader. We can generate the texture in realtime as we run compute shader once every frame. We'd love to move to Mixture to manage the data processing visually. However, the realtime texture is not "interactively" realtime as it is not updating the texture every frames when the editor is in Play mode. The same applies to static texture by manually call RunOnce and ReadbackMainTexture. I guess that texture data flow is GPU -> CPU -> GPU. Is this correct?

Describe the solution you'd like
Within a single frame, we want to:

  • Generate/update Mixture texture.
  • Either get or copy generated texture data on the GPU. Getting the result as RenderTexture is fine.
  • Render the texture via Graphics commands.

[BUG] Doesn't compile after installing v0.0.2 from upm

Describe the bug
First I got excited, then I got this Library\PackageCache\[email protected]\Editor\CustomMipMapShaderGraph\MipMapSubShader.cs(27,21): error CS1061: 'TargetSetupContext' does not contain a definition for 'AddAssetDependencyPath' and no accessible extension method 'AddAssetDependencyPath' accepting a first argument of type 'TargetSetupContext' could be found (are you missing a using directive or an assembly reference?)

:(

To Reproduce
Steps to reproduce the behavior:

  1. Make a new HDRP project with 2020.2b10
  2. Add upm scope and import Mixture
  3. Get errors

Setup (please complete the following information):

  • OS: Windows
  • Unity Version: 2020.2b10

Additional informations
But i'm sure it's great :D .

[BUG] Editor Crashes when inspecting Texture Array

What happened?
The editor (2021.3.4f1) crashes without bug reporter after selecting texture array (made by microsplat).

To Reproduce
Open a texture array in the inspector. If that doesn't work I can provide a sample one.

Setup:

  • OS: Windows 11
  • Unity Version: 2021.3.4f1
  • Mixture Version: 0.4.0

Additional informations
In the Logs, there is a stack overflow exception originating from the Mixture codebase (iirc something around line no 200 in the texture inspector related code.

Requirements in README do not match package.json.

What happened?
I'm trying to use Mixture with Unity2020.2.7f1.
According to the README, Mixture requires Unity 2020.2 beta or higher.

You need at least a Unity 2020.2 beta

However, according to the latest version of the package.json, Unity 2020.3 or higher is required.
It seems that the package.json has been changed with the following commit.

51ec1a3#diff-9927e926cd159cd6051ef323b5d6f6ec5e143369ae77390ec2f0a174e22443a8

Is Mixture compatible with Unity2020.2?
I've installed it from GitHub and it looks like 0.4.0 is working fine in Unity2020.2.7f1.

Setup:

  • OS: [e.g. Mac]
  • Unity Version: [e.g. 2020.2.7f1]

Thanks for your great software!

Auto update on parameter change

When Always Update is on, the whole graph keeps updating all the time which slows Unity down.
I suggest it be replaced with Update on Change that will get triggered only when a parameter changes.

Binary build version?

Out of curiousity, is there a plan to create an executable build version of mixture to be used as a procedural texture creator, so we don't have to use it inside editor?

Move the package directory to a separate repo

In essence, this repo is a development project that includes the Mixture package. I would love to have the package directory moved to a separated repo and included in this repo as a git submodule.

The reason behind this is that I cannot use registry package because I want to make a few modifications. On the other hand, I also cannot use local package because I cannot share the modification with my colleague. In my use case, I want to fork ONLY the package as a repo and can easily add this forked repo to Unity Package Manager using git URL. By doing so, I can collab with my colleague on both the Unity project along with the forked repo.

Basically, you can setup your repos like one of the following:

  • Use Mixture repo for dev project and use Mixture-package repo for package.
  • Use Mixture repo for package and use Mixture-dev for dev project.
  • Use Mixture repo for package and move the dev project info a orphaned branch under Mixture repo. This is what I have done for my Unity package where the dev project is moved to branch legacy and is also distributed in Releases as demo project

The later 2 options are preferable as people can contribute directly to the already popular repo.

[BUG] Mesh To Distance Field issues

What happened?

When creating Mesh To Distance Field, errors like the following are displayed in the console:
D3D11: Failed to create render texture resource (3D, 1024x1024x1024 mips=1 dxfmt=9, hr=0xf4e2ec20)
If I set a mesh in the Input Mesh property, Unity crashes with the following error :
image

To Reproduce

  • Create a new Unity project
  • Import Mixture 0.4.0 package
  • Create a new static or real time mixture
  • Add a Mesh To Distance Field node then set an mesh Input Mesh

Setup:

  • OS: Windows
  • Unity Version: 2021.3.0 & 2020.3.33
  • Mixture Version 0.4.0

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.