instancing with wrangle (not getting the same thing as tutorial)

   3688   8   1
User Avatar
Member
1004 posts
Joined: April 2017
Offline
Hi!

I'm following this tutorial:

https://www.sidefx.com/tutorials/rs4h-instancing-intermediate/ [www.sidefx.com]

But I'm stuck. When I set my s@instance of all points to the path of my sphere, it doesn't scatter like in the tutorial.

Can anyone have a quick look at my file?

Thanks.

-Olivier

Attachments:
instancing_with_wrangle.hip (92.4 KB)
instancing.JPG (103.1 KB)

User Avatar
Member
359 posts
Joined: April 2017
Offline
You can only instance object containers, not SOPs. So you could instance /obj/geo1, but not /obj/geo1/sphere1.
MOPs (Motion Operators for Houdini): http://www.motionoperators.com [www.motionoperators.com]
User Avatar
Member
20 posts
Joined: Oct. 2013
Offline
Hi Olivier
you need to reference an object at object level, try: s@instance = “/obj/geo1”;

–ups someone was two minutes faster to answer
Edited by raschberg - Sept. 13, 2018 16:08:45
User Avatar
Member
1004 posts
Joined: April 2017
Offline
arg!

So if I have multiple geos like:

-tree_oak_0001.obj
-tree_oak_0002.obj
-tree_oak_0003.obj
etc.

…I need to make an object container for each file?

-Olivier
User Avatar
Member
359 posts
Joined: April 2017
Offline
yes.

to speed this up, if you create an object container called /obj/tree_oak_0001, you could drop down a file SOP that read those numbers in to determine which OBJ to load. for example:

$HIP/path/to/objs/tree_oak_`padzero(4, opdigits(“..”))`.obj

then just copy as many object containers as you need.

you could also try using s@instancefile instead of s@instance. then just set the attribute to be the full path of the geometry on disk that you want to instance. this may work more effectively with .bgeo than .obj.
MOPs (Motion Operators for Houdini): http://www.motionoperators.com [www.motionoperators.com]
User Avatar
Member
603 posts
Joined: July 2013
Offline
I'm gonna redo these tutorials for H17, and they will include MOPs tools and other advanced scenarios.
Houdini Indie
Karma/Redshift 3D
User Avatar
Member
1004 posts
Joined: April 2017
Offline
Hi toadstorm!

The s@instancefile sounds like the best/easiest way to work! I've tried it but it doesn't work. When I look at the spreadsheet, there is a space in the path… Is that normal?


Hi Daryl!

Thanks a lot for your tutorials! They are pushing me in the right direction.

Since you use Redshift, I was wondering if I could use the instance trick by browsing directly to Redshift proxies. Would that be a good idea?

Thanks!

-Olivier

Attachments:
instancefile_att_space.JPG (135.1 KB)

User Avatar
Member
359 posts
Joined: April 2017
Offline
Your path is jacked up, probably because you're using backslashes instead of forward slashes. Backslashes are interpreted as escape characters, and “\t” is a tab, which is probably why you're getting that huge gap there. Just use forward slashes.
MOPs (Motion Operators for Houdini): http://www.motionoperators.com [www.motionoperators.com]
User Avatar
Member
1004 posts
Joined: April 2017
Offline
Ahh!

So copy/pasting from a windows browser is a bad idea…

Thanks!

-Olivier
  • Quick Links