Sorcar - Procedural modeling in Blender using Node Editor

The scale is mostly wrong (roads are too small and the street-lights aren’t tall enough as compared to sign posts), but that can be easily changed by parameters!
#itsallprocedural :laughing:

4 Likes

Just something out of context…I never knew dev could be this cool :rofl::

Looks like a screen from a sci-fi matrix styled movie :sweat_smile:
Using this as my desktop background now:

EDIT:
image
Close enough… :joy:

3 Likes

cool, I didn’t know about AnimationNodes, I’ll check it out.

It sounds like it would be a good idea to add as a toggle if you disabled it for performance reasons.

Low poly trees:


Sure, I’ll add a checkbox in the node header.

2 Likes

Well, its a road lol

Well, that’s no excuse…
Here’s the breakdown:

Sorry, I forgot to upload the file before: sc_fan.blend (2.0 MB)

2 Likes

Procedural buildings:

sc_buildinginterior.blend (791.6 KB)

11 Likes

This urgently needs more exposure to blender community. Fantastic!

2 Likes

I just love the addon. Would love to see it in 2.8 too!

3 Likes

Procedural 3D ribbon-like something… (don’t know what it’s for :laughing:)

It’s basically a random walker which is used in noise generation, but in 3D space. You can limit its movement to a plane or an axis.
Here’s the file: sc_ribbon.blend (841.9 KB)

Was thinking of using a mathematical equation to drive this, like a Fourier series.

6 Likes

Can it include custom profiles, different widths as it “grows”, detect collision…
Looks like a natural start of something great - reminds me of differential curve growth :wink:

Thanks for all the good work!

1 Like

You should add something like SV “Frame Info” node for animating things. The node is fed from the timeline, passing the current frame. This way a variable running counter can be passed to those nodes which feed numbers to other compositing nodes… resulting in animating them…

1 Like

I don’t get what you mean by profiles, but yes, it can have different width. You can even get a twisted tube shape just by adding a slight rotation on each pass!
No collision detection though…until the next update! Found these functions:


“Find Nearest” and “Ray Trace” nodes would be sufficient.
Source: https://docs.blender.org/api/current/mathutils.bvhtree.html

And as for the curve growth, I don’t think you can simulate the forces in Sorcar. You’ll have to find a way to hack it using surface operations only, like this:


Of course, this isn’t a real solution as there is no “growth” of curve on surface and it has overlapping/intersecting points. But I’ll see if anything can be done to replicate that.

It would be a good idea to introduce a node like that, but it won’t help you in animating mesh. The mesh is only regenerated when there is a change in node editor. Even if there was a node that reflected the current frame/time, it wouldn’t update by itself.

Just to understand it better, think of nodes as a separate application (independent of the scene). They perform operations on the data they hold reference to, not the other way round. Any changes in the scene (like updating frame) remain oblivious to nodes. It is is one of the few limitations of Sorcar (no integration into dependency graph)

1 Like

Progress update:
Took some time off to create something similar (not using Sorcar):


Still incomplete and very unstable (may go into infinite loop), but it’s a good start. This could be an addon on its own!

I found this on BlenderNation: https://www.blendernation.com/2018/01/18/growthnodes-explore-organic-growth-surfaces/ which might be of interest.

Anyways, let me know if you want me to continue working on this (create a new thread in that case; I’ll also post the code). And now, back to Sorcar…!

1 Like

Got the picture. I think it boils down to using a script that reads timeline, and fetches that data to your nodes directly. Have done that with SV, must have to code somewhere. I’ll see if it can be adapted.

What triggers regeneration exactly? the press of a button?

When a node attribute is changed (like a float slider or enum drop-down menu), or when you press “Refresh Mesh” button
It’s basically an operator: bpy.ops.sc.execute_node_op(), only callable from SC nodetree

And if realtime preview is on, then whenever a different node is selected it calls the operator and stores a ref to the newly selected node in order to prevent re-executing the same node.

Hey everyone!
Long time, no see. It’s been 19 days since the last post, or as I like to call it: 2.8 weeks!! (been waiting for 3 days to crack that joke…:rofl:)

Anyways, I’ve spent the last fortnight working on yet another new system for nodes! This time I’ve focused on common problems faced by most users and tried to overcome them in the simplest manner possible, bringing it ever closer to Houdini. It is a HUGE jump from v1 or v2 and is, you guessed it, 2.8 compatible!

