HristoVelevFor what I was trying, my 'problem' was that the parameter was invisible. As soon as I changed that, it worked.
I can't seem to get it to work either - it doesn't evaluate the expression - I see the expression and not the result. That even after I change from literal to hscript/python in the channels tab.
Found 2036 posts.
Search results Show results as topic list.
Houdini Lounge » How to show parameter value in Network editor?
- BabaJ
- 2038 posts
- Offline
Houdini Indie and Apprentice » Job situation for international artists
- BabaJ
- 2038 posts
- Offline
swikarpFor this point you should contact the school/s themselves. They typically have administration, guidelines, self-help, etc. for Interntational students on their website so you can do your initial research.
4. Also if someone knows, can I do diploma in Vancouver Film School or any other school after my graduation ?
Houdini Indie and Apprentice » Possible to add another precision level to spinners?
- BabaJ
- 2038 posts
- Offline
I don't think you can.
But if you're getting that small in need for precision,
I think you're better off scaling up your 'scene'/object/s size so that you don't need that much 'precision'.
Just one more into 1/100k shouldn't be an issue but if you are even wanting to go smaller,
you're going to start having problems at some point with the results of floating point values being too small; Introducing errors.
But if you're only going with smaller precision before floating point errors become an issue; You could always make your own spare parameter and apply code, vex, python, expression, etc. to reduce it's size by multiples of desired 'precision'.
But if you're getting that small in need for precision,
I think you're better off scaling up your 'scene'/object/s size so that you don't need that much 'precision'.
Just one more into 1/100k shouldn't be an issue but if you are even wanting to go smaller,
you're going to start having problems at some point with the results of floating point values being too small; Introducing errors.
But if you're only going with smaller precision before floating point errors become an issue; You could always make your own spare parameter and apply code, vex, python, expression, etc. to reduce it's size by multiples of desired 'precision'.
Edited by BabaJ - Oct. 26, 2023 09:16:37
Technical Discussion » Identifying Vector 4 or Matrix 2 Attributes in VEX
- BabaJ
- 2038 posts
- Offline
viklc
Yes, but at least you can filter the data types per se.
Why not 'pre filter' - when the user provides data, have them specify with a drop down menu - what type it is going to be.
Then you can create a detail attribute that keeps/stores that information - So all you have to do anywhere downstream is look at the specified type chosen and deal with that accordingly.
Technical Discussion » Identifying Vector 4 or Matrix 2 Attributes in VEX
- BabaJ
- 2038 posts
- Offline
viklcSo you can maybe just put in an RFE for identifying attributes more specifically than what attribtype can give you.
I'm working on a tool, or rather a sub-tool, that makes it easier to work with attributes and to interact with them more flexible. For example, if the user provides a vector, the program can dynamically interact with it and provide user interface elements such as position or color components, similar to a vector 4 euler parms for normals rotation. For a matrix xform parameters or the matrix itself.
Otherwise I think what you need to do is reconsider your tool and think about what to do upstream for the initial providing of data by the user - in which you know what is what. Like what animatrix is saying - a drop down menu for the user enter. And based on what they choose,i.e. vector4 or matrix2, you decide how to handle it.
Technical Discussion » Identifying Vector 4 or Matrix 2 Attributes in VEX
- BabaJ
- 2038 posts
- Offline
viklc
then I can read out the size of the components, but for a vector 4 and matrix 2, the size is 4. Therefore it is not possible to separate these from each other
You don't have to - They are the same data wise. Unless of course have you had any function 'complain' when one is provided yet it asks for the other by 'name', rather than looking at the data it provides?
Houdini Indie and Apprentice » Grouping by expression not working properly
- BabaJ
- 2038 posts
- Offline
It's because you are dealing with floating point values.
To show that and see, just before your expression node, put down a primitive wrangle with justThen look at the values in a geometry spreadsheet with precision set to full.
You could just use > 0.999 rather than == 1.
To show that and see, just before your expression node, put down a primitive wrangle with just
@N;
You could just use > 0.999 rather than == 1.
Edited by BabaJ - Oct. 20, 2023 10:25:14
Technical Discussion » Where is the VEX syntax reference?
- BabaJ
- 2038 posts
- Offline
SWest
The example you gave I see as a solution to a problem. The fuction can’t be empty.
Yes, but in c/vex it's easy for me to know where to look (judging by the syntax alone) to figure out what that value is.
With Python, and lack of experience, I can't tell where to look for such an answer.
Technical Discussion » Where is the VEX syntax reference?
- BabaJ
- 2038 posts
- Offline
I just came across this code in another thread and not to discount anything you said;
I thought you might, if you happen to read this, might appreciate the 'same frustration' for lack of a better word,
of someone like myself who has a bit of c background and took to vex easily, but not python.
Because I had no need to know that the thread was about, I didn't ask for an explanation.
But just to give you an idea, for explanations sake...
So I'm looking at this code and wondering how the heck is this working,
the 'declared' function ...def foo(..... has only a return,
I couldn't figure out what it's returning and it seems ambiguous to how he is using it in
hou.Node.moveToGoodPosition = foo
Foo doesn't even have brackets or any arguments given it.(at first glance I don't know I'm dealing with a function),
but if the function is only a 'return' what is it passing on the hou.Node.moveToGoodPosition?
So I looked at a Python 'syntax' site, and it appears such a function written would return a 'none'.
So what is the 'value' of none that hou.Node.moveToGoodPosition is using?
integer 0, string '0', is it the comparable 'null' in c?
I would have to go to HOM and lookup moveToGoodPosition to find out what it 'takes' for 'inputs'.
(and/or do a internet search of Python and find out what 'none' is, does Python treat what 'none' is differently under different circumstances, etc.)
But for someone already familiar with Python I'm sure they are thinking, this is easy to see what is going on.
This is one of the angsts I have with Python in general, you have to remember more things about how the code could be written.
I find it harder to understand at times from the syntax alone(which I find much easier in vex/c type languages - strict).
So I thought I would just give some attempted comparable example;
Again, not to dismiss your desire for more documentation on syntax(examples) - but to highlight what I think is difference between documentation examples and examples to help one learn the syntax of a programming language.
I thought you might, if you happen to read this, might appreciate the 'same frustration' for lack of a better word,
of someone like myself who has a bit of c background and took to vex easily, but not python.
Because I had no need to know that the thread was about, I didn't ask for an explanation.
But just to give you an idea, for explanations sake...
So I'm looking at this code and wondering how the heck is this working,
the 'declared' function ...def foo(..... has only a return,
I couldn't figure out what it's returning and it seems ambiguous to how he is using it in
hou.Node.moveToGoodPosition = foo
Foo doesn't even have brackets or any arguments given it.(at first glance I don't know I'm dealing with a function),
but if the function is only a 'return' what is it passing on the hou.Node.moveToGoodPosition?
So I looked at a Python 'syntax' site, and it appears such a function written would return a 'none'.
So what is the 'value' of none that hou.Node.moveToGoodPosition is using?
integer 0, string '0', is it the comparable 'null' in c?
I would have to go to HOM and lookup moveToGoodPosition to find out what it 'takes' for 'inputs'.
(and/or do a internet search of Python and find out what 'none' is, does Python treat what 'none' is differently under different circumstances, etc.)
But for someone already familiar with Python I'm sure they are thinking, this is easy to see what is going on.
This is one of the angsts I have with Python in general, you have to remember more things about how the code could be written.
I find it harder to understand at times from the syntax alone(which I find much easier in vex/c type languages - strict).
So I thought I would just give some attempted comparable example;
Again, not to dismiss your desire for more documentation on syntax(examples) - but to highlight what I think is difference between documentation examples and examples to help one learn the syntax of a programming language.
LuSkar
jerry7
You can disable MoveToGoodPosition():
import hou
def foo(obj,relative_to_inputs=True, move_inputs=True, move_outputs=True, move_unconnected=True):
return
hou.session.__bak_moveToGoodPosition = hou.Node.moveToGoodPosition
hou.Node.moveToGoodPosition = foo
If you want to restore:
import hou
hou.Node.moveToGoodPosition = hou.session.__bak_moveToGoodPosition
Edited by BabaJ - Oct. 11, 2023 08:59:18
Houdini Lounge » Linux or Windows
- BabaJ
- 2038 posts
- Offline
gunjack
What makes you use linux? Let me know, I am really trying hard to love the linux but so far I don't see many good reasons to switch.
Don't switch - use both for where their 'strength' suits your needs.
Technical Discussion » Where is the VEX syntax reference?
- BabaJ
- 2038 posts
- Offline
SWest
// note: placing @boneCapture_index as an argument for the above function does not seem to work.
function string delCreg(string creg_names; string creg_to_del; int @boneCapture_index; float boneCapture_d)
function string delCreg(string creg_names; string creg_to_del; @boneCapture_index; float boneCapture_d)
In your second function line you have not declared what the @boneCapture_index is suppose to be but at the same time in both lines you are declaring that they are going to be attributes. You don't do that for declarations, you just declare the 'type'.
That means when it comes to actually using the function, if the argument is declared for example as an int - you can use either a locally declared int or an attribue that is also an int.
SWest
// this is the example from the docs
function int test(int a, b; string c) {
Here, although it may appear the same, this is a description of what you need to know for the function, i.e. what the arguments are going to be, what it returns, etc.
It is not a declaration like what you have for delCreg.
One is for you the other is for the compiler.
I wanted to say earlier, I don't think it's wrong for you to want to have a more detailed documentation to help you get familiar with the syntax which will differ from something you are already familiar with like Python.
But I think that imo should be kept away from documentation and put in the catagory of tutorials.
I can see why since my case was the opposite - I was familiar with C to some extent but only started with Python when using Houdini.
What I did is simply googled 'how to learn Python' and look for simple examples which I could take over into Houdini.
This helped because I was able to see the difference between what is 'pure' Python syntax and what was Houdini specific.
For example with vex - someone could be well versed in c/c++ but they still have to learn say what a point wrangle does with the data in point mode (parallel processing of points) - the ins and outs of working with attributes vs. localy declared variables, etc.
I think if you did something similar and do a little bit of c or similar language outside of Houdini...you might be able to get a better sense of vex, seeing the similarities and difference due to context(wrangling data in a Houdini scene).
SWest
Another example could be, imagine you want your function to return an array, how would to do that? Coming from a Python background this was quite challenging.
I would declare I'm returning an array with my function and within the function and using a loop and the function push() create the array.
Edited by BabaJ - Oct. 5, 2023 18:57:28
Technical Discussion » What is the difference between a channel and a parameter?
- BabaJ
- 2038 posts
- Offline
MirsildinI would suggest you just start 'trying' to do something in Houdini-- just keep working on projects first - Instead of trying to understand things conceptually first.
I will be studying all your answers under a microscope for a long time until I fully understand.
The experience of using Houdini will help congeal your understanding faster, imo.
Houdini Lounge » Meaning of this subscript number in the geo spreadsheet?
- BabaJ
- 2038 posts
- Offline
anbtIt matters when you need to make an assessment of your results; It's an aid for you, if need be.
Thank you for your answer. And is it something I should pay attention to in general? When does the precision of an attribute matter?
Technical Discussion » Where is the VEX syntax reference?
- BabaJ
- 2038 posts
- Offline
SWest
With Python I can focus on logic (algorithms) because there are so many examples that can be used to solve the syntax questions. However, this approach is not possible with VEX using the given tools available.
From my experience, it is the opposite - Vex is so easy in Houdini while Python in Houdini is like you say:
SWest
And my experience is that it is much like a labyrinth.
[
SWest
With Python I can focus on logic (algorithms) because there are so many examples that can be used to solve the syntax questions. However, this approach is not possible with VEX using the given tools available.
For me it's much easier to focus on logic with VEX(which is why I like it) because the syntax is 'strict' and less ambiguous(there are elements of Python than make it more flexible - but I find you have to remember more things as a result - which is why it's easier for me to focus on the logic and my own algorithms in VEX.
SWestShort examples of what? What do you feel is missing?
Having many short examples, especially from function or object oriented programming (or both) could make using VEX more accessible.
The docs in regards to describing what a function does, yes is some instances could use some work - but in my mind more for clarification - not examples to show application. The reason is, a good function means it can be applied to multiple cases and needs. It depends on the person and their needs.
How a function 'works' in Vex has only a few elements that are shared across the board for all vex functions, e.g. you supply arguments, the function either or both returns a value or changes a supplied argument, etc.
The docs describe these basic features of each function.
So what examples does one need? because how one decides to apply those functions together with other functions or their code is up to the person - Their own logic.
Vex also is typically not used in a context where you have to or need to start writting sophisticated and elaborite code where you start using 'structures' and other functions in externally referenced files that begins to resemble OOP. And the the purpose of OOP is not to do it for it's own sake but as a means to accomplish ones goals.
IMO if one needs to start writting code that begins to resemble an OOP 'format' - They are better off to start and dig into the HDK which is using C++ and compile for Houdini there; not with VEX.
I don't feel adding examples to the docs (at least for the functions section) is a good idea. With the continuing addition of new functions, like in the Solaris, plus adding examples would just defeat the purpose of the docs in that it would take longer to navigate to the find a reminder of what a functions input/output is.
The section on syntax as already mentioned by Tamte is all there is to learn about syntax.
Adhering to the syntax just lets the compiler does it's job of converting your logic into something that can be used.
If you feel there is something that is not clear about the syntax of VEX, then why not just post questions in the forum.
IMO vex syntax is simple and 'short' - meaning not much to remember; After which, it's just your logic that remains.
Technical Discussion » What is the difference between a channel and a parameter?
- BabaJ
- 2038 posts
- Offline
Mirsildin
In the Attribute Wrangle i create a parameter with any value that Houdini "doesn't know"
Ok, yes.
Mirsildin
And this action already causes the channel and parameter to exist (I marked this in the picture).
What do you mean by 'already'? You created the parameter and also used the parameter to hold a value that you want. Neither the parameter or value held by the parameter could not have already existed before you created it, let alone hold a value.
If you mean you wrote in the wrangle the function itself, i.e. any form of a ch() function; Without also creating a parameter by pressing the button to do so, or creating it through the Edit Parameter Interface, or somewhere else with a Python...then that ch() function within the wrangle code window will just by default always return a value of 0 - If it doesn't see/find an actual parameter that the function is referring to( from which to 'grab' data from ). That is aside from the fact that a typical newly created parameter, like your example, without any overriding input targeting it's field or specific user defined default - will also start with a default value of 0; save too with something like a string parameter which basically starts with a 'null', and so on with all the other specific contexts of other types of parameters.
So, I don't know what your 'issue' is, i.e., what you are struggling with except maybe the relationship of the ch() function/s and the parameters they reference and the data they can contain.
Perhaps it may help to know that the behavior of the ch() function is such that it could have been written in that instead of returning a default value of 0 even if the parameter it is referring too still doesn't exist; Create a warning pop up window notifying you that you are referring to a non-existant parameter and as such cannot proceed until you 'rectify' the matter and create a parameter with said name given to the function.
Edited by BabaJ - Oct. 4, 2023 13:51:31
Solaris and Karma » What's the "proper" way to reload a Scene Import?
- BabaJ
- 2038 posts
- Offline
eikonoklastesMost upper right corner of your window there is a 'Pane Tab Operations' pull down menu button that has the 'Undo Close Tab' option.
How do you undo a closed pane tab?
Technical Discussion » What is the difference between a channel and a parameter?
- BabaJ
- 2038 posts
- Offline
AndomiroslawIf you mean that the user has to use python to create the new field itself, no. One can use the 'Edit Parameter Interface' of the node to add additional parameters with input fields.
A value input field (like the one in the picture above) can only be created by Python.
AndomiroslawActually no, the function ch() and it's varients in vex do not create a channel at all.
And if on VEX we create a channel with the function...ch(...)
It only ever 'grabs' the data from the specified parameter in it's argument.
It is the vex node itself when you press the button 'Create Spare Parameter' that it looks in your vex code for that node to see if any ch() functions exist without reference to an already existing parameter, and in those cases in which it is not, creates the new spare parameter. Now under the 'hood', I don't know if it's using Python or underlying C++ API; But again, any ch() function only ever returns the data of the specified parameter that contains the data.
Edited by BabaJ - Oct. 4, 2023 10:15:51
Technical Discussion » intrinsic uv convert in the carve node??
- BabaJ
- 2038 posts
- Offline
What I was showing you is but one step if you wanted to use the carve sop.(I thought you would be able to see the other steps).
Just calculate your total distance for the entire segment, get the ratios of each individual segment per total length, which will let you know what 'uv' distance each segment is. From there you can carve(with the sop)the specific segment in which your target uv is lying.
Did you try comparing a single segment with vex(only two point ends) compared to the carve sop?
Just calculate your total distance for the entire segment, get the ratios of each individual segment per total length, which will let you know what 'uv' distance each segment is. From there you can carve(with the sop)the specific segment in which your target uv is lying.
To build something around this in order to mitigate that behaviour would surely negate the slight performance advantage the carve node has, right?How do you know the carve sop has better performance when it's not doing what you have with vex?
Did you try comparing a single segment with vex(only two point ends) compared to the carve sop?
Edited by BabaJ - Sept. 22, 2023 18:15:34
Technical Discussion » intrinsic uv convert in the carve node??
- BabaJ
- 2038 posts
- Offline
I'm assuming the issue you're having is when using the carve node on a polyline.
Perhaps you could run that line through a convertline node - and then apply your carve node per prim as needed, reforming back together your single polyline after you get the desired shifts.
Perhaps you could run that line through a convertline node - and then apply your carve node per prim as needed, reforming back together your single polyline after you get the desired shifts.
Houdini Indie and Apprentice » Align construction plane to selection (multiple faces)
- BabaJ
- 2038 posts
- Offline
-
- Quick Links