Search the Community

Showing results for tags 'vex'.

• Search By Tags

Type tags separated by commas.

Forums

• General
• Lounge/General chat
• Education
• Jobs
• Houdini
• General Houdini Questions
• Effects
• Modeling
• Animation & Rigging
• Lighting & Rendering
• Compositing
• Games
• Coders Corner
• HDK : Houdini Development Kit
• Scripting
• Art and Challenges
• Finished Work
• Work in Progress
• VFX Challenge
• Effects Challenge Archive
• Systems and Other Applications
• Other 3d Packages
• Operating Systems
• Hardware
• Pipeline
• od|force
• Feedback, Suggestions, Bugs

Interests

Found 250 results

1. Particles along surface

Greetings to the best forum on the web I am struggling a little with wrapping my head around the xyzdist() and primuv() functions in vex. I have attached a scene file that holds a dopnet with some points created on frame 1. I would like those points to stick to the geometry coming into the second input on the dopnet. any suggestions to how this could be done is appreciated. I am in particular interested in the usage of the xyzdist() and primuv() solution, however other methods is also encouraged! should there be some people that wanted to "show off" a little vop magic that is cool too. looking to learn so hit me with everything you got. All in all a simple task but good fun. Thanks for playing Cheers particles_on surface.hiplc

int handle = pcopen(0,"P",@P,@pscale,ch("maxpoints")); why no effect?
3. What primhedge function does ?

Hello, I want to ask one quick question. What primhedge function does, according to help file it is returning the number of an arbitrary half-edge that contained in prim. If anyone know about this function and know what is the use of this function please expain me. Thanks
4. VEX 101 and new point SOP

A lot of old tutorials use the old point SOP for a color ramp, purely to assign a number between 0 and 1 for some future purpose. For instance for a line oriented along the y axis, the old point SOP has the color channels deleted and then puts an "add color" of (\$BBY,0,0). Sometimes normals are deleted as well. Commonly the next node added is an attribute VOP with a ramp parameter to reassign this 0-1 range on the red channel to some spline ramp value. I am trying to not use the old point SOP for new models. I see there are two different nodes, and I am not sure which to substitute: the "point wrangle" with yellow cowboy hat (attribute wrangle) and the new "point" with red cowboy hat (attribute expression). Which is better to use? With the point wrangle, I can put in VEX code like "@Cd = set(.5, 1, 0);" to assign a constant color, but what would be the equivalent of \$BBY? What is the VEX equivalent of the old point SOP "no normal" to delete normals? Thanks.
5. Deforming curve with vex (sin)

Im trying to deform a curve with vex. I want to deform it with a sin function. Kinda rookie on vex but i thought this would work. I create a curve with just a start and end point. Resample it to say 50 points. Add a attributeWrangle and add this vex code: @P.y = sin(@P.y * 500) * 0.1; I get no errors in the code but i dont get any result at all either. Anyone got any clue? I tested alot of different numbers just to make sure it wasnt the size of the sin curve but i get nothing.
6. VEX - Variables/attributs in vectors

Hi all ! I'm struggling with an addpoint function, I'd like to use a variable to declare a point but it seems that's not allowed… What is the proper way to do this ? My code in a pointwrangle : float height = fit(rand(@seed, @ptnum), 0, 1, 0.4, 0.55); addpoint(0, {0,height,0}); if I put a 1 instead of "height" it creates the point perfectly well :/ Thank you for your help !
7. How to get live op data from channel expression

I added a custom operator interface to a Point Wrangle node to get a point position (from an add node). In the screenshot below I'm referring to the 'Target' string input in the UI / parameter name 'opPath'); Using the standard chs() function I can get the value of the node dropped into Target/opPath. Using the op: operator I was assuming this data would be live (eg. if I move the point geometry referenced in Target/opPath I was expecting the coordinates returned to the point() function to change accordingly) ... but it doesnt happen (stays whatever value is set at frame 0). The solution (screenshot) is to hard code the path to the target object using the op:operator (position coordinates get update if the geometry changes). If I uncomment the first line (and comment the second) then the coordinates no longer get updated. It's annoying as I'd rather not hardcode the path to the object in VEX and rather use the chs() UI interface. Any idea? (also some clarity on how the op: operator works and when is it needed versus just referencing paths without it would be appreciate as couldnt find much on the subject) THANKS!
8. reset to origin.

