Rival Consoles Posted October 3, 2019 Share Posted October 3, 2019 Hello peeps, I'm trying to do something relatively simple and I think this was asked before but so far I couldn't find the right answer or the right video with that info, so far. Somewhat easy question.... I have a custom point attribute created with a value @Cd from an "attribute from map" node placed up in the stream and I want to use this custom attribute to control a parameter, in this case "scale.y" of a geo copied on points. I remember watching one of Jeff Wagner's class sometime ago where he talks about attributes, attribute transfer and using attribute as parameter and on the ladder, he calls a custom attribute on a parameter by typing the custom attribute name in the parameter field, something like "@customattrib > 0.3" or something similar to this. Curiously, I remember thinking that that trick was neat because he didn't use the famous point() or detail() expressions in the parameter field to call the custom attribute inside the parameter. Very efficient way to use custom attributes...That said, does anyone knows the video where he talks about this or knows that correct syntax to call the custom attribute in the parameter field without using the point or detail expressions? Any help is greatly appreciated. Quote Link to comment Share on other sites More sharing options...
vtrvtr Posted October 3, 2019 Share Posted October 3, 2019 That doesn't work everywhere. It works in `group` type parameters or the polyextrude node (if you set it up in the UI), for example. It doesn't work in many other parameters. For consistency sake you're better sticking with the `point(...)` syntax or the Python equivalent. That will work in virtually all cases. Oh, yes, you might be confusing it with the new PDG stuff that lets you do `@attribute` if you set it up in TOPs. That also works in most places. Quote Link to comment Share on other sites More sharing options...
Rival Consoles Posted June 25, 2021 Author Share Posted June 25, 2021 Hey @vtrvtr, Thanks for the heads up. I tried using the "point(/..)" expression inside the parameter and it doesn't really do what I was expecting. In this case i'm using a color attribute called @grad applied to the whole model to drive an inset in certain regions using the poly extrude sop (ideally adding the color attribute in "Thickness Ramp" section, inside the "Value" parameter) but with the "point()" expression I can only access attributes from 1 point. What would be the procedure to have the inset only in white areas using the poly extrude/thickness ramp control, for instance and leave the black areas untouched? Quote Link to comment Share on other sites More sharing options...
toadstorm Posted June 25, 2021 Share Posted June 25, 2021 Here's a quick example... not sure if this is exactly what you're looking for. I'm just building a ramped attribute and using that as the inset mask attribute. inset_by_attribute.hip Quote Link to comment Share on other sites More sharing options...
Rival Consoles Posted June 25, 2021 Author Share Posted June 25, 2021 @toadstorm Thank you for sending the file. I'm looking for something that is almost like that but with a little more control. I'm using a second model to drive the insetting by transferring colors from an object to another object. I used your file to show what i'm looking for. Essentially, I painted the sphere black, created another object with a curve and painted it white and then transferred the colors from the object to the sphere which is working. However, I find controlling the insetting through the Ramp Thickness value much more stable than through the regular "Inset" parameter. That said, I'm curious to know if it is possible to use the transferred color attribute in the "Value"parameter inside the Thickness Ramp section within the poly extrude sop to control the insetting. Attached is the file. inset_by_attribute_1.hip Quote Link to comment Share on other sites More sharing options...
toadstorm Posted June 25, 2021 Share Posted June 25, 2021 I'm not exactly sure what you're getting at with the Thickness Ramp. That's for spine profiles, and you're not using one of those. If you were extruding faces along a curve and wanted to control the extrusion thickness over that length, that's the control you'd use. If you *are* trying to use this to drive extrusion inset along a spline, you can just draw that ramp and then enable use of a Thickness Attribute, and pass along your attribute like before. In the file you sent me, all you need to do is set the Local Control > Inset Scale attribute to "inset". inset_by_attribute_2.hip Quote Link to comment Share on other sites More sharing options...
Rival Consoles Posted June 26, 2021 Author Share Posted June 26, 2021 Once again, thanks for the file! So, I tend to use thickness ramp for insetting because when I'm working with more organic poly models sometimes the "Inset" ends up braking the polygons due to its area or it doesn't give enough insetting due to the "Limit Insetting" option or the "Use Common Limit" option. I'll try to create an example where I use the color to drive insetting and yet by driving it through the "Inset" parameter becomes a little limiting due to smaller area polygons on a model that has small and larger polygon areas. When that is the case, the smaller polygons prevents the bigger polygons to get a lot of insetting. The result is usually a nice inset in small polygons but not enough inset on bigger polygons. I was aware about turning on the inset scale control and add the attribute there but in the case that I described above it doesn't work that well. Still, thank you for explaining. Quote Link to comment Share on other sites More sharing options...
Rival Consoles Posted June 26, 2021 Author Share Posted June 26, 2021 OK, so here is the file that illustrates what I'm talking about regarding the "Inset" parameter being blocked by small polys in the model. Actually, I just discovered that by unchecking the "Use Common Limit" option in the poly extrude sop, the "Inset" works pretty much the same (aesthetically speaking) as the thickness ramp value which is what I'm looking for. Anyways, attached is the file showing the "Inset" parameter with a value of 50 and still a minimal amount of inset created on the polys as I mentioned. That is due to the small polys in the model that are blocking the inset for the bigger polys but I guess I just found a workaround inset_by_attribute_3.hip 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.