Jump to content

[SOLVED]Melting UVs?


Recommended Posts

I have an iPhone model that I am melting.

I am using attribute transfer to migrate UVs from the original model onto the fluid based resulting model. In the viewport it looks ok. I see my UVs are traveling with the points and appear to be melted. Notice how the green smudge seems to be in a lower location in the viewport.

untitled-2.jpg.ddb385c2f438b3426d1c684c2d1df253.jpg

 

But when I go to render, the UVs look like they are not carrying through and only inherit the position/location from the first frame. The top row of icons in the melted render is actually from the middle of the unmelted phone.

untitled-1.thumb.jpg.0a50011be983f8903638191467ff69e5.jpg

I am transferring the @shop_materialpath as well as the UVs .

untitled-1.jpg.31a89f00b5d0f8ea9284d8bd0fed31c2.jpg

Edited by Atom
Link to comment
Share on other sites

Ok, I think I have found the solution.

 

Before you submit your geometry to the fluid simulation you must promote all attributes you want to melt, to points. So Cd, uv and shop_materialpath should reside on points before the simulation begins.

 

After simulation, in the meshing network, you need to add those attributes (Cd, uv, shop_materialpath) to the transfer list of the fluidcompress and the particlefluidsurface nodes. After the particle surface node you need to promote the attributes back to their appropriate resting area. So uvs get promoted back to vertex and shop_materialpath gets promoted back to primitives.

untitled-1.jpg

Edited by Atom
  • Like 3
  • Thanks 1
Link to comment
Share on other sites

  • 4 weeks later...
  • 5 months later...

Just transfer all the UVs from vertex and the @shop_materialpath from primitives. Create a unique material for each @shop_material path and the textures for those faces should lineup with your image maps.

If you are talking about having additional attributes like uv2, uv3 etc... then promote and transfer them through the system like the original UVs.

Link to comment
Share on other sites

So I think my situation is a bit complicated by the fact I'm using an FBX file and it imports the materials into an FBX surface shader with groups for the UVs. Does this mean I need to rebuild all of the textures into Material shaders into a SHOP network in order to point @shop_materialpath to instead? Sorry, I'm pretty new to this. I managed to surprise myself and get it working with a single material object, but am hitting a wall when trying to point my particle fluid to the group selection/fbx shaders. 

I've attached my file in case it helps. Thanks

 

 

119_FLIP.hiplc

Link to comment
Share on other sites

I have modified your scene to allow both uv and shop_materialpath to flow through the fluid simulation. The higher the resolution, the better the quality of the attribute transfer.

 

I generally discard FBX materials that are generated by Houdini and use a wrangle to re-write the @shop_materialpath to point to the material context I am using. Sometimes /shop, sometimes /mat.

I have added a wrangle near the end of the Genesis3_Male node inside the FBX import node. This wrangle uses a simple IF statement to detect the old material name and reassign a new one that points to /mat context. Inside the /mat context I have dropped down a Principled shader and renamed it to "Face". Go ahead an extend this code by  writing the material path code for the other 16 materials on this object. Then you can populate your /mat context with shaders and plug in your maps to those materials.

if(s@shop_materialpath =="/obj/gen3_fbx/materials/Face") {
    s@shop_materialpath = "/shop/Face";
    // Or use the /mat context.
    s@shop_materialpath = "/mat/Face";
}

untitled-1.jpg.81aa50876f875a91483b34458f9ba0f5.jpg

ap_119_FLIP.hiplc

Edited by Atom
  • Like 4
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...