Jump to content
[[Template core/front/profile/profileHeader is throwing an error. This theme may be out of date. Run the support tool in the AdminCP to restore the default theme.]]

Community Reputation

8 Neutral

About localstarlight

  • Rank

Personal Information

  • Name
    Steve Watts Kennedy
  • Location
  1. How to use unix command on Windows?

    You might well be right, but I was actually just using that as an example. One of the things I'm actually trying to do is run ffmpeg. The command I have works fine in the Windows command prompt, but does nothing when trying to do it using 'unix' in HScript. What I'm looking for is a generalised way to send commands to the command line... I presume there's some way to do that, but I can't figure out the syntax...
  2. How to use unix command on Windows?

    I am trying to run a shell script on Windows as part of an output pipeline, but not sure how to use the 'unix' command so that it actually works. Suppose I am using the command: md "c:\snake" Which works fine in the command prompt, but when I add it as a 'Pre-Render Script' like this: unix md "c:\snake" It doesn't work. What am I missing? My understanding from the documentation was that the unix command in HScript would send the following text to the system command prompt...
  3. Can't get attributes correctly using primattrib

    Awesome, thanks so much for the explanation! Always helps to understand a little deeper how things are working under the hood. Thanks!
  4. I'm probably doing something really simple and stupid here, but I can't for the life of me figure it out. I'm just trying to test out reading/writing attributes in vex, but it seems like I can't read a value out in the same node that I write it, which seems insane. Here is the test code I'm using: i@test_value = 1; int check_success = 0; i@get_value = primattrib(0, "test_value", @primnum, check_success); i@success = check_success; After this code runs, here are the values: @test_value = 1 @get_value = 0; @success = 0; So... even though I have literally just written the value into the 'test_value' attribute, I can't read it out. I noticed however that if I move the last three lines of code to another wrangle, then it works. For this tiny example, that would be fine, but for the larger piece of code I'm working with, I need to be able to write a value to an attribute in one part of the code, and then check what that value is in another part. What's going on here? Is this a bug, or a limitation of VEX?
  5. Writing attributes to image file

    Figured it out. I thought I could put the (IX+YRES*IY) straight into the 'Point or Primitive' attribute on the Get Attribute node inside the VOP COP filter, but as it turns out that was always resolving to zero. I just needed to build the sum using nodes inside the VOP COP. Got it working now.
  6. Writing attributes to image file

    Hey, I'm resurrecting this thread because while I must have got this working before (in August last year) I no longer seem to have the project file, and I can't figure it out. I've attached a sample project file. I've scattered 128x128 points inside a sphere in 0->1 space and want to output the positions of these points as RGB values in a 128x128 texture. The Get Attribute node doesn't seem to be pulling anything into the VOPCOP Filter, but I can't see why... Side question: I want to export this data as a 16bit PNG file, but I can't see how/where I need to set that. Also, do the 0->1 values need to be scaled to something for a 16-bit output, or will 0->1 be stretched across all possible 16-bit values? Any help massively appreciated! PointsToPixels.hiplc
  7. Any way to take non-planar volume slice?

    This is awesome, thanks so much for the hip file!
  8. Dark Matter Filaments - Suggestions for form like this?

    Hey, thanks for the response. I'm now on my fifth iteration of trying out different techniques. Have something pretty similar to what you're describing. Think I'm getting there, slowly! Will share something when I'm done. Thanks!
  9. I've been using the Volume Slice SOP to take planar slices of volumes to extract textures. I'm wondering whether there is any way to extract a volume slice using a distorted plane? For example, with a toroid volume (shown here as a mesh not a volume): So using a distorted plane, I want at each point in the plane to be recorded the volume's density at that point. Is there any way to achieve this?
  10. I am trying to create some organic form in Houdini, which is meant to look like the dark matter filaments in cosmological simulations like Illustris. Here is an example image: I am trying to create the look on the left, with this tangle of filaments, and clusters of particles which are denser in certain regions than others. Here is a video reference: http://www.illustris-project.org/movies/illustris_movie_full_cube.mp4 Again, I am looking to recreate something similar to the left side of the video. I'm sure Houdini must be ideal for something like this, but I'm having trouble figuring it out. I've been playing with volumes and cellular noise, then converting to polygons and scattering points, but it's not working out very well, and seems like there must be a better approach. Any recommendations for tutorials for something like this would be most helpful! Thanks!
  11. Detect surface using VEX

    Hey symek, that did the trick. I had the input listed wrong. Thanks so much for your help! It works without initialising those variables, but good to know that's something to look out for. No apology necessary, I understand it's a bit frustrating when people treat forums as Google For some reason my searching only turned up trace(), which doesn't return the position of intersection, so I wasn't sure it was something VEX actually had. Thanks again for your help.
  12. Detect surface using VEX

    I'm trying to use the first example you gave (SOPs: intersect) but can't get it to work for some reason. Here's the VEX I'm using: vector direction = @N * -100; vector new_position; float u,v; i@intersected_prim = intersect(0, v@P, direction, new_position, u, v); @P = new_position; I'm trying to shoot a trace in the opposite direction to the point normal. Essentially I have a tube mesh surrounding a more complicated shape, and I'm trying to project the points of the mesh inwards onto the more complicated geometry. The attribute @intersected_prim is returning a prim number (which I assume must be the id of a prim on the more complicated inner geo), but new_position doesn't seem to be getting the location of the intersection, and so @P remains unchanged. This is my first time using a VEX function that requires passing a variable by reference, so perhaps I'm doing something wrong with that?
  13. Detect surface using VEX

    Great, thanks! I actually did various searches trying to find the answer, but clearly I was not phrasing my question right to turn it up. I only ever post on forums as a last resort, but thanks for the reminder nonetheless
  14. Detect surface using VEX

    Suppose I have a position (e.g. [100,200,300]) and directional vector (e.g. [1,0,0]), is there a way in VEX to fire a line trace/ray from that point along that vector and get the position of the first surface primitive that's hit?
  15. Writing attributes to image file

    Works perfectly, thanks so much!