should i avoid hscript and copy stamp?

   4239   7   1
User Avatar
Member
65 posts
Joined: Feb. 2017
Offline
According to cgwiki I should avoid hscript [tokeru.com] and copy stamps [tokeru.com] in favor of wrangles. Is this realistic? I see a lot of tutorials use hscript and copy stamps heavily. Would ‘copy parameter’ and ‘paste relative references’ fall under the hscript category? Those are very handy.
User Avatar
Member
4189 posts
Joined: June 2012
Offline
When you are learning, hscript and copy stamps are nicer.
User Avatar
Member
1737 posts
Joined: May 2006
Offline
Opinions! I have them!

Paste relative reference is fine. All usual channel expression stuff is fine for linking tx of this to ry of that.

Most of what people want to do with copy stamping (rotate/scale things, change colours) are better handled with instance attributes, or by inheriting attributes from your points onto your geometry, which in H16 is now enabled by default.

There are occasions where you can't avoid copy stamping, but there's less and less of those. For those cases the new for loops are the way forward, which I agree are tricky for new users to get their heads around (and most experienced users too for that matter).

That said, I still think its better to push that way than fall back to copy stamping. My beefs with copy stamping for new users:

  • The stamp expression is easy to mistype, and gives very few clues when you get it wrong.
  • Even if you don't get a syntax error, its still easy to point to the wrong sop, or the wrong attribute name, again you have no clues why its going wrong.
  • A lot of older tutorials make use of the attrubte stamp variable1-n parameters, which are also esoteric and weird, easy to get wrong
  • The backwards flow confuses, makes houdini data flow seem more mysterious than it is
  • It's slow when you ramp up in scene complexity.
http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
670 posts
Joined: Sept. 2013
Offline
Even in professional tutorials you will occasionally witness careless uses of heavy nodes like copy, rays, VDBs or cumbersome workflows. Oftentimes you can replace them by fast, elegant, robust and more specific solutions in VEX.

As you mentioned copy-stamping I attached an example, in this case an alternative route to create a brick wall. Instead of branching and noodling copy stamps, transforms, Hscripts and groups, you will find one sequence of discrete steps.

Attachments:
bricks.jpg (101.5 KB)
brick_wall.hipnc (77.4 KB)

https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
User Avatar
Member
4189 posts
Joined: June 2012
Offline
I'd be curious to hear if a beginner finds VEX easier. Usually without the correct training the mind goes into a fog of disunderstanding.
User Avatar
Member
28 posts
Joined: Nov. 2015
Offline
Here's my take on the brick wall. Now that I'm excited about brick walls! I wonder if something like this [80.lv] is possible. Perhaps by applying layers of noise to the surface?
Edited by aoakenfo - March 25, 2017 18:14:55

Attachments:
brick_wall_2.hipnc (83.7 KB)

User Avatar
Member
670 posts
Joined: Sept. 2013
Offline
In case you get bored with rigid bricks you can also pile any kind of shapes by stealing UVs from the uvlayout node.

Attachments:
piles.jpg (67.4 KB)
rock_piles.hipnc (103.2 KB)

https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
User Avatar
Member
28 posts
Joined: Nov. 2015
Offline
So the UV is used to evenly distribute the objects…awesome trick!

Also, came across this [vimeo.com] last night by sheer chance. At around the 38 min mark, he uses voxelization and the new boolean shatter to create worn edges on the bricks.
Edited by aoakenfo - March 26, 2017 15:11:42
  • Quick Links