Jump to content

DonRomano

Members
  • Content count

    209
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by DonRomano

  1. Vex Pathtracer

    Go a bit of time yesterday and this morning so I rewrote the whole thing from scratch, with fresnel blend for glass (to get both reflection and refraction), and I fixed a few bugs in the gi. I need to fix the animation of the rays now, and it should be good. I might add antialiasing too to get smoother renders (and maybe add a simple photon mapping help to caustics because they are still very noisy). I attached the file though it's not finished (in case you want to also test). I need to add more comments and notes to help understand what's going on, and once everything's fine I'll share the "final" file. You need to include the "raytracer.h" file in a directory defined in the HOUDINI_VEX_PATH in houdini.env. raytracer.hipnc raytracer.h Cheers,
  2. Vex Pathtracer

    Hey guys, I started making a very simple pathtracer with vex in sopland. I'll add basic reflection and refraction, and keep it very simple as it is made as an "educational tool" to help students understand how pathtracing works under the hood. Once I'll have finish I'll share the file here if some of you are interested. I added an "animation" in which we can see the different paths a ray takes : the primary path (in red/blue in the video), the next event estimation path (in black/yellow), and the diffuse bounces (in magenta). I'll also add the next event estimation for the diffuse bounces, and of course when it will be implemented, reflection and refraction paths. Here's a little video of the animation, and a very non-converged render https://streamable.com/37kxua (I think I have a bug in the global illumination I'll fix it tomorrow). Cheers,
  3. How to python rename node in subnet

    I typed this (the example provided in the link I sent) in the Python Shell and it works fine : def name_changed(node, event_type, **kwargs): print("Geo node is now named %s" % node.name()) hou.node("/obj/geo1").addEventCallback((hou.nodeEventType.NameChanged, ), name_changed) You have to define a function to link to the event callback, and no just copy one line... Note this will work only for the current session, it won't be saved in the file if you close Houdini (as written in the doc link). Cheers,
  4. How to python rename node in subnet

    You might want to have a look at this : https://www.sidefx.com/docs/houdini/hom/hou/Node.html#addEventCallback Cheers,
  5. Trying To Understand Sweep and Vertices

    Polypath -> connect end points, and if your point numbers are still wrong, use a Sort with Vertex Order.
  6. Importing FBX with Python H18.5

    It works fine for me when I use the Python shell (18.5.408). You may want to add the merge_into_scene argument to True to make sure it imports the fbx file into your scene and not create a new file from it. hou.hipFile.importFBX("D:/Path/To/My/FBX/file.fbx", merge_into_scene=True) Cheers,
  7. Vex Pathtracer

    Got time today to add reflection and refraction, I even got caustics with a little trick ! Now time to adjust the animation to capture reflection/refraction rays and I'll call this done. Cheers,
  8. How to compile vfl library files to use in wrangles

    Oh okay, I thought the code was compiled each time the wrangle was cooked (in a for loop). I wasn't sure that I already had the max performances on this, but thanks for the precisions ! Cheers,
  9. Hey, I've asked this question a on SideFX forum but I didn't have any answer, so I try here. I've been struggling on this lately and didn't found how to do it properly. I've made a few .vfl files with functions definitions, and I'd like to compile them and then call them in attribute wrangles (to gain some performance and avoid compilation each time the code is run (especially with heavy functions)). The way I tested was : test.vfl : #ifndef TEST #define TEST cvex print(string message="") { printf(message); } #endif vcc test.vfl -> outputs a print.vex file I define HOUDINI_VEX_PATH to include the directory where print.vex isin Houdini, in an attr wrangle : #include "print.vex" print("test message"); And I have a warning : "Errors or warnings encountered during VEX compile: /obj/geo1/pointwrangle1/attribvop1: No context function defined.. " though I've defined the context if the function (cvex). If anyone knows the proper way to do this (if it's possible), let me know.. Cheers,
  10. How to compile vfl library files to use in wrangles

    Yeah I tried to use the cvex context to make it general, but I think pre compiling headers can help with performance when you have large functions. I've already made libraries in header files, but I think that if I can pre compile some functions it could help the wrangles (when sometimes this wrangle is cooked millions of time, I think it can speed up the computation (though vex generated code is cached, we could avoid this step too)). Or maybe there is another way of compiling code ? I don't know if wrangles in hda are compiled at hda creation/modification, or jit compiled like normal wrangles. If nothing changes with manual compilation then it's fine and I already have the maximum performance, but if there is a way of optimizing this I'll be glad to read about it Cheers,
  11. UT_NetPacket::read: Not enough space

    I'm pretty sure this means that you don't have enough ram to fit all the rendered images into ram, and this is pretty obvious because 135 8k images is a huge amount of data. What you can do is render to disk and open your images in a new instance of mplay to see it. I'm not sure this comes from this but it could come from something like this. Cheers, Romain
  12. You can also use a geometry wrangle and output an attribute, instead of using a sop solver which can be slower sometimes
  13. Next Constraint Glue to Hard

    I changed a few things but it's working : I use Bullet Soft Constraints, I find it much better than the hard constraint for metal, I also made two wrangles with a switch attribute which changes the constraint name based on your timer attribute. Cheers, next_cons_Glue.hiplc
  14. You should use pcfind(), nearpoints() works only on geometry I think. Just like this : int count = chi("count"); float radius = ch("radius"); int pts[] = pcfind(0, "P" , @P, radius, count); if(len(pts) < chi("threshold")) amp *= 0;
  15. Drop down menu in VEX

    Create an integer channel, and then convert it to an Ordered menu via "Edit Parameter Interface". Then, you can add items using Python menu attributes like so : menuitems = ["0", "item1", "1", "item2", "3", "item3"] return menuitems
  16. ACES Rendering output

    Plus one for this, I just had a course of one week with him in my school about aces and lighting, and the core of his course was really resourceful and we got a ton of information. This guy is amazing ! The best way to use aces in your pipeline is to render in linear, of course your renderview should show your render with an aces lut (in your case an ACES Rec 709 or sRGB), and then in Nuke you import your linear file, make sure your project settings are OCIO / aces.1.x, and to export your file you just need to use a write Node with ACES/Output/Output sRGB or Rec709. If you have textures or hdri, make sure you convert them to aces because they differ when you will render them ! Good luck with that, it's a huge mess to understand, but it's worth it when you see how it enhances your renders
  17. VEX: add point to prim

    I assume that a triangle has always the same order, so if you add a point between point 0 and 1, just offset the point number after point 1. Let's say you have a triangle, this should work : int pts = primpoints(0, @primnum); removeprim(0, @primnum, 0); vector pos1 = point(0, "P", pts[0]); vector pos2 = point(0, "P", pts[1]); vector new_pos = avg(pos1, pos2); int new_pt = addpoint(geoself(), new_pos); addprim(geoself(), "poly", pts[0], new_pt, pts[1], pts[2]); Cheers,
  18. OCIO Config not loading

    Yes, that's what I did but Houdini is not picking it up. Nuke, Maya and other softs works well with it, even Redshift within Houdini, but Houdini itself won't load it.
  19. Hey guys, I'm facing a little problem : Houdini does not load my OCIO config (I'm using aces 1.0.3). I've set up the OCIO variable, it works well with Nuke, Maya, but Houdini is not loading it and I can't even load it manually when I open the color settings : If someone knows what can cause this, I'll be glead to read it ! Cheers,
  20. You can create stylesheets with hou.StyleSheet.__init__(json text). The json text is a string formatted as a json file, so I assume you can create presets, create a json file for each preset, and then load this json file and dump it in the init method. More infos here : https://www.sidefx.com/docs/houdini/hom/hou/StyleSheet.html
  21. AAFLOW NOISE question

    I colored the changes in red. Cheers, aanoise_speed.hipnc
  22. AAFLOW NOISE question

    Multiply the time by a custom parameter and plug it into the flow parm. You'll control the speed of the noise by playing with the time multiplier parameter. You can also use expressions like $T * 0.01 in the flow parameter.
  23. Automatic export flipbook

    I've made this crapy hda to get the auto flipbook export with linux kubuntu, as ffmpeg4 wasn't working with mplay. It's a simple opengl rop with a quick and easy python script. It's using a custom python sop I've made available here https://gumroad.com/romainaugier#UnmRE (free ofc). Cheers, ra_EasyFlip.hdalc
  24. Flattening mesh with RaySOP

    Yes, it was a syntax mistake. The minimum find algorithm looks for the minimum for each component, at least with my tests it's what it's doing. He said it was working fine, so I don't understand why you're digging old post to point out a syntax error
  25. array and foreach question

    v@pos = point(0, "P", i); returns the position of the point i, instead of the point at the index i of your point arrays. Use i as an array index, not as a point number. https://www.sidefx.com/docs/houdini/vex/arrays.html
×