Jump to content


  • Content count

  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won


Atom last won the day on July 13

Atom had the most liked content!

Community Reputation

715 Excellent

About Atom

  • Rank
    Grand Master

Personal Information

  • Name
  • Location
    Ready Player One

Recent Profile Visitors

8,458 profile views
  1. Moana Island Scene [Dataset]

    The Moana .obj files are textured using .ptex, which means there are no UVs on any of the provided geometry elements. I am playing around with adding UVs to some of the larger scene elements so image based textures can be applied.
  2. One simple way to handle random materials is to export a geo sequence with each possible material choice already embedded in the geometry. Then you can leverage your filename construction to automatically pick from a sequence with one of the random materials. This is practical if your geometry does not take up a lot of disk space. int max_material_count = 3; int rnd_index = int(fit01(rand(@ptnum),1,max_material_count)); float frame_to_instance = @Frame; s@instancefile = sprintf("$HIP\geo\my_geo_sequence_M%02d_%03d.bgeo.sc",rnd_index, frame_to_instance); Basically assign your materials and kick out a sequence with each of the materials already assigned. You can also look into style sheets if you plan on rendering with Mantra.
  3. Kohuei Nakama's Effect

    I think the "." means self and the 1 is the zero based index for the self inputs. http://www.sidefx.com/docs/houdini/expressions/opinput.html
  4. Kohuei Nakama's Effect

    What opintput(".",1) means is to fetch the name of the node from input 1, which means connection #2 on the subnet or wrangle. So the expression is obtaining the name of the foreach_begin1, running in primitive mode. Because the loop is running in primitive mode, it has access to the primitve attributes supplied to it's input, @path_pos. I pasted the code into a wrangle and it fails. I guess there is a syntax difference between hExpression and VEX..?
  5. There is a companion to the s@instance attribute. It is called s@instancefile and allows you to instance form disk instead of scene memory. When you know you want to temporally alter an instanced animation try writing the animation out to disk as a sequence. In your example that would be a 96 frame .bgeo.sc sequence. In your attribute wrangle construct a valid filename using the frame number from the sequence. float frame_to_instance = @Frame; s@instancefile = sprintf("c:\my_folder\my_sequence_%03d.bgeo.sc",frame_to_instance); This allows you to implement delays or time warping inside the wrangle itself. For instance to run at half-speed... float frame_to_instance = @Frame*0.5; s@instancefile = sprintf("c:\my_folder\my_sequence_%03d.bgeo.sc",frame_to_instance); To delay until a frame then run at quarter speed... float frame_delay = 24; if (@Frame > frame_delay) { float frame_to_instance = (@Frame-frame_delay)*0.25; s@instancefile = sprintf("c:\my_folder\my_sequence_%03d.bgeo.sc",frame_to_instance); }
  6. Moana Island Scene [Dataset]

    It took about 3-6 minutes for scene generation using most instance points. The actual rendering of the scene, by Redshift, is fairly quick. I just tested it again and once buckets start moving it took 45 seconds for 1920x1080 on a 48Gb Ryzen 1700x running @3.7Ghz using dual 1070gtx. I could probably get a faster generate speed if I took the time to cache out all the points generated from the python scripts. Currently they all need to run before each frame renders, which is a single core bottle neck.
  7. I use Ubuntu 18.04 and ffmpeg works fine out of MPlay so there may be some package you need to get it to work. I do remember that I manually installed the restricted extras package. Maybe give it a try if you don't already have it. https://askubuntu.com/questions/56446/how-do-i-install-the-ubuntu-restricted-extras-package
  8. Noise propogating in circles

    It's makin' my mind spin.
  9. Moana Island Scene [Dataset]

    Here is most of the data sets converted to .rs Proxy files.
  10. Moana Island Scene [Dataset]

    Here is the 1st draft of the isDunesA data set.
  11. Moana Island Scene [Dataset]

    That is the normal operation for instances. You only see points at the SOP level. The Instancing to the viewport is handled at the /obj level.
  12. Moana Island Scene [Dataset]

    Here is a first look at the isMountainA data set with foliage and palms points loaded. And here is isMountainB with everything except LowGrowth. The low growth point set is 3.2Gb of point data all by itself.
  13. Moana Island Scene [Dataset]

    Here is the Fibers, Grass and Palm Debris geometry from the isCoastline data set.
  14. Moana Island Scene [Dataset]

    Here is a short script you can place in a button on the shelf. It will read the Moana materials.json file and create a companion Redshift material in your SHOP network. A few values are forwarded into the node creation process, such as diffuse color, ior, alpha etc... It could be extended to relay more information for a better material match. import os,re,json filename = r"S:\HoudiniProjects\Moana_Island\materials.json" texture_path = r"S:\HoudiniProjects\Moana_Island\island-basepackage-v1\island\textures" def returnValidHoudiniNodeName(passedItem): # Thanks to Graham on OdForce for this function! # Replace any illegal characters for node names here. return re.sub("[^0-9a-zA-Z\.]+", "_", passedItem) def createRedshiftImageMapMaterial(passedSHOP, passedImageFilePath, passedName, passedDiffuse=[0,0,0], passedSpecular=[0,0,0], passedWeight=0.1, passedIOR=1.0, passedOpacity=1.0): print "->%s [%s]" % (passedName, passedImageFilePath) rs_vop = hou.node(passedSHOP).createNode("redshift_vopnet",passedName) if rs_vop != None: rs_output = hou.node("%s/%s/redshift_material1" % (passedSHOP, passedName)) # Detect the default closure node that should be created by the redshift_vopnet. if rs_output != None: # Create. rs_mat = rs_vop.createNode("redshift::Material","rs_Mat") if rs_mat != None: # Set passed values. rs_mat.parm("diffuse_colorr").set(passedDiffuse[0]) rs_mat.parm("diffuse_colorg").set(passedDiffuse[1]) rs_mat.parm("diffuse_colorb").set(passedDiffuse[2]) rs_mat.parm("refl_colorr").set(passedSpecular[0]) rs_mat.parm("refl_colorg").set(passedSpecular[1]) rs_mat.parm("refl_colorb").set(passedSpecular[2]) rs_mat.parm("refl_weight").set(passedWeight) rs_mat.parm("refl_roughness").set(0.23) # Hard coded to soft blur reflection. rs_mat.parm("refl_ior").set(passedIOR) rs_mat.parm("opacity_colorr").set(passedOpacity) rs_mat.parm("opacity_colorg").set(passedOpacity) rs_mat.parm("opacity_colorb").set(passedOpacity) rs_tex = rs_vop.createNode("redshift::TextureSampler",returnValidHoudiniNodeName("rs_Tex_%s" % passedName)) if rs_tex != None: # Wire try: rs_output.setInput(0,rs_mat) can_continue = True except: can_continue = False if can_continue: if passedImageFilePath.find("NOT_DETECTED")==-1: # Only plug in texture if the texture map was specified. rs_mat.setInput(0,rs_tex) # input #0 is diffuse color. extension = os.path.splitext(passedImageFilePath)[1] files_with_alphas = [".png",".PNG",".tga",".TGA",".tif",".TIF",".tiff",".TIFF",".exr",".EXR"] if extension in files_with_alphas: # Place a sprite after the rsMaterial to implment opacity support. rs_sprite = rs_vop.createNode("redshift::Sprite",returnValidHoudiniNodeName("rs_Sprite_%s" % passedName)) if rs_sprite != None: rs_sprite.parm("tex0").set(passedImageFilePath) # set the filename to the texture. rs_sprite.parm("mode").set("1") rs_sprite.setInput(0,rs_mat) rs_output.setInput(0,rs_sprite) #rs_mat.setInput(46,rs_tex) # input #46 is opacity color (i.e. alpha). rs_tex.parm("tex0").set(passedImageFilePath) # set the filename to the texture. # Remove luminosity from texture using a color corrector. rs_cc = rs_vop.createNode("redshift::RSColorCorrection",returnValidHoudiniNodeName("rs_CC_%s" % passedName)) if rs_cc != None: rs_cc.setInput(0,rs_tex) rs_cc.parm("saturation").set(0) # Add a slight bump using the greyscale value of the diffuse texture. rs_bump = rs_vop.createNode("redshift::BumpMap",returnValidHoudiniNodeName("rs_Bump_%s" % passedName)) if rs_bump != None: rs_bump.setInput(0,rs_cc) rs_bump.parm("scale").set(0.25) # Hard coded, feel free to adjust. rs_output.setInput(2,rs_bump) # Layout. rs_vop.moveToGoodPosition() rs_tex.moveToGoodPosition() rs_cc.moveToGoodPosition() rs_bump.moveToGoodPosition() rs_mat.moveToGoodPosition() rs_output.moveToGoodPosition() else: print "problem creating redshift::TextureSampler node." else: print "problem creating redshift::Material node." else: print "problem detecting redshift_material1 automatic closure." else: print "problem creating redshift vop net?" #Read JSON data into the records variable if filename: with open(filename, 'r') as f: records = json.load(f) f.close() for item in records: # Some sub-items only exist some of the time? # If you reference them and they are not there, you get an error. #diffTrans = records[item]["diffTrans"] baseColor = records[item]["baseColor"] alpha = records[item]["alpha"] colorMap = records[item]["colorMap"] displacementMap = records[item]["displacementMap"] ior = records[item]["ior"] roughness = records[item]["roughness"] reflection_weight = 0.1 shader_name = "rs_%s" % item diffuse_color = (baseColor[0],baseColor[1],baseColor[2]) specular_color = (0.9,0.9,0.9) createRedshiftImageMapMaterial("/shop", "%s/%s" % (texture_path,item),shader_name,diffuse_color,specular_color,reflection_weight,ior,alpha)
  15. Moana Island Scene [Dataset]

    I just got the isCoral data set imported and rendering. Here is my Redshift render with default materials. I still need to process. materials.json file for a better match. This image shows approximately 2 Million points instancing .rs proxy objects.