Jump to content

j00ey

Members
  • Content count

    262
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by j00ey

  1. Temporary variables in VEX Help

    I've only quickly scan-read your code but first thing I'd try would be to fix the typos - you've spelled temporary with an 'i', ie 'temporari' in a couple of lines
  2. Can someone tell me what I'm doing wrong here? I'm opening a point cloud in my shader, and I'm pretty sure it usually works like this [and in fact I'm getting the right result] but I'm getting an error saying implicit cast from float to int, even though I am casting $hnd as an int... This is my code : -------------- float $scalevalue; float $getconvex; $convex=0; float $pdist; int $hnd = pcopen($pc,"P",$worldpos,$r,$mp); <<--- Error is referring to this line int $numfound=pcnumfound($hnd); while(pciterate($hnd)){ pcimport($hnd,"point.distance",$pdist); $scalevalue = (1-($pdist/$r)); pcimport($hnd,"convex",$getconvex); $convex+=($getconvex*$scalevalue); } $convex/=$numfound;
  3. Hi. I wonder if anyone can help me. I want to create a point at for each of a large number of object [joints] and set its transform to match the corresponding object. I was hoping the object CHOP might accept wildcards like the fetch CHOP but it doesn't appear to. Is there another way to do this? Doesn't have to be a CHOPs method, though I would like to learn some more of that dark art...
  4. Getting multiple object transforms

    Ah yes, I totally missed that renumber was doing it, thanks for the tip!
  5. Getting multiple object transforms

    In case anyone wants to do something similar, I found a way with the foreach CHOP. File attached. There may well be a better method for doing it. Does anyone know how to set the rename CHOP to subtract 1 from every channel's trailing digit? At the moment I'm just renaming the last channel to zero, which is fine in this case but for future reference... joint_points_02_ODFORCE.hip
  6. Getting multiple object transforms

    I've attached a file here to demonstrate better what I'm trying to achieve. I think maybe the foreach CHOP might be the answer... Somehow or other joint_points_ODFORCE.hip
  7. Can anyone give me a pointer as to how to approach this. I have two point clouds with the same number of points. I want to pair the points based on proximity so that each point in each cloud is paired. The sticking point of course is that if I just do a point cloud look up and pick the closest point I get multiple points in point cloud A paired with the same point in point cloud B. My vague idea, which sounds very clumsy and slow is to do something like this in a solver: 1 - group all points in both point clouds, say unpaired_A_grp and unpaired_B_grp 2 - For each point in unpaired_A_grp find the distance to the closest point in unpaired_B_grp and store them in an array, also store the point numbers 3 - get the indices for the distance array using argsort 4 - reorder the point numbers with the indices, set an integer nearest_point attribute on the relevant point in point cloud A and move it from unpaired_A_grp to paired_grp_A. 5 - from point cloud B look up points in paired_grp_A and if ptnum is found in nearest_point set the same attribute and move point from unpaired_B_grp to paired_grp_B. 6 - clear 7 - repeat until all points are paired. -- I think this would work with a small number of points but if I have a million I have to run it a million times and it sounds very slow... Any ideas greatly appreciated
  8. Thanks for that. I haven't actually got chance to look into it yet, I got given another task before I got to finish that so I'm hoping to have chance to investigate at the weekend..
  9. Ah great thanks very much! I will have a dig around in there. I did search the forum but obviously not well enough...
  10. I think you have to enclose the whole lot in curly brackets for a multi line expression in a channel field. You can write it like this { float clip = 0.2; clip = if(ch("../Precise_Clipping/precise_clip"), clip, 0.01); return clip; }
  11. I wonder if anyone can give me a hand with a problem. I'm trying to make a large grid of cubes [but for the purpose of figuring out how to do it, it could be one cube], 'walk' around - that is rotate around one edge which is flat on the ground, then rotate around another edge on the ground, then another. The cubes must be copied onto points that have attribs stored on them to do all the rotation and transformation - at present I'm figuring out all the direction of travel in a solver and storing a direction attribute [left, right, up, down], I want to use that to drive the rotations but I'm a bit stuck with. I presume I need to use orient as well as some translation but my matrix / quaternion maths isn't good enough yet. The first stage is VEX but I've been trying to work out the rotation in VOPs.. eventually I want to convert it to VEX. Attached is a movie to make it a bit clearer. The cubes shouldn't slide, they should rotate into the next position around one of their edges, then repeat. Thanks blocks_odforce.mp4
  12. rotation around changing axes

    @ Matt - thanks a lot. That's very nearly what I'm after. I ported your method into my scene and with a box it appears to be working fine but if I swap out the box for a file SOP you can see they actually flip every time they change direction [see attached mp4]. The way I thought I would need to do it was to use the orient attrib before copying but perhaps doing it with primintrinsics is adaptable somehow, I need to do some learning on that topic. @ Edward. Thanks very much. Looks like a lot of useful information there, I will have a read and look through the files there. blocks_odforce_flip.mp4
  13. I wonder if anyone else has come across this and if I should submit a bug report... If I have the new polygon vertex count visualiser on, as soon as I have any unconnected points Houdini crashes. It's fine with quads and triangles and ngons but any orphaned points cause a crash...
  14. I'm having a problem with my hotkeys - I've searched but not found anything relevant. I'm using the new improved 15.5 topobuild and tried to use the different mode hotkeys as described in the mini tutorial but shift 2 and 3 didn't work. I tried to assign them in the hotkey manager but I'm using a UK keyboard, and shift 3 is the £ sign, which it would seem Houdini doesn't recognise. I've set brush mode to a different key but is there a way I can use non US characters? Also, I'm using a wacom and can't figure out a way to use the edge snap and edge divisions similarly to using a mouse wheel, rather than clicking and typing. Minor concerns really given how much improved topobuild is now but it would make things even smoother... Thanks
  15. FEELINTHECAT

    This is something I've been working for the last few months - I don't have the finished film with the live action intercut but I'd be interested to hear other forumers' comments anyway. I left in some shots [like the close-ups of the arm and belly] that were not used as they were early tests and don't really work with the other shots. This version is more for showreel / show and tell. http://cargocollective.com/50percentgray/FEELINTHECAT **edit** I should add some more technical details. All Houdini except for the body scan itself and the Felix head which was modelled in Maya. The mocap data was very clean already so didn't need any clean up but there was a lot of self penetration of the skin when it was rigged and also floor penetrations and things like that that needed cleaning up. The fur sims needed quite a bit of post processing [also because of geometry interpenetration]. Render time was about 8 mins / frame for a wide shot, 30 mins per frame for the most extreme head close ups. I used a principled shader for the head which is a great shader but I found can get pretty slow. These times were doubled because everything was rendered through 2 cameras - not actual stereo but for display on the 2 screens. For anyone in the North West of the UK, it's on here at the moment. It's an Arts Council England commission, part of their 70th anniversary celebrations and it will be travelling elsewhere once it's left sunny Blackpool.
  16. FEELINTHECAT

    Ha, I guess it is a bit opaque! There is a bit of info on that page lower down in case you're interested. I'll try and add some more when I get chance... But basically it's a guy in a fur onesie with a Felix The Cat mask on. The general look-reference for it was along the lines of backstage at a cosplay event in a conference centre...
  17. Setting attributes using VEX

    To set a float attribute in a wrangle node you can write f@dir = 1; To set a vector attribute you can do v@dir = {1,2,3};//note curly brackets or else if you want to set it to some sort of variable you need to use the set() function - v@dir = set(@ptnum, @N.y, 0);
  18. Hi I have a few flipbook sequences of identical length, resolution etc that I want to just append one after the other and then write back out as one sequence. I've got the following expression in the filename field : $HIP/COPS/granularTest_v`padzero(2,ceil($F/75))`.`padzero(4,(($F-1)%75)+1)`.jpg I can see that it's evaluating correctly but what I'm seeing on screen is the first sequence looping. I've tried different post extend settings and setting the file range length differently but it doesn't work. I will do this manually for now but it would be very useful in future to be able to do this if anyone knows how... Thanks in advance
  19. I have a CHOPs problem I wonder if someone could give me a hand with. I'm trying to quantize the point positions of my geometry with a limit CHOP, which is working fine, but I want some regions to use a different step size. I have an attribute on the points 'quantizemask' that I'm bringing in with a second geometry CHOP and i was hoping to write an expression on the step size along the lines of - chopi("../get_quantizemask/quantizemask",$I) essentially - for each sample look up the same sample in the quantizemask channel and use that value as the step size. Unfortunately that's not getting me anywhere. Can anyone give me a pointer? Thanks in advance
  20. eetu's lab

    Thanks for the info Francois, much appreciated. I will sit down and have a look through the code and make sure I understand properly...
  21. Has anyone else come across this odd behaviour when trying to save a preset on a ROP? If I mouse over the menu items in the gearwheel dropdown, they all behave as you'd expect except for 'save preset' which instead pops up a visualisers menu... See pic attached. In fact I just tried some other contexts and it's doing the same in COPs and SHOPs. SOPs is fine though.
  22. ROP - save preset

    Ah ok, thanks Graham. I did the bug report...
  23. eetu's lab

    Hi Francois. I was trying to use Eetu's tonemapper this morning too and he pointed me back here to get your amended version. For the sake of better understanding VEX, would you mind telling me what was causing the error? Thanks for posting the update too...
  24. Hi I've got a COPs problem to which I'm sure there must be an answer. I have a CHOP with some noise, the sample length is derived from the YRES of a COP. Then in COPs, inside a VOPCOP I'm trying to use the noise to sample different parts of the image. It's a distortion effect essentially. I put down a COPinput and promote the V parameter, then I need to write some expression to get the correct sample from COPs - something like chopi("../noiseGenerator/OUT/noise",$V) but I don't seem to have a $V or $Y or $IY or anything suitable. Can anyone tell me what I'm missing? Thanks in advance * edit * Test scene attached sample_CHOPs_problem.hip
  25. I got this to work in my proper scene but I had to use another workaround - when I switched to a different resolution it was computing the red colour in a few buckets but most of the image was black so what I did in the end was to render out temporary files from the pixel COP then read them back in before the VOP - I thought that wouldn't work inside an HDA but it did... Thanks for the help!
×