Welcome to od|forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.


  • Content count

  • Joined

  • Last visited

  • Days Won


Everything posted by Juraj

  1. Hello, in Houdini 15 I was using hou.ui.selectFile() dialog to get user's input and I would process it further in python. I used the same function to let user select files or folders, based on the needs of a tool. Now I updated to 16 and the function does not seem to enable user to select a folder, it works only with selecting a file. Does anybody know if there is a way to select a folder in 16? I want to batch process files in a directory and I would like to use file browser dialog to let user set it. In worst case I could use hou.ui.readInput(), and to ask user to enter a path there, but this is super user-unfriendly Thanks, Juraj
  2. Hello community, I am creating this thread where I will be posting links to my tests, experiments, RnD's and other uncategorizable stuff. Also often I will include scene files so feel free to explore them and to learn how not to do things ...hope it will help somebody, somehow. Juraj
  3. Thanks, we also appreciate your feedback and help during the production
  4. Hello, now when it is finally published I would like to share you something I was working on during my first semester at the university. It is an university project done at Filmakademie Baden-Wuerttemberg and my role was Technical Director. Enjoy watching with loud sound and in HD Big thanks goes to our cool team, who did their best to finish this piece: Concept/Design: Alex Berweck Technical Directing: Juraj Tomori Film Music: Alexander Wolf David Sounddesign: Robin Harff Animation-­/ VFX-Producing: Vincent Waltan, Tina Vest Modeling: Mitja Öhm Director and Layout: Caroline Kießling FX & Simulation: Aleksej Skrypnik, Justin Braun Production Company: Filmakademie Baden-Württemberg GmbH Pipeline was centered around Houdini and Mantra and we really enjoyed the production of it. I did short breakdowns of a tools and workflows I developed for this project, you can check it here: https://vimeo.com/album/4471569 We used a lot of assets and relied heavily on instancing and I really liked how well Houdini suited into our pipeline, from fast viewport preview of packed disk primitives, to lightweight IFDs being constantly sent to renderfarm Also using digital assets enabled us to efficiently collaborate and transfer setups to the shots. Also big thanks to awesome people here at odforce, it was really great learning/help resource for our project. If you have any questions feel free to ask Juraj
  5. Hi, you can compare angle between two vectors with dot product: the normal vector (v@N) and vector pointing from second point to the first one (v@difference = pt2 - pt1 , (pt1 and pt2 are positions of first and second point) ) and if angle is positive, then the second one is in front of, if negative, the second one is behind the first one. Pseudo code could look like it if (dot(v@N, v@difference) > 0) //second point is first else //first point is first
  6. Hi, unfortunately I cannot share the whole setup. I shared as much as I am allowed in the blog post explaining the process of implementing this technique. Hopefully later I will be able to put it here, but not now.
  7. Hello, does anybody know how to render flat shaded scene from OpenGL ROP? I need to do some viewport renders and I would like to have the exact look as in the viewport when set to flat shading. OpenGL ROP renders out stuff in smooth shading, even if it is set to flat. Is it a bug, or I am doing something wrong. Thanks, Juraj
  8. My bad, now I see, that I actually want to disable lighting component (specular) in the OpenGL ROP in the same way as I would do in the viewport when right clicking on lighting in display options toolbar. Edit I figured it out, after assigning a constant shader, then speculars go away, this viewport if too fancy for my needs
  9. car_paint_shader.zip
  10. Hello, I would like to experiment with GLSL shaders in Houdini viewport a bit, but I had very little success yet As a simple thing I would like to create a "matcap" shader, I have this shader in mantra and it works well, but it is quite simple logic in it and I would like to try it out in GLSL as well. I tried two approaches for creating glsl shaders: New Operator Type - SHOP Type - GLSL Shader This approach does not give me any results, the default shader has quite complex code and in the viewport I can see only white color. I tried to modify couple of variables in the code to at least change color from white to red, but unsuccessfully Reference ogl_glsl_shader parameter on a shader pointing to shader.prog file which references to shader.frag and shader.vert This gives me results in the viewport and works quite well, however I do not know how to reference node's parameter value to the GLSL variables. I created those files based on examples in $HFS/houdini/glsl //fragment shader in vec2 matUv; out vec4 color; uniform sampler2D tex; void main() { vec3 base = texture2D( tex, matUv ).rgb; color = vec4( base, 1. ); } First question: how can I reference parameter on the node to the tex variable in opengl? When googling I found some examples which implied that only creating string parameter tex should work, but when running their example files I never got any result in the viewport. Second question: is this the correct workflow? How could I achieve the same thing with New Operator Type workflow? Do you have some simple examples of those nodes with basic shading? E.g. sampling a texture, using constant color... Thanks for any clarification, Juraj
  11. Just thinking out loud - color of blackbody radiation can be represented by temperature in Kelvins, or RGB color it emits. So Kelvins to RGB mapping should be straight forward, but backwards it might be tricky, as a RGB value may not be present in blackbody radiation spectrum. If I understand it right, then this plot is showing Kelvin temperatures mapped to RGB colors. So solution that comes to my mind is to find a Kelvin value, which is closest to the given RGB value. One way would be to take an array of Kelvin values converted to RGB values and to find the closest match (based on euclidean distance). Or if array of Kelvin values is not dense enough, you can linearly interpolate between two closest points found. It is not very precise, but should be good enough for some cases. Also, one more fancy thing would be to compute the distance of given RGB value and Kelvin sample in Lab color space, because if I remember correctly, then distances in Lab color space match the best to the perceived difference in colors (Maybe it is some other space, you can look it up)
  12. I also wrote a blog post describing my approach, feel free to check it here.
  13. Hello, thanks! Glad you like it Unfortunately I cannot share scripts because of the university policy, but will try to write a new one save incremental function # splits versioning string into letter and number, e.g. v025 -> ['v','025'] def verSplit(ver): head = ver.rstrip('0123456789') tail = ver[len(head):] return head, tail # save incremental, tries to preserve version formatting def saveInc(): hipname = hou.getenv('HIPNAME') if hipname != 'untitled': v, num = verSplit( hipname.split("_")[-1] ) num = str( int(num) + 1 ).zfill( len(num) ) newName = hipname.split("_") newName[-1] = v + num newNameStr = hou.getenv('HIP') + "/" + "_".join(newName) + "." + hou.getenv('HIPFILE').split(".")[-1] hou.hipFile.save(newNameStr) else: print "cannot increment version name in untitled.hip" Hi, thanks Maybe, but this setup is not very portable and was made for our pipeline. It would require a bit of work to prepare for release and to make it work in most of the environments. LOD switching would not require much of work in this setup. Just computing distance to render camera and then thresholding it into an LOD attribute. But in our case manual decisions proved to be most suitable.
  14. Hi, probably building simple solver could help you. Check out those tutorials, they explain how to build simple and fast fluid solver. If I understood correctly, you need to initialize velocity volume (sampled on faces), then for each simulation step: inject into it velocities from animated geometry, do divergence-free projection, advect velocity by itself and repeat... Probably you might need to enforce boundaries to zero out velocity within geometry.
  15. Here is collection of breakdowns for a project I was working on during last half of a year Vimeo album: https://vimeo.com/album/4471569 Or individual videos:
  16. Hello, I am trying to remove overlapping polygons - I want to do so by computing distance to other polygons using xyzdist(). So I want to specify primgroup which will contain all, but current primitive, so that It is not returning distance to itself. According to documentation, I should pass group string which matches general SOP syntax. So for polygon number 240, primgroup parameter should be "* ^240". When I pass this parameter to the function, it returns -1 in found primitive - no primitive found. I think that the error is causing by this primgroup parameter. If I pass for example "*", then there is also no primitive found. How can I use patterns to define group inside this function? Like 0-50, *, ... This is from the docs: The name of a primitive group or a pattern to generate a primitive group. Uses the same semantics as a SOP group, so empty strings will match all primitives. Any ideas how to make this pattern working? Juraj
  17. Hello, I am struggling with adding all deep render properties inside a mantra node with python. To do so manually via interface is quite simple, I go to node - edit render properties - filter *deep* - add them all. However I am modifying mantra nodes with python and it would be great if I could do the same thing automatically. So far it seems rather tedious - I need to create all ParmTemplates, match their signatures and append to a FolderParmTemplate and set this to the node. Another thing worrying me is menu parameters - I do not need to create interface with menus, can I only set the desired value? Is it equivalent to creating a string parameter and setting it's value to menu item's name (not label)? Thanks, Juraj
  18. So I realized, that it is not possible to set rendering properties as mantra command line arguments. But I found cool solution for my problem, it can be done easily with hscript. opproperty -f /out/mantra1 mantra* *dcm* This did the trick, I am calling it with hou.hscript() in Python.
  19. Now when I think of it, it might be better to pass those properties as command line arguments in mantra driver. How should I format those arguments? For example for DCM Z Storage property. Like this? mantra -vm_dcmpzstorage "16 bit float"
  20. Hi, thanks! It works. int prim; vector uv; int firstPt = primpoint(0, @primnum, 0); vector firstPtP = point(0, "P", firstPt); string grp = "!* ^"+itoa(@primnum); float dist = xyzdist(0, grp, firstPtP, prim, uv, 0.0000001); if (prim != -1) v@Cd = {1,0,0}; However performance is much slower then the previous way. Instant cook vs 4 seconds in this case, maybe using this primgroup parameter is not that efficient. I am still curious about this syntax !* ^240 - how would you explain it? * ^240 means: check against everything, but primitive 240 ! means inversion, like in blast sop: delete non selected, so wouldnt it negate the * symbol? Like that: !* == (nothing) However, if I leave out !*, then it doesn't work. Hmm...
  21. Hello, I am having strange issue - renders coming out of mantra aren't displayed consistently in various apps. I believed that I would be safe with EXRs as they are linear and should be properly displayed in apps. Pixel data are identical when inspected pixel by pixel. However I noticed slight difference when displayed in mplay, nuke, rv, djv_view Any ideas? I made sure that in Nuke I am loading linear exr and no custom lut / IP is being used in viewer. I attached sample exr so that you can test it out. Thanks, Juraj img.exr