Jump to content


  • Content count

  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won


Hazoc last won the day on December 12 2014

Hazoc had the most liked content!

Community Reputation

6 Neutral

About Hazoc

  • Rank

Personal Information

  • Name
  • Location
    Helsinki, Finland
  1. Hi! I'm trying to find a way to define my own photon map geometry. My first idea was to assign a point object as a photon target for the GI light and then turn off the "Create Image From Viewing Camera" setting from Mantra to allow photons to exist in the shadow side of the sphere as well. Turns out it's not that straight forward. If you have any tips before I start modifying the photon_tracer shader, please share. I attached a simple .hip file to work with. I think a GI light supporting arbitrary photon maps would be a good feature and probably not even a difficult one to add. So when ever the photon target is a set of points a similar set would be generated with lighting information of the scene in those locations. photons.hip
  2. Allright! Got a reply from SESI and here's how you can get it working. I guess this could be an obvious way but couple of confusing things simultaneously made it all appear a bit messy. Python still the same: node = hou.pwd() geo = node.geometry() #A bunch of 4 strings d = ("S", "F", "E", "C") #Set as detail attribute "Strings" geo.addAttrib(hou.attribType.Global, "Strings", d, False) geo.setGlobalAttribValue("Strings", d) Vex now: string A[] = detail(0, 'Strings'); for(int i=0; i<len(A);i++) { printf("A = " + "%c\n", A[i]); } And here's the explanation:
  3. Not yet. First I needed to exclude the "stupid user" error I'll send a ticket.
  4. I need to combine this with XML parsing. If nothing works then I just pack everything into one single long string attribute in Python and convert it into an array in VEX. So dirty. print geo.stringListAttribValue("Strings")[0] returns correct values (S, F, E or C) for given indexes 0-3 so it has to be some sort of an array? I really hope the developers can clear this out.
  5. Hmm I see, that works in VEX. But still I'm unable to read an existing string array. I checked the extended operator info and found something interesting. Your array gets typed as a "stringarray" but the one coming from Python operator is just a string. I'm getting confused.
  6. Nice, thanks! I truly am now able to set string arrays in Python. But reading those attributes in VEX is still a mystery. I attached the .hip file. (requires 15.0.305) Python now: node = hou.pwd() geo = node.geometry() #A bunch of 4 strings d = ("S", "F", "E", "C") #Set as detail attribute "Strings" geo.addAttrib(hou.attribType.Global, "Strings", d, False) geo.setGlobalAttribValue("Strings", d) #Works! print "Array list set through Hou: " + str(geo.stringListAttribValue("Strings")) Vex now: //Maybe the cause of all bad string array[] = array(s@Strings); //Prints nothing for any other than [0] element of the array printf("Value in VEX: " + "%c\n", array[0]); //Prints the size of 1 instead of 4 int length = len(array); printf("Length: " + "%g\n", length); //Prints the type "none" string type = detailattribtypeinfo(0, "Strings"); printf("Type: " + "%c\n", type); detailStringListArray.hip
  7. Thanks! Yeah maybe I smuggle the the strings in and the split them into an array. string foo = "S F E C"; string fooArray[] = split(foo); But this page still makes me believe there is an array type for strings: http://www.sidefx.com/docs/houdini15.0/vex/functions/detailattribtype
  8. Hello Have you ever tried to read array based detail attributes in VEX? I have this simple setup where I create a global array attribute of strings using Python. Later I try to read its' string elements with a Attribute Wrangle using VEX. Vex says that the length of the array is 1 which it should not be after I set 4 elements in the Python SOP. it also tells me that the type is "none". Should be "String Array type" ? The Python SOP: node = hou.pwd() geo = node.geometry() #A bunch of 4 strings d = ("S", "F", "E", "C") #Set as detail attribute "Strings" geo.addAttrib(hou.attribType.Global, "Strings", d, False, True) geo.setGlobalAttribValue("Strings", d) And the Attribute Wrangle: //Maybe the cause of all bad string a[] = array(s@Strings); //Prints the size of 1 instead of 4 int len = len(a); printf("%g", len); //Prints the type "none". Should be "String Array type"? string type = detailattribtypeinfo(0, "Strings"); printf("%c", type); What am I doing wrong?

    Cool. Feel free to share the .hip files as well.
  10. Rendering only volume selfshadows

    Well good morning there houmie! Yeah I fiddled around with the gradient trick. As I'm anyway planning to post-light the clouds and use a loose z-buffer rendered from their iso-surfaces to raymarch some kind of shadows in realtime, the loss of intra-cloud self-shadowing shouldn't be an issue. But if I happened to need this 3 distant lights per every cloud primitive -setup, I guess making a single cloud to a HDA with the three light rig included and masked only for the contents of their own HDA could work. Then just populate these HDAs all-over to create a cloudy sky. BTW here's an example showing lightmasking done from the SOPs level. http://forums.odforce.net/topic/21946-per-primitive-light-or-per-light-material-in-mantra/ Thanks!
  11. Hello I'm playing with Cloud FX tools. I have a case where I'd like to prevent three xyz aligned distant lights used to render worldspace normals for clouds from casting shadows from a volume primitive onto another. The image shows right most cloud blocking the red distant light from the left cloud thus resulting lost X component of the worldspace normal for the feft one. What options there are to control shadows when doing volume rendering? Is there a better way to extract this type of worldspace normal information for each cloud primitive?
  12. Close up CG face

    A mushroom cloud done with pyro tools.
  13. Here's a link and a shared hip file that might give some insight how to do this stuff in houdini: http://mattebb.com/weblog/rendering-clouds-with-the-mie-phase-function/
  14. Sign() function for vector type in VEX

    True! Thanks. I'll show them here. float sign(float x) { return (x>0)-(x<0); }[/CODE] [CODE]vector sign(vector x) { return set(sign(x.x),sign(x.y),sign(x.z)); }[/CODE]
  15. Sign() function for vector type in VEX

    Maybe it's this way. Just return a vector of signed components. vector sign(vector a) { return set(sign(a.x), sign(a.y), sign(a.z)); }[/CODE]