Primitive SOP in VEX

   3818   4   1
User Avatar
Member
606 posts
Joined: July 2013
Offline
So, I've just started churning thru Houdini Tutorials, and I've come across something I cant get my head totally round.

I have a simple sphere, with a facet, and then I'm scaling each polygon down 50% via a Sphere SOP -> Facet SOP -> Primitive SOP

I'd like to replace the Primitive SOP with a VEX SOP, but, my VEX code is not working at all.

Can someone help me with the VEX code?

Thanks.

Attachments:
2016-05-02.png (984.4 KB)

Houdini Indie
Karma/Redshift 3D
User Avatar
Member
1746 posts
Joined: May 2006
Offline
I've been at home sick today, been meaning to write up some notes on this for a while, today was your lucky day.

http://www.tokeru.com/cgwiki/index.php?title=Points_and_Verts_and_Prims#Transforming_prims [tokeru.com]


(Might want to read the full page for the entire story)


-matt
http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
606 posts
Joined: July 2013
Offline
Thanks Matt.

Love your website. It's one of the top free Houdini Learning resources I've found on the Net.
Houdini Indie
Karma/Redshift 3D
User Avatar
Member
606 posts
Joined: July 2013
Offline
In Softimage, you have the PolygonPosition (midpoint) ICE attribute. In Houdini, you have to calculate it yourself (which is fine as well).

I also thought about Packing the Polygons to basically move them into Point context, it makes the VEX and Animation alot easier, and as long as the Topology upstream doesnt change, I'd imagine it only has to Pack once because of the Dirty flags, right?
Houdini Indie
Karma/Redshift 3D
User Avatar
Member
1746 posts
Joined: May 2006
Offline
Yep. Did a little test, if I take the pig, fuse(unique) it, assemble+pack, I get about 30fps on my macbook pro by scaling or rotating the packed prims, about 17fps if I scale _and_ rotate. If I deform the geo performance drops to about 10fps. Slower, but still workable.

I imagine on my crazy multicore machine at work it'd be a bit faster.

Attachments:
packprim_setintrinsic.hipnc (221.7 KB)

http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
  • Quick Links