Nicolas Longchamps

Nicolas Longchamps

About Me

Game Artist


Recent Forum Posts

Best workflow for importing an image and model it? Nov. 20, 2019, 5:55 p.m.

- In a geo node : Load an image in a file node and it will create an image plane. I think the size is 1 unit == 1 pixel. The resulting object is a 2D volume you can manipulate as you wish.

- In a geo node : Use a cop2net node. Load image in there. Result is roughly the same as above, but you'll have a bit more options like gamma, resolution and obj type. etc. You can also edit the image in the COP as needed.

- Load images into your network view. Use ctrl-i to arrange them. I like this method a lot for reference images im not using directly for modeling.

controlling voxel size in vdb from polygon Nov. 19, 2019, 9:41 a.m.

You can have multiple VDBs with different resolutions but voxel size is constant in a single VDB. What you might be looking for is a VDB mask to localize the blurring.

Scatter 250 rocks using HF scatter Nov. 11, 2019, 12:03 p.m.

The way i usually load files from disk, assuming they are in the same folder:

- use a python node to read from a directory, create a point per file found that i want with the path and name as point attributes.

import os

node = hou.pwd()
geo = node.geometry()

#get dir contents
dir = node.evalParm('pPath') # from path parm
dirContent = os.listdir(dir)

#create pt attribs
attribPath = geo.addAttrib(hou.attribType.Point,'filePath','')
attribName = geo.addAttrib(hou.attribType.Point,'fileName','')

#loop over dir contents
for f in dirContent :

    p = os.path.join(dir,f)
    #make sure it is a file and type is bgeo
    if os.path.isfile(p) and os.path.splitext(p)[1] == '.bgeo':
        pnt = geo.createPoint()
        pnt.setAttribValue(attribPath, os.path.abspath(p) )
        pnt.setAttribValue(attribName, f )

Then a for loop, iterate over points. For each point load the file given the path in the point's attrib. Load directly or as packed disk prim. Add class or name attrib based on loop iteration.

The HF Scatter node allows to define pieces by attribute. However i found name attribute doesn't work, so it possibly doesn't like string attribs. Use an integer attrib like class. Using this method you can scatter your 250 objects in one pass.

One bug i found however is that the point relaxation is done before object instancing, so i think the relax does not take into account the actual instance size, just the scale value in the “variability” section. Im not sure how to fix that without cracking open the scatter tool.