How would you create a trumpet shape using VOPSOP?

   2566   3   1
User Avatar
Member
32 posts
Joined: Feb. 2015
Offline
I am trying to use a ramp in VOPSOP to control the shape of a tube to be like a trumpet or bullet, in a procedural way. I have some idea but I just can't make it happen. Could anyone give me some hint to start? Or it's not doable?
User Avatar
Member
65 posts
Joined: Sept. 2014
Offline
Quick and dirty and some guru here is probably gonna present something way smarter, but it's a start.

Attachments:
vop_trumpet.hiplc (78.7 KB)

~ Messing about with pixels, vectors and voxels since 25 years [vimeo.com] ~
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
Create a parameter vop set to integer . At the sop level this will read in the amount of points in the circle. Divide ptnum by the number of points in the circle giving a result that gives groups of point numbers . ie the incoming point number 0 to 24 ( ptnum) get a value of 0 , incoming point numbers 25 to 56 ( ptnum) get a value of 1 and so. The result of the divide just changes the point numbers.


Create a parameter vop set to integer . At the top level this will read in the number of points in the line and again we divide the result from the first divide. The integer to float will prepare the values for the ramp vop which works in the range of zero to one. Create a parameter vop set to float, name it scale and give it a value of 1. Plug the result into a divide node , plug the ramp into the divide node. This will now give us control over the global scale of our object.


Transform matrix vop ( xform1) . Used to apply our scale values. Plug P from the globals into the pos , plug the result of multiply into scale.Create an import attribute vop. This is needed to import P from the points on the line. Define P as the attribute we want to import in. Set the OP index to 1 and make sure the lines output at the SOP level is connected to the 2nd input of the vop sop. inputs are read in from the VOP SOP as 0 , 1 , 2 , 3 , etc etc . Plug the result of the import attribute into the pivot input on the transform matrix. This defines the point for the pivot. so when we scale we get a correct point to scale from. lastly plug the output of the transform matrix into the P of the output vop.

Attachments:
rse_vopsop_scalesweep.hip (77.3 KB)

Gone fishing
User Avatar
Member
32 posts
Joined: Feb. 2015
Offline
Thank you so much, Farmfield and circusmonkey!!!

I didn't expect the steps to be that complicated, I am still way more to learn. Thanks again for sharing this valuable examples!
  • Quick Links