Welcome to od|forum

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.

Search the Community: Showing results for tags 'attribute'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


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
    • Shaders
  • 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

Found 48 results

  1. Hi, When I select points from the viewport, how do I get a value of point attribute in python? I wrote a beginning like this: 1 import toolutils 2 viewer = toolutils.sceneViewer() 3 selection = viewer.selectGeometry('Get Ids From Select Points',geometry_types = [hou.geometryType.Points]) but I don't know how to continue this. thanks Shawn
  2. Hey guys. I'm pretty new to the houdini world, and I've been experimenting a lot of things. Is there a way to get the RGB values of scattered points using attrib wrangle? Im not too familiar with the VEX syntax, so Im having a hard time figuring it out. I have random colours signed to a scatter node and some geometry copied on to the points using a copy node. I want to limit scatter the geometry based on the colour of the scattered point. Thanks!
  3. Hi I'm new to this wrangle node programming, I've been busting my head over why this doesn't work for three days, it's so simple therefor i must be missing out on some general vex concepts. If anyone can please point me in the right direction that would be greatly appritiated. I have a bunch of points on a grid and their moving up and down via noise. I am trying to set up a point attribute that has a value of 1 when a point if moving up (positivly in the Y axis) and a value of 0 when a point is moving down (negativly in the Y axis). This attribute is called Direction, I'm computing the logic on temporary VEX variables and then writing them out to the attributes. Here's how it looks like : // 0 is going down, 1 is going up, -1 means the point has no direction // on the first frame they have no direction so the points just take their current heights so they can use them for comparison on the second and every other frame int temporary_Direction; float temporary_Previous_Frame_Height; if(@Frame == 1) { temporary_Direction = -1; temporary_Previous_Frame_Height = @P.y; } else { temporary_Direction = @Direction; // ------------> this is where the problem is (this is here so that the temporary variable get's the value of the currently proccesing point every frame) temporary_Previous_Frame_Height = @P.y; if(temporary_Direction == -1) // If the point has no direction { if(temporary_Previous_Frame_Height < v@P.y) // If it's going up { temporary_Direction = 1; temporary_Previous_Frame_Height = v@P.y; } if(temporary_Previous_Frame_Height > v@P.y) // If it's going down { temporary_Direction = 0; temporary_Previous_Frame_Height = v@P.y; } } } // Out_Values i@Direction = temporary_Direction; f@Previous_Frame_Height = temporary_Previous_Frame_Height; // Out_Values The problem here seems to be when I declare "temporary_Direction = @Direction", for some reason on the second frame when I read @Direction the value wich is given to temporary_Direction is 0 instead of -1 wich was given to every @Direction on the first frame. Temporary_Previous_Frame_Height updates just fine but temporary_Direction doesnt. Also writing "if(temporary_Direction == -1)" doesnt seem to work either. Is my thought process even slightly right here, what am i doing wrong, are temporary variables created in vex something that exist globally and in order to use them per point we need to read each point's values or are temporary variables something that exist for every point. Also why do i have to give values to all attributes every single frame or else they will reset to 0 (hense the Out_Values section). //////////////////////////// Update Thank you everyone for replying. I've tried out the time shift sop and it work's fine now( I dont even need the Previous_Frame_Height attribute anymore). I've updated the main post with the original hip file and the one with the time shift sop. Learning about the time shift sop is great, but i would still like to improve my thought process on writing code. It would be greatly appritiated if someone can take a look at the original hip file and possibly shed some light on the problem. I've added notes inside the original hip file for clarity. Any help would be appritiated Thanks in advance Original.hip Time-Shift SOP.hip
  4. Hi I need to initialize an attribute in a wrangle wich runs in Detail mode (only once), so I cant simply write " i@status; ", thats why I thought to use a for loop and the setattrib() function, but that code does not create any attribute on the points...why is this happening? Thanks
  5. I'm pretty new to Houdini and i've seen the "Active" attribute come up a few times in tutorials. I searched but couldn't nail down exactly why and where this comes from in Houdini. I get that it seems to pertain to DOPS and Glue constraints but I wasn't really clear on it all. I've seen people create it in sops and use it later in dops to activate things. My questions are: Is the "active" attribute a native attribute that nodes in DOPS looks for? Does it control all dynamics/force/glue or can you specify? Really any general info on it is appreciated! Thanks!
  6. Hi So I have some Vex code and I keep getting this warning: It says "implicit cast from float to int, use explicit cast instead". Now I know this warning message, but I dont understand why Im getting it here, since Im dealing with vectors...the code works and everything, but I keep getting that and I don't know how to get rid of it. Any hints? Thanks.
  7. Hello! I'm encountering a little problem with Pyro Fx. When I export a geo file from any fire, the attributes of heat, temperature and fuel look good in the viewport but when I render them, I get a particles cube. It seems that those attributes are not exported in my bgeo files (I tried with Vdb files and got the same result). Is it a bug or is there a step that I missed in the export? Thank you!
  8. Hello guys, i think this is a peculiar problem I have to "fuse" 2 meshes and VDB looks just perfect for the job. The 1st mesh is an orange (alembic) and it have some perfect UVs. What I did is a simple vdb setup to combine the 2 meshes + an attribute transfer to get the uvs from the orange but, unfortunatelly, it looks like some of the polygons are still connected in some parts where it shouldn't be. Does anyone knows a solution for this? I can't share the original scene so I've recreated it in a simple way. The original one have a face to mix with the orange. here's the images + scene file (with abc) in case someone can have a look at it Thx again, Alvaro UVs Transfer Problem.rar
  9. Hello community : i created this short tutorial on how to use the reorient attribute node in houdini and also i showed how it is work, it is some math matrix stuff, hope you find it helpful and hope you like it : Note : this training will give you nice idea of using the Matrix in Houdini , .
  10. I'm following along a tutorial that uses Houdini 12. I'm on Houdini Indie 15.5. There are a few things that have changed (new check boxes and expression names) and what I'm doing isn't working as it appears to be in the tutorial. There is probably a few ways to do this... I'm open to suggestions, but I want to also understand what changed or what I might be doing wrong. I have two sides of my node graph. One is a Grid plugged into a Mountain (to displace). The other side is a Sphere plugged into an attribute create which I've made an attribute called meshPush. Both sides are piped into an attributeTransfer. Finally at the bottom, there is a point node where I am supposed to add an expression to the Y position to displace my grid using the sphere. When I try to add my expression to position Y (@P.y + $MESHPUSH) that actual attribute isn't working and not actually showing up. Hope this makes sense. Can someone take a look and let me know why this might not be working properly? Thanks in advance from a new Houdini user. Learning_01.hipnc
  11. I ticked the "Create Fracture Attribute" in finiteelementsolver1, can i use that attribute and put that in gravity node somehow to make the fractures be affected by gravity but them only.
  12. I am using the following code to change the scale parameter in a geometry node: { s = @scale; if (s < 1) { if ($FF >= ch("/obj/CONTROLS/Start_Frame_HV")) { s = s + .25; } } return s; } I am able to grab the value, evaluate it, add .25 to it, and it is reflected on the desired frame. However, after the very first time, it will not add to it and it stays at .25 until scene completion. I have tried referencing it via the ch("...") function but it always comes back with a recursion too deep error. Up until it hits the desired frame, which is 24, the value remains at the desired value of 0. Then at frame 24 it is set to .25, so this tells me that this script is evaluated at every frame, or am I missing something? I am able to increment it from 0 to .25 at frame 24, but nothing after that. Any guidance would be much appreciated
  13. Hey Guys , i have a scattered points on a surface , and this points have noise as their color , i want to make a volume from those points , and also multiply volume density with points color , but cant find any way to transfer attribute from points to volumes . is there any solution to make this happen ? thanks
  14. Hi guys, i have this sphere where i have a geo displacement driven by color, to animate the color attribute i thought i could use another sphere that i can animate on the surface, the problem is that i don't know how i can do it. Anyone have some suggestions?
  15. How the heck does this work?! Within the solver is the attribute Transfer with "Previous Frame" in the left input and the Sphere in the right input. How does the solver know to transfer to the grid when it is not specified in the solver? Transfer_within_Solver.hipnc
  16. How exactly does attribute interpolate work? I have the following network but when I change the mountain SOP the points jump all over the place! I've turned on Prim Num attribute and sourceprimuv attribute in the scatter SOP.
  17. Hey guys, I'm having an issue where the Alpha displays properly in the viewport but doesn't work when rendered. I've done this before, just a simple Constant shader, and it always worked. Here is what it looks like in viewport vs render: I looked at other threads and none of the solutions work in this scene. Here is the scene file: 0007_odforce.hip Thanks!
  18. How can i import attribute to geoself() geometry from second input of wrangle node if i don't know type of this attribute. I write function: parameters: native_input = 0 (first input of wrangle node) sample_input = 1 (second input of wrangle node) attribs = string like "attrib1 attrib2 attrib3" native_ptnum = number of point in current geometry where i want create attributes like in second input sampled_ptnum = number of point from second input where i want sample attribute. but cannon import any array attributes like "Cd" and etc... This function correctly worked only if attribute is not array (type = 0 or 1 or 2) :((( void sampleattribs(int native_input; int sample_input; string attribs; int native_ptnum; int sampled_ptnum ) { foreach(string aname; split(strip(attribs), " ")) { aname = strip(aname); if ( haspointattrib(sample_input, aname) ) { int atype = attribtype(sample_input, "point", aname); if (atype==0) { addpointattrib(native_input, aname, int(0)); int value = point(sample_input, aname, sampled_ptnum); setpointattrib(native_input, aname, native_ptnum, value); }; if (atype==1) { addpointattrib(native_input, aname, float(0)); float value = point(sample_input, aname, sampled_ptnum); setpointattrib(native_input, aname, native_ptnum, value); }; if (atype==2) { addpointattrib(native_input, aname, ""); string value = point(sample_input, aname, sampled_ptnum); setpointattrib(native_input, aname, native_ptnum, value); }; if (atype==3) { int def_value[]; addpointattrib(native_input, aname, def_value); int value[] = point(sample_input, aname, sampled_ptnum); setpointattrib(native_input, aname, native_ptnum, value); }; if (atype==4) { int size = pointattribsize(sample_input, aname); string typeinfo = attribtypeinfo(sample_input, "point", aname); float def_value[] = {}; for(int i=0; i<size; i++) append(def_value, 0.); addpointattrib(native_input, aname, def_value); setattribtypeinfo(native_input, "point", aname, typeinfo); float value[]; resize(value, size); int success = -1; //value = point(sample_input, aname, sampled_ptnum); //printf("%d\n", sampled_ptnum); //foreach(float v; value) { printf("%f", v); }; setpointattrib(native_input, aname, native_ptnum, value); }; if (atype==5) { string def_value[]={}; addpointattrib(native_input, aname, def_value); string value[] = point(sample_input, aname, sampled_ptnum); setpointattrib(native_input, aname, native_ptnum, value); }; }; }; };
  19. anyone know how can i read a value from a frame number ? for example in frame 40 and want to access an attribute value at frame 20. is this possible to do this via expression ? tnx
  20. hi, I want to control the emission of my particles via attrib. E.g. Cd, or a custom attrib it doesnt matter. In the attached example file I animated some points to get white after frame 30. When I use Cd for emission after that in the pop network it spawns particles everywhere on the surface until frame 30 is reached and than it uses the attribute as expected. Can I control the emitter in the particle network with attributes like if (@Cd> 0.5) ---> spawn!! if not - dont spawn anything. Or with a custom attribute like if(@heat > 30 ) spawn particle....etc. Or is this better achieved in another way in houdini? Thank you in advance. kind regards Jon attrib_as_emit_value.hiplc
  21. Hello, I'm looking for the best way to prevent an attribute from changing once it has reached a certain value. I'll have other benefits from this, but for now it's to control the "active" state of some points via an animated object. I'm setting a group of point with a bounding sphere grouping, then I wrangle i@active = 1 for that group. but, obviously, when a point is back out of the sphere, it's out of the group and gets a @active = 0 again. I'm wondering if it's doable in VEX (if active becomes 1 then never change again) or if there's other tricks to do that. here is a simple hip file where I move the points up when they are in group1, so for this exemple, I would like the point to never come back down if they get moved. Thank you! I've seen a way to do that in a particle tutorial, where the colours get changed and is then prevent from changing back when outside a box, but I just can't remember, and can't get my hand on that video again : / OD-F_keepattrib.hipnc
  22. Hey guys, first post here. I'm extremely noob at Houdini and I've got a very basic question. I've got a particle system going, and after the POPs system in the Source Particles SOP it creates, I'm trying to use the Y position of each particle to drive a Blend Sequence that is copied onto the particles with a Copy SOP. What I haven't been able to find is how to query the Y position of my particles. I can find their positions with the Geometry Spreadsheet, but the name of the attribute it gives me is "P[y]", and typing that into an expression doesn't seem to work. I had thought it might be "@P.y" but that errors out as well. I think one of the problems is that I'm not telling Houdini WHAT to find the Y position of. But again, not sure how to find that. I've googled and did a cursory search of the forums here but all the posts I've found are way more advanced than this simple thing I'm trying to find Can you fine gentlemen/ladies point me in the right direction to find how to query this sort of basic data? wk2_copy.hipnc
  23. Hi all! I'm pretty noob with houdini so maybe this will be a silly question :-) As the title says, I can't find a "direct" way to access to global variables in point/attribute wrangle nodes( maybe it's not possible?). In my case I would access to $NFRAMES global variable to pass as parameter in fit() function to normalize frames count, but obvioulsy as reference guide say: Now I found a workaround: I create an attribute(with attributeCreate node) with $NFRAMES as value and then I can access in the wrangle code snippet. It works but I don't like this method because: for now I have just a bunch of points and the memory footprint is relatively low but what if I crank up the value for thousands of points? if I'm not wrong, integer values are handled as C small int so 4bytes*100.000 points will increase the memory footprint( I know that are just of bunch of KB but I'm "obsessed" with time/space performance). There are some "clean" way of get global variables? Thanks in advance
  24. Hello! I have a question for what I thought would be fairly simple to figure out. I'm trying to use an attribute from a per point object level to influence the emission strength of my Arnold material. I'd usually just use a bind node, but that option isn't available in Arnold. Anyone know the HtoA equivalent? Thanks in advance for any tips.
  25. Hello everyone, I am fracturing a geometry and need to delete the pieces bellow a certain size. My problem is that I don't know how to delete based on size. My guess is I need to create a size attribute somehow and then delete based on that. I am sure this should be pretty straight forward but couldn't find any info on that, please give me some ideas, thanks!