Hesam Ohadi

KINO-san

About Me

Expertise
Not Specified
Location
Iran, Islamic Republic of

Kino is a Creative Coder and Technical Artist based in Tehran, Iran. He is interested in making abstract art forms and algorithm-driven pieces. He mostly uses his computer in combination with custom-made software as his medium; utilizing creative coding, generative design and nature-influenced processes. Apart from his personal work, Kino is also a member of the Design+Technology studio CODON.im, a collective of artists experimenting in the fields of interaction design and computer arts.

Connect

My Tutorials

obj-image Beginner
Voxelization Workflow

Recent Forum Posts

VEX struct constructor Feb. 25, 2016, 10:41 a.m.

What does the empty constructor do for a struct? I've seen this in the “pbr.h” file for instance:


pbr_varianceaa variance_start()
{
return pbr_varianceaa();
}


where pbr_varianceaa is a struct.

or in the “bsdf.h” file there is this line:


bsdf f = bsdf();


Thanks a bunch!

Wierdest VEX struct issue Feb. 25, 2016, 10:15 a.m.

I have a couple of structs declared in a .h header file. My problem started that whenever I include the header file in an AttribWrangle node and then use a specific function from one of the structs, it seems like Houdini can recognize the array kind of another struct I have in the same file.

I narrowed down the bug and here's a shortened header file which reproduces the error (I know the code is nonsense and won't do anything in the shortened state but my problem is the iritating error the wrangle node produces):

This is the header file (Test.h):



struct StructManager
{
string mTags;
int mIds;
string mAllTags; // workaround: there is a bug with string arrays on detail with my version of houdini 15.0.274

int mGeometry; //after a manager is opened or gotten, it'll know the geometry who owns it

void close()
{

string tagList;
int count = len(tagList);
for (int i=0; i<count; i++){
}
}

void open(int aGeometry)
{
mGeometry = aGeometry;
mIds = attrib(mGeometry, “detail”, “mIds”, 0);
mTags = attrib(mGeometry, “detail”, “mTags”, 0);
mAllTags = attrib(mGeometry, “detail”, “mAllTags”, 0);
}

}

struct Point
{
int mNumber;
vector mPos;
}

struct EndPoint
{
int mNumber;
vector mPos;
int mOppositePoint;
}


now if I write this in a wrangle node:

#include <Test.h>

StructManager manager;

Point points;

int count = len(points);
manager -> close();


The error is "No matching function for int len(Point)“ . Now If I replace this line from the ”close“ method of the ”StructManager" no error is produced!!!!

int count = len(tagList); ——> int count = 10;


It seems the problem lies with calling len() inside close()
Can anyone reproduce it ? Any ideas why this is happening?