Jump to content

difference between shopnet (SOPs) and shop context


cupoftea

Recommended Posts

hi forum,

just diving into houdini a few weeks ago i have a question:
what is the difference between shopnet (in SOPS) and shop context?
or in other words: when to use which?

 

same question also goes for difference between ropnet and OUT context.

 

i did a search and forum lookup but coulndt find any appropriate answers

 

 

 

 

 

Link to comment
Share on other sites

That question plagued me for last two years. Shop context is, actually, a shopnet node itself! Haven't you try to go on topmost level in tree view yet? I mean pressing on Earth icon named "/". You can MMB on shopnet there and see the type name "shop". I don't know if they are true Houdini nodes inside Director context (same as true shopnet nodes inside Surface context, for example) or just a cosmetic display of HIP file structure in the Houdini interface. If not, it can be excused because of their unique topmost nature.

 

pzSM4Ze.png

 

You usually use shopnets if you want your shaders to stay within your object or asset. Dive inside UV Quick Shade asset to see a typical use-case of such shopnet. Sometimes you want to make assets from full scenes, so, there are usually objects, render, shader and composite networks together inside /obj context collapsed into a subnet and then turned into an HDA. Note that network nodes are different types. So, sopnet from DOPs cannot be copy-pasted into ROPs. They are SOP Network DOP and SOP Network ROP correspondingly, different node types of different contexts. On the other hand, you can copy-paste contents of DOPs's sopnet into freshly created ROPs's sopnet. Their contents are in similar context and nodes are same type. So, different shopnet nodes are different types (with similar names and icons) but networks inside them are same context and there is no difference if you store shaders inside /shop or inside /obj/geo1/shopnet1 or even inside /shop/objnet1/shopnet1. It depends on case, and if not, on your personal preference.

Edited by f1480187
  • Like 2
Link to comment
Share on other sites

thank you for the insight. while i understand the first part, the last part somehow confuses me. just to understand:

shopnet and shop context are "the same"? ropnet and out context as well?
if so, what is a sopnet then good for? i can create a sopnet in any context, but while i am already in SOPs, what sense would it make to create a sopnet in a SOP environment? sorry for being noob, but this confuses me totally.

Link to comment
Share on other sites

shopnet and shop context are "the same"? ropnet and out context as well?

Sorry for confusion. Contexts of nodes's contents are same. Nodes itself are different.

 

Contexts and nodes (node types, actually) are different concepts. Contexts are environments, and nodes are node types which can be created in those environments. Open Operator Type Manager to see all Houdini contexts and built-in nodes can be created there (most of the nodes located in external OTLs, however, and are not built-in). I've created several network nodes in different contexts and connected them with names of contexts those network nodes contains inside them. Hope, I didn't screw it up!

 

p3xkOKv.png

"Out context" or "ROP" is called Driver, by the way. Different names for same thing. Just to make language more rich, so, you can talk about Houdini with your friends using a wide range of synonyms. Particles contexts had a same with CHOPs and COPs structure (parent Particle context and single available container node with Pop context inside and all particle nodes available there) and was deprecated in favor of Dop particle nodes since H13.

 

Nodes belongs to contexts where it can be created. So, shopnet inside object node (e.g. /obj/geo1/shopnet1) is actually a Sop type, not Shop type. And /shop node (you call it "shop context") is probably a node of Manager type. I may be wrong there since I'm a relative novice too, and, again, this similarity may not be programmatical but just implied visually in Houdini interface. You cannot create Sop type inside Dop context, so, you cannot create SHOP Network SOP inside any dopnet. Fortunately, there are SHOP Network DOP node exists. You can filter all existing nodes and see that all shopnets are different nodes of different contexts (never mind the Sop/shop, that deprecated node was filtered by the word "shop"). They just have same names and icons. Contexts inside /shop and any shopnet are the same. Add to those shopnets the /shop node itself to get a full range of Houdini's Shop type containers.

 

Ln4UXf3.png

 

but while i am already in SOPs, what sense would it make to create a sopnet in a SOP environment?

It's just a possibility. I've never seen a usage of sopnet inside another sop network. There is subnetwork nodes exists, allowing to have inputs and outputs in addition to containing SOP nodes. But objnets can be used in conjunction with UV Project node. Objnet will contain a camera, and those camera will always stay within UV Project node. It is typical use-case when you create assets. Sopnets are mostly used inside DOPs to provide some default models, and SOP Solver DOP utilizes Sop context in addition to this.

 

Phew. Hope it makes sense for you and I didn't mistake somewhere.

 

UP: and another picture I probably should start with back then

J5kC9J6.png

 

UP 2: Those "principledshader1" nodes are copy-pasted nodes, not the same location.

Edited by f1480187
  • Like 1
Link to comment
Share on other sites

your explanation is highly appreciated. but honestly, this is driving me into total confusion. i assume i´ll grab it one day after using it over and over again. nevertheless, thank you very much. one question regarding your image at the bottom though:

the pricipledshader1-node, is it always the same (meaning reference) in all these different contexts or did you copy/paste it? because when i create an arbitrary shader-node in a shopnet, i cant see it in the shop-context (you call it /shop node), it is only there in that particular shopnet it was created in.

??????

Link to comment
Share on other sites

in pretty much any context (sops, shops, rops, etc) you can create a container for pretty much any other node type (shopnet, sopnet, ropnet, etc).  the top-level containers (/obj, /shop, /out, etc) are more-or-less a guideline for where you might put things.

 

i find i've been putting shops internal to the objects they go with unless i know i want it to be shared amongst multiple objects.  rops i always put in /out so i know where to look for them.  same with /obj, but i don't think there's anything stopping me from creating an objnet inside the /shop path which contains my whole scene.

 

it can be a blessing and curse to have such freedom.  it was envisioned to operate like a file system and as such it has the same problems with cleanliness a file system has.  do you put your texures for your model next to your model or in a completely different set of directories?  is your model next to your hip or somehwere else?  same thing happens inside of houdini.  there's no real "correct" answer on where stuff goes or why to use one method over the other.

Link to comment
Share on other sites

is it always the same (meaning reference) in all these different contexts or did you copy/paste it?

Yes, I copy-pasted it to show that all those shopnet nodes contains same node types (Shop types) inside regardless of their own contexts. Those are all different Principled Shader nodes. Network structure is totally like ordinary folders in OS, all shopnets are isolated from each other. I believe you will understand logic very soon after couple of months diving into.

 
 
 
Link to comment
Share on other sites

Continuing comparison, contexts are rules on file types allowed to be in folders, defined by parent folder.

 

Just drag'n'dropped /shop into Python shell. Yes, it is a node of Manager type (as well as /ch, /out, /obj, etc.), with Shop type operators in it (SHOPs), and even the root node (node called "/" with Earth icon) is a Director type, with Manager operators in it (should we call it MOPs?). Thanks to you, Cup of Tea, I've learned something new today too.

>>> node = hou.node('/shop')
>>> node.type()
<hou.NodeType for Manager shop>
>>> node.childTypeCategory()
<hou.NodeTypeCategory for Shop>


>>> node = hou.node('/')
>>> node.type()
<hou.NodeType for Director root>
>>> node.childTypeCategory()
<hou.NodeTypeCategory for Manager>
Edited by f1480187
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...