Jump to content

Triplett

Members
  • Content count

    7
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Triplett

  • Rank
    Peon

Personal Information

  • Name
    Ed T
  1. That was it! I can't believe it was a simple checkbox. I tried it earlier before the scaling was corrected but it didn't come together so I didn't think of that box again. Thanks so much Ben.
  2. I haven't used any of the SideFx Lab / Game Dev tools yet in this file but I do have it installed. I am not sure why that will cause an error. I Just tried to save out as a .hip file in the hopes that this .zip folder will work for you. I searched for how to uninstall the SideFX labs tools (game dev) without luck. It seems like the issue is with the environment file on my setup not matching yours. It is sort of annoying that this one installation makes it so hard to share things. Melgaco2_Houdini_Import_Sharing.zip
  3. Is it possible that this is a bug? I am not sure how to move forward if the scale in the geometry spreadsheet doesn't match the scale in the viewer.
  4. Thanks Ben. Your advice has been extremely helpful. I made your short edit to the VEX in the attribute wrangle and I was able to get the points to recognize the scale of each image via "teximport" but unfortunately this project keeps introducing new strange problems. The result you can see below shows that the scale is correct for some objects, but incorrect for others. Sometimes the scale is off in the X-axis, and sometimes on the Y-axis, but never both! I checked one of the more obvious objects - the sky - and noticed that if I set the Y-scale to 6x with an edit node, it lined up very well. Other objects are 1/3, 1/5 of their correct scale in either the X or the Y axis. Looking at the geometry spreadsheet for the point that the traced sky gets copied to, I saw that the scale was correct. (5404 x 860) - This matches what I see in the image's exif data outside of Houdini also. The Z scale (scale[2]) is set to 4 for all of the objects. I don't know where it got this number since each cropped mask image only has an x and a y resolution. I created a box object that was 5404 [x] 860 [y] and 1 [z] and it looked to be the exact correct size I needed for the sky, but as per point #1 the traced sky is 1/6 of what it should be in the Y axis. It is as though there was a random expression on the scale vector, but I never wrote one, there are no edit nodes in the network, and that also wouldn't explain why a handful of objects still seem like they are scaled and placed correctly. I am attaching a zipped project here along with a few images of the spreadsheet and the VEX etc. I have a feeling it has something to do with instancing, but I can't figure it out. As always, I would be super grateful for any help you or anyone else on the board can offer. Melgaco2_Houdini_Import_Sharing.zip
  5. Thanks Ben. I think I follow you for the most part. Transforming the pivot for each image in the forEach loop will be easy once I figure out how to use teximport to add the width and height as attributes on the point. I originally thought I would add imageResolution to the python import script at the top. I am a total beginner with VEX, so forgive me if this looks bonkers. I am getting a little lost on the syntax when they refer to the "map" in the documentation. s@imgFile doesn't appear to be correct: Also, since I am still trying to learn what language to use in which context, why did you need to / choose to use HScript in the trace node above?
  6. Thank you Gorrod! This is a huge step forward. I completely missed the file directory parameter. I think that alone will open up a lot of opportunities for this project in the future. I was able to duplicate your python code for my Json file and I pointed the img directory to my mask files (rather than the corresponding images you see above). The results of the Trace are heavy, but manageable with some optimization and I can at least see the way forward. The one part of your network I duplicated, but definitely didn't understand was the HScript you added to the "image input" bar for the trace node: `points(-1, 0, "imgFile")` - Until I looked it up here: https://www.sidefx.com/docs/houdini/expressions/points.html - (I have struggled to understand when I am supposed to use HScript, when VEX etc.) I also need to understand dependencies better. My next task is to pull out the scale of each image as an attribute on the primitives (maybe?) so they don't all come out extremely tiny. I also need to move the pivot to the upper left corner for each. Right now the scale is set to 1m per pixel of the original image for the points, but the carved up images come in at a single universal scale. I am going to try to create an attribute wrangle in the for each loop that uses this function: https://www.sidefx.com/docs/houdini/vex/functions/teximport.html ... although I wonder if I would be better off tying this in Python with this function: https://www.sidefx.com/docs/houdini/hom/hou/imageResolution.html (all advice is welcome) You can see how wonky the scale and p ivot positions are here: I am hopeful that this .zip will not cause the same errors in the .hipnc file as before. I also made sure that the correct json was inside. Melgaco2_Houdini_Import_Sharing.zip
  7. Hello. I only started using Houdini a few months ago, so this may be a little too complex of a question for this forum, but I have been spinning my wheels for too long not to try. Here is my goal in as simple terms as I can come up with: I am trying to reassemble a complex image from a folder of cropped and masked pieces of that image. I also have a Json file that offers pixel coordinates for the upper left corner of each piece, the Object ID (filename for each piece) and a bunch of attributes that explain what each piece is. (Parts of a house, a tree, etc.) In the short term, I would like to use the trace node on each piece to create a simple flat piece of geometry for each piece, and copy that piece to its corresponding point. The "corresponding point" is the point that matches an "ID" attribute to the filename of each cropped image (ex: "melgaco2_1521041_etc.png"). I also have a folder of "white and alpha" mask versions of each cut out image that have the same ID numbers in the file name to use with the trace node. I did not share those here, but I can if needed. Below is a screenshot of the cut up image files, and a composite of the imported Json file with cubes at the origin point of each piece over top of the original image: Here are my problems: 1. I don't know how to import all of these images into Houdini. I tried a File Pattern via the TOP network, and I created 160 "work items"but I am a little lost trying to figure out how to do anything with those items since they are not geometry yet. 2. Once I could get a detail? for every image piece via the trace node, I would need to create an attribute wrangle that would match it to a point that has the same "ID" attribute as the image file's filename. (I come from a GIS background, so I keep thinking this would be easy, but this kind of "join" is hard to find int eh documentation) 3. I am trying to make this procedural - I would like to be able to create an HDA that requires two inputs: a path to the file folder of images, and a link to the corresponding Json. I am getting lost about what "Level" everything needs to be on, especially when I started messing around with the Top Network File Pattern Node and "work items." Should each image file piece be its own object, or can I keep them as primitives or details of one object? 4. I have barely started learning about the img environment, so I imagine I might need to be working more in the COP network, but I am struggling to understand how to "move" between environments. If anyone out there knows a tutorial that clarifies how to connect nodes between the Geo and img environments please share Thanks for any help, SuperviselyJson_Python_ET_v008.hipnc melgaco2_jpg.zip
×