Jump to content

mnlrbr

Members
  • Content count

    8
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

Community Reputation

1 Neutral

About mnlrbr

  • Rank
    Peon

Contact Methods

  • Website URL
    reviewarchitecture.org

Personal Information

  • Name
    Manuel Ribeiro
  • Location
    Münster
  • Interests
    Architecture and digital tools.

Recent Profile Visitors

245 profile views
  1. Export materials in obj fiiles

    From the link above i've introduced a feature, which introduces constant material names via group names. It's a simple hack to the wavefront exporter, but it works once you prepare groups to be able to transfer material names. I'll leave it here, if someone find it useful or wants to improve it. Best Manuel ## Add a default material for each group and specific material names for specific groups # Run after .OBJ export. import os PRE_FIX = "hobj" # Pick your own prefix token here. node = hou.pwd() # Get the node this code is running under. file_name_in = node.evalParm('sopoutput') # Fetch the name from the ROP Output panel. the_path = os.path.dirname(file_name_in) # Get the path. the_name = os.path.basename(file_name_in) # Get the name. name_only = os.path.splitext(the_name)[0] # Remove the file extension. s = "%s_%s.obj" % (PRE_FIX,name_only) # Construct a new name that uses the PREFIX. file_name_out = os.path.join(the_path, s) with open(file_name_in, 'r') as f: lines = f.read().splitlines() # Remove slash n character at the end of each line. f.close() mat_count=0 new_lines = [] for line in lines: ary = line.split(' ') if ary[0] == 'g': if mat_count > 0: # Detected a group. gr_nm=ary[1] # check group name if gr_nm[0:4] == 'hmt_': # Pick another material prefix token here. new_lines.append(line) mat_name = gr_nm new_lines.append("usemtl %s" % mat_name) else: new_lines.append(line) mat_name = "mat_%d" % mat_count new_lines.append("usemtl %s" % mat_name) mat_count +=1 else: new_lines.append(line) f = open(file_name_out, 'w') for line in new_lines: f.write("%s\n" % line) f.close() os.remove(file_name_in)
  2. Post Processing An Export?

    Thanks Atom, this script is really useful! I've introduced a feature, which introduces constant material names via group names. It's a simple hack to the wavefront exporter, but it works once you prepare groups to be able to transfer material names. I'll leave it here, if someone find it useful or wants to improve it. Best Manuel ## Add a default material for each group and specific material names for specific groups # Run after .OBJ export. import os PRE_FIX = "hobj" # Pick your own prefix token here. node = hou.pwd() # Get the node this code is running under. file_name_in = node.evalParm('sopoutput') # Fetch the name from the ROP Output panel. the_path = os.path.dirname(file_name_in) # Get the path. the_name = os.path.basename(file_name_in) # Get the name. name_only = os.path.splitext(the_name)[0] # Remove the file extension. s = "%s_%s.obj" % (PRE_FIX,name_only) # Construct a new name that uses the PREFIX. file_name_out = os.path.join(the_path, s) with open(file_name_in, 'r') as f: lines = f.read().splitlines() # Remove slash n character at the end of each line. f.close() mat_count=0 new_lines = [] for line in lines: ary = line.split(' ') if ary[0] == 'g': if mat_count > 0: # Detected a group. gr_nm=ary[1] # check group name if gr_nm[0:4] == 'hmt_': # Pick another material prefix token here. new_lines.append(line) mat_name = gr_nm new_lines.append("usemtl %s" % mat_name) else: new_lines.append(line) mat_name = "mat_%d" % mat_count new_lines.append("usemtl %s" % mat_name) mat_count +=1 else: new_lines.append(line) f = open(file_name_out, 'w') for line in new_lines: f.write("%s\n" % line) f.close() os.remove(file_name_in)
  3. Hi, I would like to know if there is a solution for the export of obj with materials identical to other dccs. I want to use Houdini as part of a workflow in Archviz and it's required that I'll export directly from Houdni to Obj. Atom already posted a solution, but it implies that materials would be applied to disconnected face groups . I've alread sent a request to SF, but is there any other solution? Thx
  4. Particle Exporter for Octane CSV

    it works really good! thank you so much!
  5. Particle Exporter for Octane CSV

    Now, I also found this, made in August 2018, but the scale factor is too small... https://www.orbolt.com/asset/FiftyPercentGray::csv_to_octane::2.0
  6. Particle Exporter for Octane CSV

    Hey manx151089, Thank you so much for the answer! This is super useful! What you are now showing is the answer for a single particle animation exporter, it's great! In fact you showed me how I can import a particle animation in OStandalone, Thanks! What did you use? Python? Does this work in 17? Can this be done in Apprentice? so many questions! Can you share your HDA? Best Manel
  7. Particle Exporter for Octane CSV

    I'll start from here! I was watching python integration with houdini and it is in fact super easy (for an expert :P). This narrows a bit my first incursion in the hou module. Thanks! Best M
  8. Hello everyone, I'm starting with Houdini and Python and I have a doubt which would influence my learning curve significantly. I'd like to know if someone has specific information about reaching the transformation matrix of particles in Houdini - preferably in Python. From the SideFx Python Documentation says it's not yet implemented. I also read somewhere here that it's possible through VOP/VEX. The objective is to make a particle export script from Houdini to Octane's CSV - to adapt Houdini to an existing workflow. This CSV file only has these particle's transform matrix. And it would have to be usable, for example, for 5 million particles. Does anyone has any tips? Or in alternative if someone has this script already, it would be great! I'm not a coder (MaxScript only) and it will take me ages to get it done... Thanks in advance! M
×