Welcome to odforum
Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.
fsimerey
Members
Content count
69 
Joined

Last visited
Community Reputation
11 GoodAbout fsimerey

Rank
Peon
Contact Methods
 Website URL http://fsimerey.com
Personal Information
 Name François
 Location Paris

fsimerey started following How can you connect Sublime Text with the Wrangle SOP

https://atom.io/packages/languagevex

fsimerey started following rotate with vex around axis next to the object

And you can do more. Rotate along the vector defined by 2 specific points in full 3d: // Points to define vector axis and center vector P0 = point(0, "P", chi("p0_axis")); vector P1 = point(0, "P", chi("p1_axis")); vector axis = normalize(P1  P0); vector center = P1  (P1  P0) / 2; // offset to center vector _P = @P  center; float ang = chf('angle'); vector4 q = quaternion(radians(ang), axis); // rotate P and N @P = qrotate(q, _P); @N = normalize(qrotate(q, @N)); // replace to origin @P += center;

fsimerey started following Setting array attribute element via attribute wrangle

Try this in wrangle Primitive node: i[]@arr = {1,0,1}; // Create an array with values i@arr[1] = @primnum; // Set primnum in array[1] This create and set value of an integer array.

It's exactly what i was looking for. Thanks f1480187

Ok, i found a solution to solve my problem, but it's not by identify nan value. The bad primitives have an intrinsic:measuredarea equal to nan too. So i keep only primitive with an area > 0.0001

Hello, i have a bad geometry with some vertex with nan value in @N. @N is a 32 bits float vector attribute, but nan is equal or not equal of which value ?

fsimerey started following How identify vertex's normal with 'nan' value ?

http://www.sidefx.com/docs/houdini15.5/hom/hou/Node#type With name() method, you can get the type of your node: hou.node('my_node').type().name() will return 'merge' if this node is a merge sop node.

fsimerey started following Copy and filter some children from a node to another node

Like your solution but the round result is not accurate. Try it with 3 decimals and 0.9996 Your solution result with 0.999 when the accurate must give 1.000

float a = 179.9996; string trunc = itoa(int(trunc(a))); int ifrac = int(rint(frac(a)*1000)); string frac = "000"; if (ifrac == 1000) { trunc = itoa(int(trunc(a)) +1); } else { frac = sprintf("%03d", ifrac); } s@result = trunc + "." + frac; Here the solution for string.

f@y = rint(@P.y * 1000) / 1000; If you want 3 decimal for a string, with zero on decimal, you must extract fraction and decimal, then concatenate those in string.

fsimerey started following 3 decimal of a float value in VEX or VOP

float gravity = pow(@Time, 2); if (@Time > ch("limit")) { float increment = pow(ch("limit"), 2)  pow(ch("limit")  @TimeInc, 2); gravity = pow(ch("limit"), 2) + increment * ((@Frame  ch("limit") / @TimeInc)  1); } @P.y += 9.8 * gravity; Here an example. The limit is a time value in seconds. Don't forget to click on the white button on the right of the editor area to spare parameter.

fsimerey started following Need help with simple VEX function

Use the good attributes see here http://www.sidefx.com/docs/houdini15.5/vex/snippets#attributes For your case the good expression is this: @P.y = @P.y + 9.8 * pow(@Time, 2); and you can simplify with: @P.y += 9.8 * pow(@Time, 2); But if you want a gravity effect, subtract is the better way

For C solution, i will copy detail attrib on a single point, use it as a point attrib in chopnet, then copy again to the original geometry. See attached screenshot.

fsimerey started following CHOPs, VEX and the future of chops in Houdini

You can get it with a Channel SOP, then use it in wrangler node. See attached file. VEX_CHOP.hip

See attached file with a purely SOP houdini approach which is the best and easiest, and another one, with a part done in VEX (a pseudo poly extrude). H15.5_hexa_deform.hip