Hello Odforce! I often find myself in a situation wanting to take each piece of geo I have from an alembic, move it to the origin and "reset" rotation for convinience, do some operations, and then move it back to its original place with its original rotation on it. However I often find my knowledge short to do this stuff. I have crafted an example file here of my problem and hopefully some of you can help me with a few examples on how to do this. As described in the file, this is what I want to do: - move each piece of geo to the origin. - calculate the rotation thats on the piece of geo, and "reset" it so that the point with @Cd = {1,0,0} is upwards. - put the geometry back to its original position with its original rotation. I hope you guys can help fill the gap I have when it comes to this kind of stuff. Cheers calculate_transform.hiplc
9. vex VEX Robot: movement & rotation issue

Hey guys, new here, nice to meet y'all! I'm new to Houdini and have been dabbling with VEX recently. It's a love hate thing. Being interested in social insects I got the idea to build a little "ant robot" that could follow a trail. It has a body (point) and three points that serve as sensors. These sensors sample the ground's trail attribute (red, works), compare their values, find the "winner" (works) and then the whole thing should rotate accordingly and move along a vector that goes from the body to the best sensor point to stay on track. (Works not so well). That's the status and at least it's doing some following the path, but I can't get the robot thing to rotate around a custom position. Instead, the matrix rotation always uses the world origin as a pivot which looks increasingly bad with distance and at a certain stage just breaks. Also, the body promptly severs itself from the rest, which is a tad unfortunate, as I wanted it to follow the sensors (stay attached) and serve as a the pivot for the rotate(). I know this is a little messy but maybe one of you would like to have a look at the hip and point me to the obvious mistakes I made. Much appreciated! Cheers, Felix Robot_movement_issue.hiplc
10. POP inherit point normal from passing a point

Hi Odforce. I have POPs moving past a point and I want the stream to inherit and keep the points normal after passing. I thought this would be a straight forward pcopen() case, but I cant get it to keep the normal. It's only there for as long as it is within the search radius. I've tried a few different things in vex. wrapping it in an If statement instead of while, but to no avail. Edit: I should maybe mention that I'm in SOP right after importing from a DOP. Tried to make it work in POP wrangle but had no luck there either. Thanks, Bastian
11. Houdini Expression Editor plugin

