Found 6 posts.
Search results Show results as topic list.
Houdini Indie and Apprentice » Vex typeid seems to be a mystery
- Leozard
- 6 posts
- Offline
Houdini Indie and Apprentice » Vex typeid seems to be a mystery
- Leozard
- 6 posts
- Offline
Wow. Thanks Viklc. Would be nice to have that first function into some library(Like Python modules) that could be called in any wrangle node.
And your list of mapped ids seems to be exhaustive.
And your list of mapped ids seems to be exhaustive.
Houdini Indie and Apprentice » Vex typeid seems to be a mystery
- Leozard
- 6 posts
- Offline
So I was in a situation where I had the verify the data type of some values using a printf statement. So, for the first time, I come across the typeid() function. Which returns integer numbers instead of words like float, integer, vector 2, etc. So I searched google to find out if there is correspondence list somewhere which can tell me what number corresponds to what datatype. Scarcely do I find anything. I was almost troubled, like: no one is ever checking the return type of vex values; Is there another way"
Sidefx help docs also seldom mention it. So question is: am I missing something?
Anyway I went on to create my little vex snippet to tell what what IDs are what. Basically
vector myvar;
printf(%s,typeid(myvar)); which returns 3
------------------------------------------------
vector myvar;
printf(%s,typeid(myvar)); which returns 13
Or
int myvar;
printf(%s,typeid(myvar)); which returns 0
------------------------------------------------
int myvar;
printf(%s,typeid(myvar)); which returns 10
or
float myvar;
printf(%s,typeid(myvar)); which returns 1
------------------------------------------------
int myvar;
printf(%s,typeid(myvar)); which returns 11
and so on...
As you can see, there is a pattern where if the Id of a type is n, the array of that that same type will be 1n
Sidefx help docs also seldom mention it. So question is: am I missing something?
Anyway I went on to create my little vex snippet to tell what what IDs are what. Basically
vector myvar;
printf(%s,typeid(myvar)); which returns 3
------------------------------------------------
vector myvar;
printf(%s,typeid(myvar)); which returns 13
Or
int myvar;
printf(%s,typeid(myvar)); which returns 0
------------------------------------------------
int myvar;
printf(%s,typeid(myvar)); which returns 10
or
float myvar;
printf(%s,typeid(myvar)); which returns 1
------------------------------------------------
int myvar;
printf(%s,typeid(myvar)); which returns 11
and so on...
As you can see, there is a pattern where if the Id of a type is n, the array of that that same type will be 1n
Edited by Leozard - 2024年3月12日 14:28:12
Houdini Lounge » Matte from spot light cone
- Leozard
- 6 posts
- Offline
Hello Jsmack
Thanks for replying. I'll try researching the illunimance loop thing. Never heard of it
Thanks for replying. I'll try researching the illunimance loop thing. Never heard of it
Houdini Lounge » Matte from spot light cone
- Leozard
- 6 posts
- Offline
Houdini Lounge » Matte from spot light cone
- Leozard
- 6 posts
- Offline
Hello.
I am trying to create a matte based on the intersection of the surface being rendered with spot light. Such that only areas within the cone of the light are white, and the rest of the image is black. Please see image attached. Anyone have an idea how I can achieve this please?
Thanks
I am trying to create a matte based on the intersection of the surface being rendered with spot light. Such that only areas within the cone of the light are white, and the rest of the image is black. Please see image attached. Anyone have an idea how I can achieve this please?
Thanks
-
- Quick Links