Jump to content


Popular Content

Showing most liked content on 01/10/2020 in all areas

  1. 2 points
    if you want your ray to continue through all backfaces and hit something behind you'd need to do something along the lines suggested in previous posts vector t = chv("t"); vector dir = normalize(chv("dir")); float maxlength = chf("maxlength"); // get all intersection int prims[]; vector hitPs[], primuvs[]; intersect_all(1, t, dir*maxlength, hitPs, prims, primuvs, .001, .001); // filter out backface intersections and stop at first frontface vector outP = t + dir*maxlength; foreach(int i; vector hitP; hitPs){ int prim = prims[i]; vector primuv = primuvs[i]; vector hitN = primuv(1, "N", prim, primuv); float dot = dot(dir, hitN); if (dot < 0){ outP = hitP; break; } } // create line int pt0 = addpoint(0, t); int pt1 = addpoint(0, outP); addprim(0, "polyline", pt0, pt1); ts_intersect_ignore_backfaces.hip
  2. 1 point
    it evaluates when something dirties the node, like if the inputs or parameters change or are time dependent if it's not time dependent it will only cook once, not every frame, but also you can lock the geo using Stash SOP or save to disk (.abc, .usd, ...) and load back in, so that even if it's animated it will be faster than loading custom format using python
  3. 1 point
    All even handlers have a special kwargs variable available to them, which is a dictionary. Try to print(kwargs) and you will see that it has a reference to your node. node = kwargs["node"]
  4. 1 point
    check hip File , i tried to explain how Quaternion & matrix work .. maybe help you better understand . Matrix3 & Quaternion.hip
  5. 1 point
    Keep in mind that I have a biased opinion because I made Vex Foundations I & II, but here's why I'd recommend my course alongside CG wiki. Matt Estela has done an incredible amount of work. CG Wiki is very comprehensive, accurate, and full of many of the same ideas I teach in Vex Foundations I & II. Because of that, every Houdini TD ought to check it out because it's essentially $200-$300 worth of highly-skilled work provided for free. But - here's the catch - CG wiki is a collection of journal entries rather than a fluidly designed course. You don't get an awesome looking project, course files, feedback, and help if you get stuck. And that can be important if you're trying to learn something that's a difficult topic such as coding in Vex. It's not just reading what the content is - it's about how the content is taught. If you're someone with a computer science background, then Vex Foundations I and II is probably not for you. It's probably quicker and easier to just go through Matt's wiki, and then you can take what you already know about C-style languages from there. If you're 3D artist though - Vex Foundations I and II is the most approachable introduction to vex that you'll find anywhere online. And that might be difference between you getting frustrated and giving up on it vs. getting past that initial learning curve. So my advice is to do both. Check out Matt's wiki after you go through vex I and II. It'll be way easier to read through it, and by the end that, you'll be exposed to two different teachers teaching you concepts which aren't easy to get at first. Good luck! - Tyler
  6. 1 point
  7. 1 point
    Assign hotkeys to Frame Selected/All. IMO they are more useful than Home Selected/All, which is why I reassigned them to use Frame instead of Home.
  8. 1 point
    Python SOP or Python based geometry HDA is definitely the way to go it's really not a good idea to use Add SOP with thousands of parameters if you are reading in thoudands of points from your custom data file, also baking in the data is a big disadvantage, Python SOP can read your file live and you can always use Stash SOP after to store the geo in the file if you really want that you can also have a look at the Table Import SOP which is an example of Python Based HDA, so you can have a look at the code section to see how it works
  9. 1 point
    What if, instead of creating an AddSop, you create a Python SOP and install the above code? The code can read from your file and create the point and attribute at the same time. def code (): """ import os,re,random node = hou.pwd() geo = node.geometry() attrib_orient = geo.addAttrib(hou.attribType.Point, "orient", {0,0,0,0}) # Create the point pt0 = geo.createPoint() # INSERT CODE TO READ XYZ and python_orient from file. pt0.setPosition(hou.Vector3(X,Y,Z)) # Store data_height, now_lat and now long with this point. pt0.setAttribValue(attrib_orient, python_orient) """ # Create python sop and populater code box with code from the def, up above. node_python = node_geo.createNode("python") if node_python != None: # Install code that will detect and create materials from shop_materialpath. node_python.parm("python").set(code.__doc__)
  10. 1 point
    its much use for me to get a volumetric look with good pathtracer and its fast...
  11. 1 point
    Hi, thought I'd share this in this section too: I wrote an article for the german “Digital Production” magazine about my free LYNX VFX toolset. For the article I made a couple of renderings using the LYNX fabric tools. Luckily it even made the cover Here are my personal favorites, the rest of the images can be found on Artstation. You can also find the complete scene on GitHub under the Demo Files. So now anyone can design an ugly Christmas Sweater;) Looking forward to seeing what you guys come up with, enjoy! Links: LYNX VFX Toolset Odforce Thread: https://forums.odforce.net/topic/42741-lynx-free-opensource-vfx-pipeline-tools/ LYNX VFX Toolset (Sweater Scene File included): https://github.com/LucaScheller/VFX-LYNX Artstation (HighRes Renderings): https://www.artstation.com/artwork/OyeY6g Digital Production Magazin: https://www.digitalproduction.com/ausgabe/digital-production-01-2020/ Alternatively view the article in my latest blog post: https://www.lucascheller.de/vfx/2019/12/15/ynybp7wpiqtshoy/
  12. 1 point
    More accurate version. Also supports a length attribute for varying carriage lengths. I left a toggle for the simple calculation as that might be desired in certain circumstances. train_align_v003.hiplc
  13. 1 point
    @Omar Wanis Hi! http://www.issp.ac.ru/ebooks/books/open/Advanced_Fluid_Dynamics.pdf https://www.in.tum.de/fileadmin/w00bws/cg/Research/Publications/2016/NBFlip/nbflip.pdf http://graphics.stanford.edu/courses/cs348c/ http://www.cs.columbia.edu/cg/liquidhair/main_opt.pdf https://cs.uwaterloo.ca/~c2batty/papers/Larionov2017/Larionov2017.pdf https://nccastaff.bournemouth.ac.uk/jmacey/MastersProjects/MSc17/03/thesis.pdf https://www.diva-portal.org/smash/get/diva2:559073/FULLTEXT01.pdf http://wanochoi.com/lecture/Houdini16_FLIP.pdf http://staffwww.itn.liu.se/~jonun/web/teaching/2011-TNCG13/Lectures/Lecture03-MW/Wrenninge_2011_Fluids.pdf https://pdfs.semanticscholar.org/9a91/863baccd64c570e6912617f2b11cf55a971b.pdf
  14. 1 point
    Scratch that, had it solved for me. I hadn't realised that the positions of the geometry had to be told to be updated within the solver. Turns out it was solving with the previous frame just fine the whole time, but it only appeared frozen because it hadn't been told to move. A quick Wrangle node with inputs of the Prev_frame and Input_1 with the following in the VEXexpression: v@P=point(1, "P", @ptnum); After this, everything I was having trouble with was all fixed up and ready for the next stage.
  15. 1 point
    Alternatively you can extract the hit normal and do a dot check against the the initial point normals (if dot is larger than 0, it is a backface) and if needed, you could start a new ray at this point to check for subsequent front/backfaces