XaiJu
entagma
entagma

patreon


PDG 101 - Pt.4: Batch Processing

Got tons of files on disc, you need to process? Let's automate this using tops!

In this video, Chris Kopic creates a batch processor in tops that takes stl files from threedscans.com, polyreduces them to a more manageable size and bakes textures to preserve small details.

PDG 101 - Pt.4: Batch Processing

Comments

Oh that's a neat idea! I think using the current FBX workflow you're required to press a button to export it. So you might need to add a small Pre-Render-Skript to the Geometry Output like I described earlier in this thread.

Entagma_Chris

Hey, that's one part of tops which is a bit weird. The light blue colored attribs on top are defaults in tops. They always need the "pdg_" prefix when referenced inside parameters. See also the "@pdg_index" attrib used in other episodes.

Entagma_Chris

Another excellent tutorial. Minor critique. Why not simply create a new material INSIDE Houdini using Principled shader and generated maps to test the baking ? Geometry could then be exported as fbx files with baked materials.

jimbachalo

Hello, I am not understanding how you know to use the '@pdg_input' as a value when creating the geo_export attribute in TOPS. I do not understand where the 'pdg' comes from? I can see the "input path" in the ropgeometry node but there is no 'pdg' prefix?

Minimal Massive

I've managed to get it working by using a Labs OBJ Importer, they look almost identical but for some reason that one does refresh. But this script will definitely be useful in the future - thanks so much for your quick reply!

Yonni de Haar

Well, let's say this is one of those instances where I'm not to happy with the way houdini handles certain file imports. Let's say you want to use the Labs FBX Archive Importer for import and the ROP Geo Output TOP for export. Here's what you need to do to make tops hit that refresh button for you: In the output top, in the scripts tab check "Pre-Render Script" and paste the following expression in there: hou.node("/obj/geo1/fbx_archive_import1").parm("reload").pressButton() Make sure, the path to your import node in the first parenthesis is the correct one. Then, just to be safe, dirty all nodes and cook the rop top. This should work now.

Entagma_Chris

Thanks for this tutorial - came at the exact right time! I'm just wondering if there's any way to batch this with materials on the geo? Houdini doesn't automatically create materials with OBJ's, and if I try it with the Labs FBX Archive Import I have to hit reload in order to load in new geo. Any ideas? :)

Yonni de Haar

I'm enjoying this series. Thanks for providing a great resource and looking forward to watching the rest.

James Williams

Hey! That's a great question and I think there's a technical answer and a general workflow one to it. From the technical standpoint, yes, I think this should work. You would need to calculate a distance globally for each model (as a detail attrib) and I would maybe try out both xyzdist and intersect as functions, to see what works better, but this should give better results. From a workflow perspective though, it's good to keep in mind, that the point of pdg is to reduce manual labor, so I'd start by quickly eyeballing a value, test it with a few models and only look at more complicated solutions if the results were just way to different.

Entagma_Chris

Very helpful general library tutorial, thanks. I was wondering if it would be possible to calculate the ideal bias and ray length using VEX(vops) xydist and use the result as an input parameter dynamically?

Joerg Fluegge


More Creators