Jump to content

Colour codes


Nerox

Recommended Posts

For SESI I'm going to setup a colour guide for nodes, a guide you can refer to if you wonder which colours you're suppose to use. Since this isn't really defined, I wonder: What colours do you use?

To give an head start, these are the colours that I use:

VOP's

Outputs data: Green (second column)

Imports attributes: Purple (second column)

Parameter controlled by user: Yellow (fifth column)

DOP's

Merge nodes: Gray (Second column) doesn't add or directly modify any data

Switch solvers: Gray (second column) doesn't add or directly modify any data

Any context

null used to refer to: White

null that outputs data: Black

I hope on a great response, personally I'm a big fan of colouring nodes, I find it makes networks easier to read.

Link to comment
Share on other sites

sounds like a good idea! Do it for ROPnets too. Dependencies with shadowmaps and caches, test render and final renders can get quite a bit messy too :).

I tend to color my light nodes on obj level a shade of yellow corresponding to a certain group they belong to. In the ROPnet for the shadowgeneration those rops are colored in relation to the light they belong to.

+ Network boxes and colors.

Link to comment
Share on other sites

Hue is mapped to BBY of the node in the network editor - there is some hidden function I never use - to 'posterize' the gradient.

Makes a nice rainbow and in my experience that's what most sophisticated node color schemes end up at the end of the day.

Caleb's coloring scheme was the most sensible I met so far - three colors if I remember correctly - one for inputs from other networks, one for output into other networks and one the node where stuff happens ... something like that.

Him and Leo demonstrated it at the last VHUG, but never got into details ... well it's three colors ...

Link to comment
Share on other sites

I dont use very advanced color scheme. I usually have two different green colors for file and object merge nodes and a red for geo rops (it just make sense to me that red is meaning "stop - out" and green "start - in" which file, oMerge and rops are) and white for nulls that is referenced in expressions. In OBJ level if (when) things get messy I usually just give a random color to a group of nodes that belong together and same color for their mantra rop.. And i seem to have a small habit of coloring nodes that i change parameters often on to light blue. Like if you got a big network and there is a few nodes that control the "sim" i usually give them a light blue color to just locate them fast.

My memory is failing me but isnt there a property in some file somewhere that you can create to automatically get all nodes of a certain type a specific color when you create the node? I dont remember how to do it i just remember reading somewhere that you can do it, so if someone remembers how to give certain nodes a color automatically when creating them please shout :D

Link to comment
Share on other sites

hmm, light blue in my network are visualization/preview nodes. Like when I am working with instances/copies. The copy sop would be the preview node of the instances. But the template points would be the final out node.

Link to comment
Share on other sites

I use green for geometry, blue for sims, yellow for camera, lights and such. Inside a network it's red for forces and rops or outputs, green for chops, and just ad-hoc color schemes for grouping stuff. I admit it's not very systematic.

There are some default colors in COPS and I would welcome a systemic color scheme. It would be great if we could color the node-connecting lines as well.

Good idea there Nick and I am looking forward to your guide!

Link to comment
Share on other sites

My memory is failing me but isnt there a property in some file somewhere that you can create to automatically get all nodes of a certain type a specific color when you create the node? I dont remember how to do it i just remember reading somewhere that you can do it, so if someone remembers how to give certain nodes a color automatically when creating them please shout :D

Every node has a creation script - apart from mantraROPs - least in H10.

Eg: $HFS/scripts/obj/geo.cmd

Not sure if python works.

I used to customize my geoOBJJ a lot - but shelf scripts break if they don't find a file1 in the selected network - so I stopped customizing them :)

Speaking of shelfscripts/RMB scripts: Writing a small script that colors nodes based on a lookup table shouldn't be that hard. It could also support color schemas. And a pyQT editor to customize it and add custom nodes and overrides and stuff ...

Edited by rdg
Link to comment
Share on other sites

Red, is seriously my favorite color, look at my logo ;-).

How ever, I've had this discussion earlier this week and it seems that most people agree that the color red on nodes should stand for error's, something wrong here, this needs attention etc, instead of a default color for ROP's, outputs or what so ever. In that perspective I would suggest to drop red as any default.

