Jump to content
gramx

Per-Frame Alembic export

Recommended Posts

Hi Ivan

 

Thanks for your post, it appears that you can write per frame. abc files with a standard ROP output driver, instead of the alembic ROP.  output: "myalembic.$F4.abc"

I have tested this and it seems to work for now! I will email you if I run into any difficulties.

 

Thanks

 

Graham

Really?!! Are u using H14?

Super!!! No needs more python to do that then. :)

Edited by IvanPulido

Share this post


Link to post
Share on other sites

Yes, I am using H14. Don't use ROP Alembic output. I used ROP Output or file cache instead "myalembic.$F4.abc". I also export vdb the same way myvdb.$F4.vdb

Share this post


Link to post
Share on other sites

Yes, I am using H14. Don't use ROP Alembic output. I used ROP Output or file cache instead "myalembic.$F4.abc". I also export vdb the same way myvdb.$F4.vdb

Super!!!! 

And all the attributes and everything is stored correctly in the sequence?

Thanks for the info man.

Share this post


Link to post
Share on other sites

The code jason was referring to:

 

GEOio.json entry

{
    "description": "Vray vrmesh",
    "extensions": [".vrmesh"],
    "opipe" : "/some/path/scripts/convert_to_vrmesh stdin.bgeo '%(save)s'"
}

Script

# Convert geometry stream to temp, bhclassic file.
gconvert stdin.bgeo /tmp/__vrmesh__.bhclassic
 
# The 2nd arg is the file path we want to write the vrmesh to, except
# it doesn't actually seem to be.  Houdini actually seems to pass a
# random temp file path to write to and then moves that file to the
# actual target path.
ply2vrmesh /tmp/__vrmesh__.bhclassic $2
 
# Remove the temp file.
rm /tmp/__vrmesh__.bhclassic
  • Like 1

Share this post


Link to post
Share on other sites

yes, no problem with attributes or changing point count.

 

Super!!!! 
And all the attributes and everything is stored correctly in the sequence?
Thanks for the info man.

Share this post


Link to post
Share on other sites

Ha ha, yes - Thanks Graham; I completely spaced out on checking this thread again. We use several ply2mesh option arguments too -- which may or may not be required by other people out there depending on ... things....

 

 -materialIDs
 -sortMaterialIDs
 -mapChannel 0
 -flipFaceNormals
 -fps 24
 -velocityOffset -0.25

Share this post


Link to post
Share on other sites

Hi, thanks a lot for that script ! That's really cool
I tried it on windows but it doesn't seems to work when picking stdin.bgeo on gconvert.
It does work with an already existing bgeo file as input, or when using stdin.bgeo but in a unix sop.

Do you think this is windows/linux related ?

Share this post


Link to post
Share on other sites

I might be wrong about this but I think last time we were converting to vray meshes we had to actually rop out our geo as .bhclassic, not .bgeo.

 

Then rename those files to .bgeo and then convert to vrmeshes.

Share this post


Link to post
Share on other sites

cool.  That's good to know.

Share this post


Link to post
Share on other sites

 

The code jason was referring to:

 

GEOio.json entry

{
    "description": "Vray vrmesh",
    "extensions": [".vrmesh"],
    "opipe" : "/some/path/scripts/convert_to_vrmesh stdin.bgeo '%(save)s'"
}

Script

# Convert geometry stream to temp, bhclassic file.
gconvert stdin.bgeo /tmp/__vrmesh__.bhclassic
 
# The 2nd arg is the file path we want to write the vrmesh to, except
# it doesn't actually seem to be.  Houdini actually seems to pass a
# random temp file path to write to and then moves that file to the
# actual target path.
ply2vrmesh /tmp/__vrmesh__.bhclassic $2
 
# Remove the temp file.
rm /tmp/__vrmesh__.bhclassic

how used this script in houdini?  

Share this post


Link to post
Share on other sites

Can confirm a regular ROP Output Driver with file.$F4.abc works properly with VRay.

 

This was fantastic news and a great find, thanks @gramx :)

Share this post


Link to post
Share on other sites
if hou.parm(hou.parent().path()+"/Vrmesh").eval():

    import subprocess,os

    excutable="C:/Program Files/Chaos Group/V-Ray/3dsmax 2014 for x64/tools/ply2vrmesh.exe"

    image=hou.parm(hou.pwd().path()+"/sopoutput").eval()
    imageout=os.path.splitext(image)[0]+".vrmesh"

    argum=[]

    if hou.parm(hou.parent().path()+"/smoothNormals").eval():
        argum.append("-smoothNormals")

    if hou.parm(hou.parent().path()+"/smoothAngle").eval():
        argum.append("-smoothAngle")
        argum.append(str(hou.parm(hou.parent().path()+"/smoothAngleValue").eval()))

    if hou.parm(hou.parent().path()+"/flipNormal").eval():
        argum.append("-flipNormal")
          
        
    if hou.parm(hou.parent().path()+"/flipVertexNormal").eval():
        argum.append("-flipVertexNormal")     
        
    if hou.parm(hou.parent().path()+"/flipFaceNormal").eval():
        argum.append("-flipFaceNormal") 
        
    if hou.parm(hou.parent().path()+"/flipFaceNormal").eval():
        argum.append("-flipFaceNormal")     

    if hou.parm(hou.parent().path()+"/flipYZ").eval():
        argum.append("-flipYZ")  

    if hou.parm(hou.parent().path()+"/flipYPosZ").eval():
        argum.append("-flipYPosZ")  
        
    if hou.parm(hou.parent().path()+"/materialIDs").eval():
        argum.append("-materialIDs")    
        
    if hou.parm(hou.parent().path()+"/sortMaterialIDs").eval():
        argum.append("-sortMaterialIDs") 
        
    if hou.parm(hou.parent().path()+"/previewFaces").eval():
        argum.append("-previewFaces")     
        argum.append(str(hou.parm(hou.parent().path()+"/previewFacesValue").eval()))

    command=[excutable,image,imageout]+argum

Hi guys,
Here is my post Write script that i use to automate the convertion of .bhclassic in .vrmesh.
You also need to populate your Rop with parms that is called by the script.

cheers

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×