envil Posted February 22, 2008 Share Posted February 22, 2008 Hi! in attach a simple scene grid->createAttr->mountain I want use my new attribute in mountain height... I use a point expresion, but without results How I make this? attribQ.hipnc Quote Link to comment Share on other sites More sharing options...
Marc Posted February 22, 2008 Share Posted February 22, 2008 Hi envil In this particular case you can just name your attribute 'height' and it will override what's in the height field. This works because the mountain SOP is a vex sop. Cheers Marc Quote Link to comment Share on other sites More sharing options...
envil Posted February 22, 2008 Author Share Posted February 22, 2008 Hi Mark! Thank you! but this scene is a simple test for my digital asset, where I need to use a different variables for height attr. Perhaps, exist another way to solve my problem?.. I know about a variable mapping, but I don`t know how to use it.. I need to see example Quote Link to comment Share on other sites More sharing options...
michael Posted February 22, 2008 Share Posted February 22, 2008 place down an attribute SOP you'll see the ability to rename an attribute so you could do something like this inside your HDA: myAttribName > height Quote Link to comment Share on other sites More sharing options...
envil Posted February 22, 2008 Author Share Posted February 22, 2008 (edited) use attribute node is additional way for solving question... but tell me, please, may I use first or second attribute, marked on attached image? and how .... Edited February 22, 2008 by envil Quote Link to comment Share on other sites More sharing options...
symek Posted February 23, 2008 Share Posted February 23, 2008 (edited) Take a look: http://www.sidefx.com/index.php?option=com...ighlight=#52982 Attribute is not a variable... and you access both of them differently in different places. So using $HEIGHT or point("../foo", $PT, "height", 0) depends on situation. good luck, sy. Edited February 23, 2008 by SYmek Quote Link to comment Share on other sites More sharing options...
envil Posted February 24, 2008 Author Share Posted February 24, 2008 (edited) Very interested post! Thank you, SYmek! Buuut... I have a new question In attrcreate node I create atrribute "foo" and why I can use this attribute in point node, and can`t use its on mountain node? In spreadsheet of both nodes its attribute is displayed.. and I set expression in point node for red color, and expression don`t working : point("/obj/grid1/attribcreate1/point1", $PT, "FOO", 0) is correct expression? Edited February 24, 2008 by envil Quote Link to comment Share on other sites More sharing options...
symek Posted February 24, 2008 Share Posted February 24, 2008 (edited) Very interested post! Thank you, SYmek! Stick to tstex version of that fairytale. More complete. In attrcreate node I create atrribute "foo" and why I can use this attribute in point node, and can`t use its on mountain node? In spreadsheet of both nodes its attribute is displayed.. I think because this is a VEX based node in fact (see "Edit VEX Function"). While this doesn't explain anything it describes the case. You can't use any local variable with it. I set expression in point node for red color, and expression don`t working :point("/obj/grid1/attribcreate1/point1", $PT, "FOO", 0) is correct expression? No, it's not. There is no FOO attribute you refer to in your expression. There is "foo" attribute and $FOO variable . Check txtex post again good luck, Simon. EDIT: Note that you can use relative paths inside one network: point("../attributecreate1", ...) or even outside network: point("../../geo2/attribcreate1", ...) Edited February 24, 2008 by SYmek Quote Link to comment Share on other sites More sharing options...
envil Posted February 24, 2008 Author Share Posted February 24, 2008 Thanks for very quick answer! one more problem remained - point expression function I create very simple Network, box1->point1. And in red color create expression on example in help: _________________________________ // Example from help --------------------------------------- point("/obj/geo1/facet1", 3, "P", 0) _________________________________________________________________________________ Returns the X component of point 3 of the facet1 surface node in geo1. _________________________________________________________________________________ My expr: point("./point1",$PT,"P",0) I thought that points must be painted in red colour depending on its positions on X coordinate... but its not work %)%) I`m very confused... Quote Link to comment Share on other sites More sharing options...
symek Posted February 24, 2008 Share Posted February 24, 2008 (edited) The easier would be with $TX variable in Cr component of Color This is recursive error I suppose. Try refer to previous operator instead if you need point() expression madly! HTH, Sy. Edited February 24, 2008 by SYmek Quote Link to comment Share on other sites More sharing options...
envil Posted February 24, 2008 Author Share Posted February 24, 2008 (edited) I just want understand how work point expression function Edited February 24, 2008 by envil Quote Link to comment Share on other sites More sharing options...
Marc Posted February 25, 2008 Share Posted February 25, 2008 Yeah just do what Symek said. Refer to the SOP above the point1 SOP in your expression. So if it's box1 then your expression should be : point("./box1",$PT,"P",0) Quote Link to comment Share on other sites More sharing options...
envil Posted February 25, 2008 Author Share Posted February 25, 2008 (edited) Yes, I did that... And is did not work Edited February 25, 2008 by envil Quote Link to comment Share on other sites More sharing options...
3__ Posted February 25, 2008 Share Posted February 25, 2008 (edited) I think I'm getting the same problem here, with a custom vop... entering any kind of per-point data into a parameter will fail. Edited February 25, 2008 by cpb Quote Link to comment Share on other sites More sharing options...
symek Posted February 25, 2008 Share Posted February 25, 2008 (edited) I think I'm getting the same problem here, with a custom vop...entering any kind of per-point data into a parameter will fail. You don't need to do it in case of custom VOPs. $NNX is pointless here. If you created in Vops parameter which name is the same as gemetry attribute it will be used instead of any value specifed in UI. You can hide it from UI or read about "isbound" option in paramters VOPs. Geometry attributes over-ride VEX variable (both in SOPs and in Mantra rendering). Yes, I did that... And is did not work point("../box1", $PT, "P", 0) dot dot slash box1... Edited February 25, 2008 by SYmek Quote Link to comment Share on other sites More sharing options...
envil Posted February 25, 2008 Author Share Posted February 25, 2008 (edited) Yes, dot dot... Thank you! Edited February 25, 2008 by envil 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.