Hey Guys I wanted to share with you a small script I've done to have a better support or external editors to edit your expressions and code. It works with a system or file watcher, that means it doesn't freeze Houdini and you don't need to close your editor to see you updates It's available by a simple right-click on a parameter => expression => External Expression Editor ( you can set a hotkey ). It works with VEX and Python expressions but also regular HScript expressions ( but with no completion ). It works very well with Visual Studio Code as it has a nice VEX and Python plugins, but it could work with sublime text, notepad ++ etc. ( I haven't tested all the IDE out there so if you find a bug with one of them, feel free to send an email to contact@cgtoolbox.com ). A small video about it: https://vimeo.com/242470411 You can download it for free here: http://cgtoolbox.com/houdini-expression-editor/ PySide, PySide2 and PyQt are supported, it is compatible with Houdini 15 to 16.5.
12. vex VEX : opfullpath. Bugged or basic typing syntax error (from me) ?

Hi @ll, Firstly, enchanted to meet you all. I was testing the VEX function “opfullpath” in a simple way : // Getting the intrinsinc detail “numprim” via the function “detailintrinsinc”. Houdini Version : Nodes : one polygon Mesh(@opinput0) + attrWrangler. Detail intrinsinc signature is : detailintrinsic(string geometry, string intrinsic) Thus #1 : string geometry must be the path to Geometry Thus #2 : the command “in theory” could be : int primCount = detailintrinsinc( “op:`opfullpath(“../myInputedGeo”)`”,”primitivecount”); printf(“prim count : %g \n”, primCount); // to display. Saddly it doesn’t work… But : op:`opfullpath(“../myInputedGeo”)` is NOT a string it generes a string Thus #3 : command could be : string fullpath = `opfullpath(“../myInputedGeo”)`; int primCount = detailintrinsinc( fullpath,”primitivecount”); printf(“prim count : %g \n”, primCount); // to display. Saddly it doesn’t work… So it’s really hard to me to spot the worry…..because if you use the “lazzy” signature : detailintrinsinc(int opinput, string intrinsinc); It works but it has really really less power than using a path as the code will just look a the input0 of the wrangler’s entry rather than all over the scene to get its info. Probably a syntax error from me ? So if any body could help, you will be welcome please !!!. Bests, alr + + + pathtogeo-v004.hipnc
13. Arnesen Cubes in Houdini

Christian Arnesen did an awesome piece of animation with MASH, and I wanted to replicate it in Houdini: Here is the breakdown of 3 techniques for doing so, using Alembic caches, Copy Stamping, and VEX (file is attached below or at the link): Hope it's helpful! arnesen_cubes_in_houdini.zip
14. Creating a force array in vex

Hi all, I am struggling to write a force array per particle, i have an float array per particle named "upforce" and i want to use this array as my "y" force. Any tips? Thanks
15. points Delete Points based on Camera Origin

I'm trying to delete points bases on the camera's origin. I have a vex script that was calculating the visibility: vector camera_dir = point(1,"P",1) - point(1,"P",0); f@vis = dot(@N,camera_dir); the problem is that it's based off of having two points from a ray sop. Can I just do it based off the camera origin itself? Any help would be amazing! Thanks, camOrigin01_v001.hip
16. VEX expressions and wrangle nodes. Where to start ?

Hello, I have decided to study more Houdini. As i want to expand my knowledge regarding Houdini and not limit myself only with shelf tools. VEX expressions what tutorials or educational materials would you recomend and in what order? Note (need only up to date tutorials as out of date tutorials where they use nodes that are obsolite etc will not help but only create more confusion). Also what tutorials to go over regarding wrangle nodes. Best regards Tanel
17. Converting VEX to OpenCL

Hi My understanding is that VEX runs entirely on the CPU. But with the right hardware (ie latest Pascal based GPU) the same functionality in OpenCl could be magnitudes faster. Is anyone aware of any OTL or other project which have converted VEX code to OpenCL?

19. Blend parameter doesn't work with point attributes?

I'm trying to drive a BlendShapes' SOP blend parameter using a point attribute, @fade. The @fade is a point attribute and have it's value animated. But the blend parameter doesn't appear to read this animated values and keep showing 0 instead. The question: the blend parameter doesn't work with point attributes? I tried VEX and Hscript forms (@fade and \$FADE). The second crashes.
20. Jitter based on age

Hey all: I have a particle simulation with particles shooting outward from the origin. I am using the particle replicate to emit particles from particles. Here is the problem, I want the particles close together at the top but further away toward the bottom like the photos shown below. My Idea was to do a point jitter based of the age of the particle, so that new particles will have no jitter while old particles will have jitter. Would it be possible to accomplish that using vex in an attribute wrangle? Or could it been done in a point VOP with a slider to adjust jitter by age? Or is there a better way to have the older particles move out further outward? than using point jitter? explosion001.hipnc
21. Random grey scale point color wrangle

Silly question, but total wrangle noob here... I want to set random grey scale values on points, not sure if I should be using @id or @ptnum and how the expression would look? TIA
22. VEX Problem with precision comparing attributes

Hello, guys! I keep having an issue when I try to compare attributes from two distinct points. The VEX program tests if they are equal, like this: if(ptu == t_start) And although I see in the geometry spreadsheet that they are, the VEX code say they aren't. I thought It was a precision problem, so I rounded both values to a three float precision value //round t_start = rint(t_start * 1000)/1000; t_end = rint(t_end *1000)/1000; ptu = rint(ptu * 1000)/1000; This was the solution for some points and for others, the problem persisted. Some still have the same values in the spreadsheet and the VEX code interprets them as different values.
23. Fixing a value once it reaches a certain number

Hi guys, I was hoping someone might have a clue here...I have a vop with an object running over an rbd simulation to activate pieces, the only problem is they seem to be becoming inactive again after being activated. So the basic question here is if there is a way to fix an attribute once it reaches a number (in this case 1) so it cant change back to 0? Cheers!
24. Jake's HIPs Don't Lie

HI FRIENDS! So over the past year I've been doing far too much Houdini in my free time, and I noticed that all of the people I look up to in the community have their own cute ODForce threads. So with the release of my latest blog post on Voronoi Diagrams and Remeshing, I thought it best to make one of those threads, to avoid flooding the Education section with tons of new posts... Anyways here's a link to my new blog post: https://medium.com/@jakerice_7202/voronoi-for-the-people-60c0f11b0767 And if the link itself isn't enough, here are a couple of GIFs from the blog post, including one that didn't make the cut. All credit for the post title goes to @mestela <3 Big thanks to @toadstorm for editing my grammar as well, and the whole ThinkProcedural discord for putting up with my insanity
25. Quick and interesting challenge @Frame attribute

Hi all! Posting this challenge here means i've spent a lot of time searching for a solution at this problem, no succed. It's quite simple: You have a set of points, a randomly event occurs for each one of them and once that happens I want to set the frame of the incident into a point attribute. I think is simple but i've been stucked for a few days, hope you guys can find a solution and bright me one more time. Thanks! I attach an example (failed) file. setFrameIntoAtribute.hipnc
×