Jump to content


  • Content count

  • Donations

    0.00 CAD 
  • Joined

  • Last visited

Community Reputation

1 Neutral

About Kino

  • Rank

Personal Information

  • Name
  • Location

Recent Profile Visitors

1,150 profile views
  1. Absolutely correct, if it's only material parameters (or any other object level parameter for that matter) such as Cd and Alpha that you want to vary then s@material_override is your best and fastest bet, sorry I overlooked this.
  2. Check out this thread http://forums.odforce.net/topic/9044-stamping-with-instance/. As mentioned here with the instance node you have 2 choices, either have different all the variations you need on the disk or use " Delayed Loading". You can vary your copies via the s@instancepath attribute in the instance node as mentioned here http://forums.odforce.net/topic/23294-houdini-16-wishlist/page-12#entry143811but if none of these methods work in your scenario I think you're left with copy/stamping and using the point attribs for each stamp, Iike the example I attached ( 1- I put the box behind the spheres so you can see the transparency . 2- most of the new shaders work with the float variable "opac_int" as their opacity attribute) copyStampVaryAlpha.hipnc
  3. Wierdest VEX struct issue

    Unfortunately reordering won't work since in my actual scenario Point needs to know about StructManager. I went through the source and changed the for loops with len(structName[]) to foreach loops but still the wrangle gives out the same error, it's like it's internally it's using len() itself. It detects Point[] so it knows an array of Point can exist but at the same time can not perform the same functions on it.
  4. Wierdest VEX struct issue

    Thanks for the answer loopyllama but I know that in Houdini arrays are supported for arbitary types, I think it's doable since version 13 I think, I know I read somewhere on the SESI forums that actually the reason function definitions with array return types don't work in wrangle nodes is related to this fact. Anyways as I said above if you replace the line I mentioned, len(Point[]) is accepted by the compiler
  5. Hey Guys, I asked this in the sidefx forums in hope of an answer from a developer. But I though I ask it here as well since I'm going absolutely mental over this 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): Code: 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: Code: #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!!!! Code: 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?[/code]
  6. Thanks anim, but isn't what you suggested only applicable to an Object level subnet/asset and not a SOP level? I'd really rather have my asset in SOPs so it can easily be manipulated through the chain. Yeah, I guess I have to choose between an Object level asset or a SOP level one without a camera in the end
  7. Hey everyone, Sorry I've been bombarding the forums with questions in the past days. I want to know if it's possible for a digital asset to have a camera embedded in itself? I'm attaching an example file, it doesn't work in this scenario, I wanted to know if anyone has ever done this and what's the right way to do this. Basically I want to have a "object network" in my subnet and inside that I want to have a camera that has some specific properties, My problem is that first of all I can not switch to my camera in my viewport and what is worse is than when I render with that camera I get nothing. Thanks CameraInHDA.hipnc
  8. For future reference I also measured a third method in which I used a Foreach Loop SOP (Block begin/end) and then deleted all the points except for the one that had the same point number as the current iteration. This method was three time slower that foreach subnet and 6 times slower than copy/stamp EDIT : Also found this thread http://forums.odforce.net/topic/23099-efficient-way-to-instancecopy-geometry-onto-points/
  9. Didn't know about the monitor, it's indeed a good evaluation tool. You're right, with 50000 points foreach takes twice as long as the copy/stamping. Hi Atom, I saw the example. Had no idea about the string "instance" attribute which can affect the geo selection, brilliant! Saying that the instance node really isn't the same as copying, is it? you can not access the geo for further manipulation and although sebakine's method is a neat one, it really doesn't let you vary every instance procedurally, does it? I mean you should have pre-made geo and pass their path as the "instance" attribute, you really don't have the freedom as with the copy/stamp node. (or maybe I didn't catch it completely)
  10. Here's a simplified example of what I mean, each method is in a subnet CopyStampVSForeach.hipnc
  11. I have a system in which points are fed to a copy SOP with stamping enabled. All the data I use (think colors, thickness, etc.) to vary the copies are embedded as attributes on the points I feed the copy SOP and I use stamping only for getting the @ptnum out of the sop. Afterwards my geometry generator SOP system uses the point number via "stamp("../copy/", "pointNum", 0)" and then using the stamped point number and the embedded attribs on the initial points it generates the required geo for that instance. Honestly the stamping drops the performance a lot and I was wondering if the same system could be implemented using a Foreach SOP (especially considering the fact that I'm only using @ptnum from stamping). In the similar fashion the foreach sop could separate points and generate geo based on each of them and then merge the results. If you think it's doable, do you think I'll gain any significant performance boost if I switch from Copy/stamp to Foreach? P.S : There also might be a VEX/Wrangle solution to this I'm not seeing. A detail attribute wrangle can separate the points and extract the geo data from them but from there I'm in the dark. If there is I'd appreciate any pointers.
  12. Thanks a lot for the suggestion Shinjipierre but it really didn't work out for me. The use of the hi-rez grid and using its points' uv seemed to do the job in some cases but it's not a generic solution and it's an overkill IMO. What f1480187 suggested was more what I was after. Thanks again f1480187 for helping me out, your solution did the job beautifully.
  13. How can I get the word position of a point I'm seeing through a camera and on the camera's screen plane. Let's say the camera resolution is 1280x720 pixels ( 0,0 at top left and 1280,720 at bottom right), I want to know the world position of a point which will be at the pixel position of 300,200 at render output. Will this differ if I have Orthographic or Perspective camera? I think fromNDC / ptransform functions are the saviors here but I can't quite figure out how exactly. In general I'd appreciate if anyone can explain the world space, object space and camera space in Houdini in comparison which conventions that OpenGL has for instance. I read here and there that in H world space is actually camera space (or is it only in Mantra and not SOPs?). Also in OpenGL NDC is [-1,1] in all three dimensions, how is this in H? Cheers
  14. Amazing tip, that's a very powerful feature. Since you mentioned this I actually used it in another part of the asset as well. There was a wrangle that needed some initialization in the beginning and some closure code at the end, to hide these from the user's point of view I added a code field on the interface of the asset and for the mentioned wrangle I wrote: //Init code . . . //Users code `chs("../mUserCodeField")` //Closure code . . . Thanks again f1480187! You were a great help, I'll soon share the asset in the forums and will also mention it here so you can have a teacher's look at it
  15. On second thoughts, this will not work because the header file I want to include contains struct definitions and function defs that return arrays, both of which are not doable if stated in the beginning of the wrangle nodes (since they are function definitions themselves). So back to square one I guess. Also I found this thread which wants something similar but with python modules. According to this, one other solution is to embed the .h files in the external files tab of the asset and then copy it to the $VEX folder via a python instruction (not even sure this is possible) : https://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=43325. Still I think I'd prefer the first method you mentioned (the way with outer code fields) EDIT : On third thoughts, I think I can mix your idea with the tex param and the outer code method. Think `chs("myLib")` in the outer code fields. Damn Houdini for never disappointing the user