Search Unity

[BETA] Blender Nodes in Unity

Discussion in 'Assets and Asset Store' started by Warwlock, Mar 6, 2022.

  1. Warwlock

    Warwlock

    Joined:
    Aug 17, 2018
    Posts:
    40
    Hello, I'm Warwlock. I've been developing games over 8 years. In the last years, I got interested in shaders and node graphs. But like most of you, I struggled passing Blender Nodes to Unity Shader Graph. Also using Shader Graph in Unity is little bit different than Blender's Material Graph. So, I realized, someone should make a toolkit that helps node flow easier in Unity and Blender.

    Blender Nodes Graph is now available at Github: https://github.com/Warwlock/blender-nodes-subgraph

    Blender Nodes Graph is a tool designed to help developers to create shader nodes in Unity but using Blender style nodes. Also it helps developers to pass their nodes from Blender to Unity.

    Here are some features Blender Nodes Graph provide:
    • Unity and Blender mixed node editor style
    • Simple shortcuts from Node Wrangler Add-on (Ctrl + T and Ctrl + Shift + Click)
    • Shift + A functionality
    • Unlike Shader Graph, RGB Curve node
    • One sticky node (Maybe it helps take some notes)
    • Reroute points
    • Exporting nodes with an Add-on from Blender and import to Unity
    • Fully customizable editor
    • Create your own subgraph menu in Shader Graph
    • Works with URP, HD-RP and Built-In render pipelines.
    • Supports Unity 2020.3 and higher
    I'm going to continue post on this thread for future updates.

    There are some examples:

    4DNoiseExample.png

    SnowExample.png

    FullExample.png



    Of course these are made in my free time about 2 months. But, I will work on future improvments and I want to see your toughts. Feel free to comment.
     
    Last edited: Sep 1, 2022
  2. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    655
    Hi, interesting project.
    I'm a little unclear. Does this allow importing Blender node graph into Unity (to allow animating properties etc)?
    The title suggested yes, most of the info (text, pics, video) above suggests no however this suggests maybe yes?

    As a coder, I'd assume you might say "yes it imports but only these 25% of Blender's nodes so far" and "only one-way from Blender to Unity".

    If yes may I suggest emphasizing since it's probably very attractive. If not, perhaps clarify?
    GL regardless!
     
  3. Warwlock

    Warwlock

    Joined:
    Aug 17, 2018
    Posts:
    40
    Yes, literally it allows you to import node graph to unity. But, not everything, because there is some limitations in Unity. So, it can't import animated propeties or drivers.

    Also I didn't want to show off that feature because it is still in early development stage. I only implemented for 5 nodes so far. But here is a demo video:



    In Blender, I didn't connected nodes to shader node, because for now it is not working (of course I will fix it later).
     
    Arkade likes this.
  4. esgnn

    esgnn

    Joined:
    Mar 3, 2020
    Posts:
    38
    Looks exciting. To gauge the interest, you can check how often people ask for help with the title "My Blender materials are not working in Unity". I feel like seeing that title in Reddit every week.
    Also, considering the fact that Blender is moving to a layered texture design (procedural texture authoring), this will definitely improve Blender-Unity workflow.
    By the way, if you don't mind, may I ask how did you do node UI? I'd love to implement a node based tool and currently surveying the options. If you have any suggestions I'd love to hear it.
     
    begmax likes this.
  5. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    655
    Ahha, yes -- great second video! (Is that a custom exporter to JSON, I think you mentioned? Neat!)

    No problem on it being WIP -- good for you posting early (and working on it)!

    What're your plans for the project? (Paid asset vs. Free asset vs. proper open-source vs ... ?)
     
  6. cosmiK777

    cosmiK777

    Joined:
    Feb 15, 2022
    Posts:
    7
    looks really promising. i'll be keeping an eye. I was reluctant to learn Blender material nodes because I wanted to learn the shader graph in Unity. What brought me here was searching for how what you learn in Blender material nodes, translates to Unity. All the best.
     
  7. spacesimulationandplanetarium

    spacesimulationandplanetarium

    Joined:
    Jun 27, 2021
    Posts:
    54
    When is it finished?
     
  8. Warwlock

    Warwlock

    Joined:
    Aug 17, 2018
    Posts:
    40
    From now on, you can export any shader node workflow from Blender to Unity. After few adjustments and completing the documentation, Blender Nodes Graph for Unity is ready to use in a month.

    It will be free on github for testing purposes. And if you like it then you can purchase on Asset Store.

     
    jeromeWork likes this.
  9. Warwlock

    Warwlock

    Joined:
    Aug 17, 2018
    Posts:
    40
    jeromeWork likes this.
  10. Nikitty

    Nikitty

    Joined:
    Aug 4, 2014
    Posts:
    1
    Hello! I'm import your asset from GitHub, but there is an error in the examples. Can you help?
    Снимок экрана 2022-09-23 в 18.07.52.png
     
  11. Radivarig

    Radivarig

    Joined:
    May 15, 2013
    Posts:
    121
    You probably need to convert the materials,
    Edit > Rendering > Materials > Convert All Built-In Materials to URP
     
  12. JoeKano916

    JoeKano916

    Joined:
    Aug 7, 2017
    Posts:
    2
    Hey everyone! I also have a similar problem that Nikitty had. I converted all my materials to URP but even the example materials were still pink. The asphalt shader, for example, is visible on the shader itself, but the main preview is still bright pink. Anyway, any help would be very much appreciated. Thanks in advance!
     

    Attached Files:

  13. whywyh1997

    whywyh1997

    Joined:
    Oct 23, 2022
    Posts:
    1
    Hello thank you for the very very useful project, but I ran into some problems, when I installed the addon in blender there is no export nodes in toolbar.Maybe there is a version problem,my blender is 3.3.1.By the way, does it now support new nodes such as sahder and vertex groups?i'd like to download it in asset store
     
    DnSjKqBsJs likes this.
  14. Draginboi

    Draginboi

    Joined:
    Mar 26, 2022
    Posts:
    1
    does this work with hdrp?
     
  15. Warwlock

    Warwlock

    Joined:
    Aug 17, 2018
    Posts:
    40
    Thank you all for trying.

    If you are using different Render Pipeline than URP, example assets going to be pink. You can change Shader Graph Active Target under Graph Inspector to other render pipelines to solve problem. At least I hope this should help.


    Did you checked shader toolbar menu or 3D viewport? If you are sure checked shader toolbar, then I don't know what happened then. I'm trying a new approach for using shader nodes like Principled Bsdf or Volume shaders but for now those are not supported. I'm still working on Asset Store publishing, I ran into some name ambiguity.


    Yes, it does works every render pipeline that supports shader graph.
     
  16. DanielleAlek

    DanielleAlek

    Joined:
    Feb 7, 2023
    Posts:
    1
    This is really great work!
    My one question is, is it possible to supplement the nodes that aren't working with Unity equivalents? For example, using Unity's blend node in place of Blender's mix node, or using Unity's camera data node in place of Blender's? Or, the other way around, too, like using the Color Ramp in a standard Unity shader graph.
    Mixing the nodes of both together could create an extremely powerful tool that could craft some insane node trees.
    Hope you're having a great day!
     
  17. DrBeardvorkian

    DrBeardvorkian

    Joined:
    Jan 25, 2020
    Posts:
    1
    Any plans for backward compatibility, possibly to Unity 2019.4.31f1? I just ask because that is the version of unity vr chat uses and it seems like it would be useful for trying to get things out of blender and into unity and keeping them looking similar with less effort.
     
  18. Fain234

    Fain234

    Joined:
    Mar 18, 2023
    Posts:
    1
    Hello, where can I find the node export addon?
     
  19. iceygamerX

    iceygamerX

    Joined:
    Apr 8, 2023
    Posts:
    1
    upload_2023-4-8_14-49-7.png
    for some reason I can't get it to work. everytime I click on the 4D noise shader it gives me the error on the top right.
     
  20. tokar_dev

    tokar_dev

    Joined:
    Feb 1, 2017
    Posts:
    9
    BlenderGraphToUnity.png Warwlock, wow! Star for your package. Here I draw my plant. (URP 2021.3)
     
    Last edited: May 1, 2023
  21. Lugilde

    Lugilde

    Joined:
    Feb 7, 2021
    Posts:
    1
    Hi @Warwlock , amazing project, ty for such contribution. I've tested it in a new URP project, and I found some errors. When generating the subgraph (without changing anything) for the sample 4DNoise (URL sample), I get the following error:

    error_shader.png
    It also happens with the ExamplePreview sample, but not the with the MagicTexture sample, dkw. If i create my own graph, the same happens. Hope you can help. Best regards!
     
    Last edited: May 18, 2023
  22. jzq740176597

    jzq740176597

    Joined:
    Jul 31, 2015
    Posts:
    17
    hi! Nice-work you've done, And what's lastest progress publishing in assetStore(I searched BUT failed yet) supply the link out if completed.

    Btw, I have downloaded & tested github version Found a bug (or feature will be added in furture I guess BUT I really hode so) :

    [Texture Coordinate] Node missing a important output slot : [Generated] And it's acquired for some feature for precedual texture utilize case. I'm sure, So I just wonder it's a known issue or there's plan to add it?
     
  23. Bricksmashr10

    Bricksmashr10

    Joined:
    Oct 5, 2023
    Posts:
    24
    how do I apply this to a material?
     
  24. Bricksmashr10

    Bricksmashr10

    Joined:
    Oct 5, 2023
    Posts:
    24
    I watched the video but I still don't quite understand how to put this onto my objects. :|
     
  25. QAA3Q

    QAA3Q

    Joined:
    Dec 3, 2023
    Posts:
    1
    Is there a way to exort compositing nodes?
     
  26. Bruno_Vasa_Creative

    Bruno_Vasa_Creative

    Joined:
    Nov 8, 2023
    Posts:
    6
    Does it still supported? I had 800+ errors popping up on console just importing it.