Gigglebooster Posted May 14, 2020 Share Posted May 14, 2020 Hi, I've been stuck on this issue for awhile. I have a line and I'm giving each point a float attribute called test, it goes from 0-1. Then, I'm copying torus on to those points, but I want to make the y radius of the torus equal to the @test attribute of the point it's being copied to. So one end would have a radius of 0 and the end would have. I'm trying to use a point function to do this but can't get it to work, here's the function I'm using in the radius y parameter of the torus - point("../OUT_POINTS/", 0, "test", 0) Any help would be appreciated, thanks. question.hiplc Quote Link to comment Share on other sites More sharing options...
Sepu Posted May 14, 2020 Share Posted May 14, 2020 (edited) I really do not know what you are trying to do looking at your file. Do you want to do something like this? Edited May 14, 2020 by Sepu Quote Link to comment Share on other sites More sharing options...
Gigglebooster Posted May 14, 2020 Author Share Posted May 14, 2020 Yes, that's what I'm doing for. How did you do that? Basically, I'm trying to make the radius change based on the float attribute of the point it's being copied to. The float attribute in my scene is called @test, so I'm trying to set the radius y as the @test attribute so that one would have a radius of 0, and then the next .1, and the next .2. Quote Link to comment Share on other sites More sharing options...
Sepu Posted May 14, 2020 Share Posted May 14, 2020 (edited) You do not need to do that. Think in pts. f@pscale (uniform scale) is the attribute that you use to affect the torus that way, and delete the point function in the torus. There is a lot of different attributes that you can give to your pts before the copy to points, which reads these attributes. I would recommend going through this. https://www.sidefx.com/docs/houdini/model/attributes.html Edited May 14, 2020 by Sepu Quote Link to comment Share on other sites More sharing options...
Gigglebooster Posted May 14, 2020 Author Share Posted May 14, 2020 Hi thanks for the reply. I understand what you are doing now, but I'm still not getting how to reference the parameter of the the geo being copied. I understand that pscale can be adjust on the points before it's being copied to effect the overall size, but for what I'm trying to do I only want to effect the y radius or y scale of the torus and not the entire size. Also, I want to plug that into a point VOP and setup a ramp so that I can control the attribute that is effecting the radius size. That's why I wanted to create the test attribute and use that, so that I could then use @test in a VOP and control that. Is there no way to directly reference the attribute of a point it's being copied to? Quote Link to comment Share on other sites More sharing options...
Noobini Posted May 14, 2020 Share Posted May 14, 2020 here...beware rady could be 0...maybe add a minimum to it ? question_mod.hiplc Quote Link to comment Share on other sites More sharing options...
Gigglebooster Posted May 14, 2020 Author Share Posted May 14, 2020 That's exactly what I needed Noobini ty! I didn't realize you had to add the node you are referencing to a for loop like this Quote Link to comment Share on other sites More sharing options...
Noobini Posted May 14, 2020 Share Posted May 14, 2020 16 minutes ago, Gigglebooster said: That's exactly what I needed Noobini ty! I didn't realize you had to add the node you are referencing to a for loop like this well your null is nicer to get to, is all, it would still work if instead of the null, you use "foreach_begin1" instead, cos each loop, it's processing 1 point (point 0), with the @test you setup beforhand. Quote Link to comment Share on other sites More sharing options...
Gigglebooster Posted May 14, 2020 Author Share Posted May 14, 2020 Ah gotcha. What I meant was that I didn't realize you needed a loop at all for this, I was just trying to reference the null without one and it wouldn't work. Good to know too tho thx! Quote Link to comment Share on other sites More sharing options...
deselby Posted May 14, 2020 Share Posted May 14, 2020 You could also use the setup you had originally, but the issue there is that the torus node doesn't know anything about what's further down in the chain, so it doesn't know what point it's going to be copied to and can't set anything per copy. The trick is to replace your 'copy to points' node with a 'copy stamp'. This node lets objects that are going to be copied access information about the points they're being copied onto. (you may already know the following but I'm putting it in for peeps that need it later) Turn on 'Stamp Inputs' under the 'Stamp' tab, and put your test variable and a reference name for it into the variables. (I always use capitals for reference names to make them distinct from variable names, but you don't have to) Then in your torus node, put the following into the parameter you want to control (assuming your copy stamp node is called 'copy1'): "stamp("../copy1", "TEST", 2)" The syntax for this is "stamp(<node you're referencing that does the copying>, <reference name for variable you want to pick up>, <default value if we can't find the variable>)". I always set the default value to something that will be obvious if it hasn't worked, hence the 2 in this example. You can use this to set more or less anything on your copies, but beware that it can get very heavy when you're copying to huge numbers of points and you may need a different sort of solution. In that case it would depend a lot on your setup. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.