I think, if we can come up with a proper proposal, we can do a serious attempt to do a request for nodes having a certain color by default. (Like COP's)

Link to comment
Share on other sites

I've had my own system for this for quite a while which is managed out of a couple of event handling Python scripts, OnCreated.py and OnNameChanged.py. They easily handle setting colors on node creation based on type name or whatever I might want, as well as when I change a node's name to OUT, RENDER, DISPLAY, etc. Super easy to set up.

As for specific colors for specific nodes and whatnot I think it's really up to personal preference and/or studio experience as to what you like to color and how to do it.

Link to comment
Share on other sites

I've had my own system for this for quite a while which is managed out of a couple of event handling Python scripts, OnCreated.py and OnNameChanged.py. They easily handle setting colors on node creation based on type name or whatever I might want, as well as when I change a node's name to OUT, RENDER, DISPLAY, etc. Super easy to set up.

As for specific colors for specific nodes and whatnot I think it's really up to personal preference and/or studio experience as to what you like to color and how to do it.

What rdg said was the way I remember it by editing the creation script, but the python way of doing it with event handling seems less dangerous and flexible! Do you have a snippet of code to share graham? =)

Link to comment
Share on other sites

Hi Graham,

I actually had this exact idea, but then I worried that it might be to simple to be true :P. Like you're mentioning using Python to look for name changes and changing color is super easy. I know how to do this on a HDA, but where would you store an general 'on created' scriot, which is launched every time you create a node?

I do agree that coloring nodes is probably something very personal, but never the less I still think that it would be a step in the right direction if SESI could provide a head start, in the shape of a style guide. Sort of: 'this is how the average Houdini user thinks it should be done, but feel free to do it your way'. It might generalize things a bit.

Yesterday I took a default FLIP DOP network, and started coloring objects green en solvers blue, for me it was easier to navigate right away.

Link to comment
Share on other sites

Here are my conventions ( I tried to stick to the VOPs colors )

# SOP level

purple : anything that comes from another network ( object_merge or dop_import )

green : out nodes

light yellow : nodes with parameters

brown : links between a pointcloud lookup using the 'op:' command, and the node that's looked up

yellow : any node used for viewport display purpose

# OBJ level

Yellow : lights and cameras

Black : object that are kept in the scene but not used

Red : WIP/Node with Error

# VOPs

black : constant values

post-3635-129268523905_thumb.jpg

Talking of colors, it would be nice to have highlighted syntax in VEX :P

Edited by bunker
Link to comment
Share on other sites

So here is a copy of my OnCreated.py script which I made a few quick changes to to make more robust. You can put this file somewhere in the Houdini script path, most likely in $HOME/houdiniX.Y/scripts/. Right now it provides a few features for setting colors based on types and locations in the Tab menu. All the mappings are set up using straightforward dictionaries and rgb colors.

The first check looks for manager nodes (chopnet, vopnet, popnet) and colors them, in this case green. Next it checks directly against a list of what I call "common" types. Things like nulls, switches, merges, and stuff that appear in many context could go here. The previous two cases will skip immediately to the end and color the node if they are successful. After that it begins a more detailed check.

First it looks into the list of specific node names based on context. This allows you to have an entry for any operator in any context. By default this search mapping is a bit of a soft mapping. It is soft because it is only doing a string search match, as opposed to an identical string match. This allows you to have more general mappings for things such as lights. Many of the lights are an instance of 'hlight', but then you have things like 'gilight' or 'causticlight'. By using a soft type match we can just add an entry for 'light' and it will cover all those. If you don't want that you can easily disable the feature by passing in False to the function that does the comparison.

If the name mapping is unsuccessful then it looks at the option to color by context specific tab menu location. This option gives you the ability to easily color similar nodes the same color. Examples include all nodes that appear in the SOP Import or Manipulate menus, all DOP objects, forces or solvers, or VOP Geometry and Utility nodes.

The final thing it will do is if a node is a generator node and it hasn't found any colors using the previous methods then it will color the node red for example. Generators include things such as Box and Sphere SOPs, Source POPs, Object CHOPS, etc.

Any comments or suggestions are welcome since it's just something I hacked together pretty quickly and always has room for improvement.

OnCreated.py.tar.gz

Link to comment
Share on other sites

Thanks a lot graham for the script, its very easy and understandable how it works and to change stuff so GJ :)

Got it! I had to create one in: /Users/username/Library/Preferences/houdini/11.0/scripts

hehe Nerox that place is like hiding your script for no one to find! :D better to create a scripts folder in your standard houdini preference directory that graham wrote and for houdini 11 and it is in your $home/houdini11.0/ and in there create a scripts directory. So for linux that path for me would be /home/magnus/houdini11.0/scripts . for windows it would be the where your standard houdini11.0 folder in "documents" resides, if i remember correctly it is "C:\Documents and Settings\username\houdini11.0\scripts"

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...