Jump to content


  • Content count

  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won


Everything posted by Macha

  1. I have selection questions: -I have a scene with many assets nested into each other. I want to prevent some of those assets to be selectable. It doesn't seem to work from the top level. Instead I have to dive down into the nodes until I reach the desired nodes, unflag them (sometimes more than one). How can I do that from the topmost level (say, everything in a subnet)? -Selecting objects always dives into the network by default. what preference prevents this?
  2. Wavelets

    Why does the gas wavelets microsolver scale its results? It looks like it creates an octree of its results in a field.
  3. H12 FLIP IDs

    Does anybody know how to add ids to flipfluid particles in H12. I tried all sorts but can't get it to work stably. Where are the particles genereated??? Even a non-than-perfect id would be OK.
  4. Rock Hard

    Here's some rocks I posted at the sidefx forums. I thought it would be a nice project to do a few more of these. It's very suitable to do in Houdini, so should be fun. I think the first thing to do would be to generate the basic shape. I'm wondering how to achieve this. Obsidian breaks like glass for example. The ones I have posted here look more like naturally occuring metals, or some kind of igneous extrusive with plenty of volatiles. So, how do I best achieve a chiselled surface? Lots of booleans?
  5. Should be simple but I don't know much about batch scripting On Windows, I want to convert a folder with randomly named (some of the sequences, some not) images to rat with the same name but no numbers at the end. For example: bla_3.hrd bla_2.hdr bla_-1.hdr gthg.hrd dumdeedum.txt should become something like bla_3_t.rat bla_2_t.rat bla_-1_t.rat gthg.rat How do I go about that?
  6. I am trying to build a small renderfarm and to test it I use 2 machines (main=windows 7 and slave=xp). I have trouble getting it to work with HQueue. I am on support but they don't seem to be able to help me, so I'll ask some basic questions here: My setup: I installed Houdini and HQserver on both machines. HQueserver service is running on both machines. Python 2.6 is installed on both machines. I added my (windows 7) machine to the clients list. I want the shared network drive to be on my w7 machine. Now: I think my xp machine needs to know about where the shared drive is? So, I edit the hqserver.sharedNetwork.path.windows variable in the hqserver.ini file? Is that right or do I misunderstand how this is supposed to work?
  7. Foam

    Does anybody have an idea about how to create, animate, and render foam? The kind of foam you get when you brush your teeth, or when you point the showerhead at soapy water, or sprinkle salt on slugs. I'm thinking particles sticking to each other at a growing radius, or maybe smoke, metaballs, or, hmmm, tricky, and the shading part...hmmm...
  8. I want to write some values into a point attribute. For testing purposes I just use 0.1 on all points. Why does this code crash Houdini? What is the proper way to do it? GA_RWAttributeRef myatt; myatt = gdp->findFloatTuple(GA_ATTRIB_POINT, "myatt",1); if (!myatt.isValid()) { myatt = gdp->addFloatTuple(GA_ATTRIB_POINT, "myatt",1); } GA_RWHandleF atthandle(myatt.getAttribute()); for (GA_Iterator it(gdp->getPointRange()); !it.atEnd(); it.advance()) { GA_Offset offset = it.getOffset(); //tuple->set(myatt.getAttribute(), offset, 0.1, 1); atthandle.set(offset,1.0); } [/CODE]
  9. I make a detail attribute called orids const char * attName= "orids"; GA_RWAttributeRef oridsAtt = gdp->findIntTuple(GA_ATTRIB_GLOBAL, attName, setSize); if (!oridsAtt.isValid()) { oridsAtt = gdp->addIntTuple(GA_ATTRIB_GLOBAL, attName, setSize); } GA_RWHandleI oridsHandle(oridsAtt.getAttribute()); and I want to populate it from values that I have stored in a set. I probably have to convert the set to an array, but whatever I try, I cannot set the values except for the first array item. For example, as a test, this will just set the first array item to 5 and leave all others on 0: GA_Size gasize(setSize); GA_Offset gaoffset; int test[] = {1,2,3,4,5}; oridsHandle.setBlock(gaoffset, gasize, test); I also tried looping over the set and setting the attribute that way: int i=0; for (set<int>::iterator it=oridsSet.begin();it!=oridsSet.end(); ++it) { oridsHandle.set(GA_Offset(i++),*it); } But again, it only sets the value in the very first array position. How do I set array detail attributes?
  10. Array Detail Attribute

    Thanks, that looks like it works! (with i++)
  11. I'm having trouble compiling some stuff on OSX 10.9. I can get this work on Linux, and I'm pretty sure I've done it before on a mac. I can compile standalone examples with custom, but the SOP plugins give me errors. For example, the star sop returns this on running hcustom SOP_Star.C (I have write permissions): Making SOP_Star.o and /Users/macha/Library/Preferences/houdini/12.5/dso/SOP_Star.dylib from SOP_Star.C clang: warning: argument unused during compilation: '-rpath,@loader_path/Libraries' Undefined symbols for architecture x86_64: "OP_Parameters::savePresetContents(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)", referenced from: vtable for HDK_Sample::SOP_Star in SOP_Star.o "OP_Node::saveCommand(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, double, double, char const*, OP_SaveCommandOptions const&)", referenced from: vtable for HDK_Sample::SOP_Star in SOP_Star.o "OP_Node::saveIntrinsicCommand(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*)", referenced from: vtable for HDK_Sample::SOP_Star in SOP_Star.o "OP_Node::saveDialogScriptExtraInfo(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)", referenced from: vtable for HDK_Sample::SOP_Star in SOP_Star.o "SOP_Node::saveIntrinsic(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, OP_SaveFlags const&)", referenced from: vtable for HDK_Sample::SOP_Star in SOP_Star.o "SOP_Node::saveCookedData(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, OP_Context&, int)", referenced from: vtable for HDK_Sample::SOP_Star in SOP_Star.o "SOP_Node::save(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, OP_SaveFlags const&, char const*)", referenced from: vtable for HDK_Sample::SOP_Star in SOP_Star.o "OP_Node::dumpMicroNodes(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, bool, int) const", referenced from: vtable for HDK_Sample::SOP_Star in SOP_Star.o "OP_Node::executeCommand(char const*, std::__1::basic_ostream<char, std::__1::char_traits<char> >*, std::__1::basic_ostream<char, std::__1::char_traits<char> >*) const", referenced from: vtable for HDK_Sample::SOP_Star in SOP_Star.o "___sincos_stret", referenced from: HDK_Sample::SOP_Star::cookMySop(OP_Context&) in SOP_Star.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) Link failed[/CODE]
  12. I have the same problem. I came up with this. It is not very good, cumbersome and stupid but maybe it helps a little: //load image IMG_File *file = IMG_File::open("/data/app/sci6_x86_64/Houdini/13.0.399/hfs/houdini/pic/DOSCH_SKIESV2_01SN_lowres.rat"); UT_PtrArray<PXL_Raster *> images; file->readImages(images); // get res int xRes = file->getStat().getXres(); int yRes = file->getStat().getYres(); // test uvs float u = 0.4297; float v = 0.4824; float xu = u*(xRes-1); float yv = v*(yRes-1); // get pixel values float vals[3]; images[0]->getPixelValue(xu,yv,vals); for (int k=0;k<3;++k) cout << "Pixelval at " << xu << ", " << yv << " = " << vals[k] << endl; file->close();
  13. I shoot rays from gdp to gdp2 and check if they intersect. If they do intersect then I would like to evaluate a texture map on gdp2. I can get the hit positions, but how would I get the values of the texturemap at those points? This is what I have to get the hit positions: GA_FOR_ALL_PTOFF(gdp, ptoff) { // searchdir attribs UT_Vector3 searchdir; tupleN->get(hN.getAttribute(), ptoff, searchdir.data(), 3); GU_RayIntersect *myCollision = new GU_RayIntersect; myCollision->init(gdp2); GU_RayInfo hitInfo(searchdir.normalize()); hitInfo.reset(); UT_Vector4 pos(gdp->getPos3(ptoff)); int hitNum = myCollision->sendRay(pos, searchdir, hitInfo); if(hitNum) { const GEO_Primitive *hitPrim = hitInfo.myPrim; fpreal32 hitU = hitInfo.myU; fpreal32 hitV = hitInfo.myV; //get pos of hit UT_Vector4 hitPos; hitPrim->evaluateInteriorPoint(hitPos, hitU, hitV); } delete myCollision; }//GA_FOR_ALL_PTOFF
  14. Thanks Claus, that works quite well. I've only come back to this now. I'm thinking of using the uvs I get from the hitpoints to read pixels from an image.I don't see anything obvious in the HDK about images and uvs. Is anybody aware of a sample code somewhere?
  15. Does anyone know of an easy way to get random numbers (in vopsop preferably) from a probability distribution? Ideally I'd like to draw a curve in an editor, or use a ramp, and sample from it. I've kind of come up with a solution where I create a bunch of points, ramp a color (say red) and then randomly (constant distribution) sample from this with the color representing the probability. It works but there should be a prettier way of doing this.
  16. Homeless man (mild nudity)

    You forgot his willy.
  17. Macha is Looking for Work

    Since Pixar Canada is vanishing I am looking for another job. Please pm me if you have any suggestions.
  18. Maybe this is a little silly but can somebody explain on a higher conceptual level how points and attributes are represented internally in Houdini? I've sort of memorized how to iterate over points and attributes, reading and writing them with the HDK, etc, but I'm not really clear as to the why's. For example, what is the difference between point offsets and indices and why do we use offsets when iterating? How are points represented in memory, how is the data structured? A lot of answers to these questions are scattered throughout the hdk documentation but a bit of an Idiot's Guide to it would be welcome by many I'm sure.
  19. Well, that's a start! I never noticed the slides!
  20. Macha is Looking for Work

  21. VEX: arrays fields in structs

    Does anybody know if we can use arrays as fields in structs? Something like this: struct mydata { float theta; float phi; vector vec; float values[]; } Eventually I want to have an array xs of mydata with each xs.values being initialized to a particular size. mydata xs[];
  22. Does anybody have a short example of inlinecpp that iterates over an existing volume? Thanks.
  23. Iterating over voxels

    Looks to me as if all handles related to voxel arrays in inlinecpp are spewing out errors related to boost?
  24. Iterating over voxels

    No, none of these includes are sufficient. From the examples it looks like they should, but it doesn't work, at least with the inlinecpp stuff.
  25. Iterating over voxels

    Thanks Rick, I've been looking at those before but can't get it to work. I can't even find the right includes for the UT_VoxelArrayIterator, and I have tried a lot of them. It makes me think it is an inlinecpp specific problem. That's why I am asking for a short example.