Jump to content

konstantin magnus

Members
  • Content count

    385
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won

    10

konstantin magnus last won the day on April 30

konstantin magnus had the most liked content!

Community Reputation

154 Excellent

5 Followers

About konstantin magnus

  • Rank
    Illusionist

Contact Methods

  • Website URL
    http://www.konstantinmagnus.de

Personal Information

  • Name
    Konstantin
  • Location
    Stuttgart, Germany

Recent Profile Visitors

4,445 profile views
  1. Rotate cameras from vector list to degrees

    Hi Dominik, thanks for your help. Its a vector deviating from {0,0,-1}, exactly like the line SOP. So I am still looking for a method to convert this 3d vector to 3 degree values rx, ry, rz. How is this usually done in Python?
  2. Vex shifting values.

    Try the modulo operator: http://www.sidefx.com/docs/houdini/vex/lang.html#operators
  3. Rotate cameras from vector list to degrees

    I have read lots of camera angles from a text file, and try to convert them from vectors to degrees: rot_list = rots.split() # ['0.768704', '-0.628123', '-0.120648'] rot_deg = hou.Vector3.angleTo(rot_list) node_camera.parmTuple('r').set(rot_deg) It throws an error: unbound method angleTo() must be called with Vector3 instance as first argument (got str instance instead)
  4. VEX - create primitives from arrayvalues

    Read this: http://www.tokeru.com/cgwiki/index.php?title=HoudiniVex Type it off, play around with the code, change and break stuff, close the tab and try it blindly, write your own little scripts every day, google the forums and help others once you know smth.
  5. VEX - create primitives from arrayvalues

    You should use set() instead of {} when you mix numbers and variables. // roomsizes vector zim3 = {5.25, 2.50, 3.82}; vector zim2 = {3.65, 2.50, 3.90}; vector zim1 = {3.65, 2.50, 2.82}; vector kueche = {2.50, 2.50, 3.82}; vector bad = {2.83, 2.50, 3.74}; vector flur = {1.50, 2.50, 5.71}; vector aRaum = {1.50, 2.50, 0.96}; // create Rooms // create _LivingRoom int pos0 = addpoint(0, set(-(zim3.x*0.5), 0, -(zim3.z*0.5))); int pos1 = addpoint(0, set((zim3.x*0.5), 0, -(zim3.x*0.5))); int pos2 = addpoint(0, set((zim3.x*0.5), 0, (zim3.z*0.5))); int pos3 = addpoint(0, set(-(zim3.x*0.5), 0, (zim3.z*0.5))); int roomPrim0 = addprim(0, "poly"); int vert0 = addvertex(0, roomPrim0, pos0); int vert1 = addvertex(0, roomPrim0, pos1); int vert2 = addvertex(0, roomPrim0, pos2); int vert3 = addvertex(0, roomPrim0, pos3);
  6. Vex - Generate @Cd threw intersecting with a mesh

    There is an option in the group node for bounding objects. obj_bound.hiplc
  7. Array values to points

    Well, I usually read the documentation where needed. But I ignored the attribwrangle page thinking everything is done inside VEX code. I dont find the idea of setting "invisible" match attributes particularly elegant, either, as they dont show up in the code. But it seems to be the most straight forward way to access arrays fro other nodes in Houdini, so thank you again for the hint!
  8. Array values to points

    Thank you Victor! I didnt even know "attribute to match" existed! Its also described in the attribwrangle: http://www.sidefx.com/docs/houdini/nodes/sop/attribwrangle.html
  9. Array values to points

    Thank you, yes, that was it!
  10. Array values to points

    While trying to create a point attribute based on array values from second input, I was expecting this to work: v@Cd = v[]@opinput1_colors[@ptnum]; // only works on point 0 I also tried getcomp(), but it seems I am missing something. vector a = getcomp(v[]@opinput1_colors, @ptnum); // uses first array value on all points addpointattrib(0, "Cd", a); camera_to_screen.hiplc
  11. How to avoid double walls created by convertVDB

    Yes sure, I can delete points by their occlusion. But my question is rather if creating inner walls can be avoided right at the outset? Occlusion_test.hiplc (make sure to enable game dev tools)
  12. Replicating circular points around normals

    So you create "flat" circle coordinates based on u with sample_circle_uniform() and scale them immediately by adding a second vector component to "u" as a radius argument, calculate a rotation matrix based on the difference between an up vector and the point´s normal with dihedral(), and transpose the 2D circle coordinates to a vector3, multiplying it by the rotation matrix and adding that to the current point position. Now that´s clever!
  13. Add Vertex to Prim

    Normal SOP.
  14. Replicating circular points around normals

    I am currently using cross products and matrix transformations to replicate points in circles that are oriented by normals. Are there any more straight forward ways to achieve this with VEX? int points = chi('points'); float scale = 0.02; vector up = {0, 1, 0}; for(int i = 0; i < points; i++){ vector dir = normalize( cross(@N, up) ); float amount = (i / float(points)) * $PI * 2; matrix m = ident(); rotate(m, amount, @N); dir *= m; dir *= scale; int pt = addpoint(0, @P + dir); }
  15. Add Vertex to Prim

    I guess you should not squeeze functions into one another (eg point() into lerp()). This works in a primwrangle: float slide = chf('slide'); int prim_pts[] = primpoints(0, @primnum); vector pt_pos_0 = point(0, "P", prim_pts[0]); vector pt_pos_1 = point(0, "P", prim_pts[-1]); vector pos = lerp(pt_pos_0, pt_pos_1, slide); int pt = addpoint(0, pos); int midpoint = addvertex(0, @primnum, pt);
×