Sorcar v3 features:

1. Completely re-written from scratch!


No patches, escape-routes or try-catch blocks…
It’s a completely fresh take on the node data transfer system. In this update, the sockets (pins) store the data to be passed and the nodes independently perform ops on this data.

2. Multi-file and Automation

As suggested, I divided the code into single-class files (py modules), referenced them inside the main code and automated the process.


Now it will iterate through folders and register the nodes (in respective categories) automatically.

3. Simplified sockets and internal parsing

Removed redundant data-types and introduced internal conversions for the convenience of the user (like int/float/angle → number)

This makes room for more data-types to be exposed as inputs, like enum values (dropdown menus)

4. Sockets display corresponding value/length of array

The sockets will display the value assigned to them in realtime.

If it’s an array, then the number of items in that array is displayed.

5. Support for multiple outputs

Thanks to the new system, a node can have multiple outputs (unlike in earlier versions, where either mesh data or numerical value was returned)

6. Colour-coded nodes

The nodes will be assigned colours based on the state of execution (preview, error, invalid inputs, etc.) in the nodetree rather than based on categories (helps in debugging)


(continued in the next post…)

12 Likes

7. Input sockets can be hidden

One of the annoying thing about the last version of Sorcar was the big size of some nodes (even after collapsing) due to multiple inputs. Now, you can hide (or unhide) the unlinked inputs with a click of a button to make some space in the editor (looks cleaner)

8. Whole new execution system

A better, optimised, more responsive realtime execution system which works without calling any modal operators (unlike Sorcar v2)

I also got rid of the “click-node-to-preview” mode and introduced “Set Preview” buttons on executable nodes, like the preview flag in Houdini nodes. But unlike Houdini, all the other meshes will still be visible in the viewport (unless you want me to get rid of that too…)

9. Introduced dynamic sockets

Replaced the old system of linking same input socket to multiple items

Multiple output sockets can also be toggled for same data

10. Frame-realtime

It was requested by many people, but due to the limitations of earlier version, it wasn’t possible before. But now, thanks again to the new system, it is!

Some other small changes

  • New nodes for array creation and retrieving elements from an array
  • More optimised execution system prevents the node branches to execute multiple times (unless required)
  • Abstract design (self contained code) to prevent clashing with other addons like Sverchok
  • Custom names for generated meshes

And biggest feature of all… it’s made for Blender 2.8 :smiley:! Even though it’s a re-work, almost all the nodes from v2 will be present in v3 (with same categories)

I remember telling people not to put too much hopes on this project, mainly because of EverythingNodes. But after the recent news of my two most favourite companies in the world, Epic Games and Ubisoft (one who makes most awesome game engine, and the other who makes most awesome games :heart_eyes:) supporting Blender, I couldn’t help but dive into 2.8 immediately. It’s been fun to work on Blender 2.8 itself, though not so much in using the API (not that many changes as I had hoped…). I’ll be working on 2.8 from now on and will probably discard the old versions of Sorcar (you can still use them if you want). Believe me, no one who has used Blender 2.8 would want to go back to 2.79, especially after EEVEE & the upgraded interface :stuck_out_tongue_winking_eye:.

The downside to this is that it will take time to remake all the nodes again, even though I’ll be copy-pasting most of it. Hoping to get help from other developers too to speed up the process. Plus, people can now make their own nodes without worrying about menus and registration. Some of the code is still dicey, but I will work on it this week to make it more stable. As of now, it is working fine on RC2. RC3 is going to be released soon (source: Bf-committers Digest) which can provide new grounds for testing next week.

Apart from the nodes, I will also be working on these features:

  • Auto node creation using JSON (input sockets, output sockets, error condition, functionality, reset)
  • Scraping blender API docs to create nodes (or JSON as mentioned above)
  • Node-Scene link (create/edit nodes in editor based on actions in 3D viewport)

Furthermore, I am planning to release this version on more platforms like Itch, BlenderMarket, CGTrader, etc. Officially, Sorcar v3 is on its way…! :sunglasses:

Cheers!
-PA


P.S. Sorry for the long post :see_no_evil:

24 Likes

It’s a great job.:star_struck:
It will be saved if it becomes a handy amount of money afterward.

Whoa. My head is spinning.

EDIT: I cannot find the release