Jump to content

UV's move on bgeo sequence


Recommended Posts

Having bit of a problem with this in houdini... I imported a animated model via bgeo sequence into a geo file.

Okay, no problem. I use an unwrapuv to get a basic texture going on it. Problem is, when I press play, the UV's animate

with the moving model... now I usually do this in Maya (just delete history) and all is fine... The UV's stay in place and the

texture properly animates with the model moving... How is this accomplished in Houdini? :) thanx...

Link to comment
Share on other sites

What are your animation and uv spaces? If you animate in world space and then apply uv in that space they will probably swim. If you can't uv the object in object space then try and lock the uv from a frame: make a separate stream, texture, lock the node or set it to a constant frame (timeshift) and then copy your uv from that node to the other stream.

Link to comment
Share on other sites

What are your animation and uv spaces? If you animate in world space and then apply uv in that space they will probably swim. If you can't uv the object in object space then try and lock the uv from a frame: make a separate stream, texture, lock the node or set it to a constant frame (timeshift) and then copy your uv from that node to the other stream.

Hello Macha! It seems the UV's were applied to the mesh, then the mesh was animated in some other program. I imported the sequence in Maya, and there is a UV map as well.

The problem is that in a bgeo sequence, the UV map is going to change over time... no? So now I'm trying to export the file as FBX out of Maya... the material is there, the model is there... but now, no animationi :/ nothing in CHOPS... I applied a geometry cache in Maya to the model, imported it onto a copy of the model (to get rid of any history) and the exported as FBX .. import into Houdini... everything is there except I lost the animation... seems I'm not getting any vertex cache data or something here...

But all & all ... When I use unwrapuv on an imported bgeo animated sequence... the uv's in the unwrapuv window move along with the animation... probably because I'm applying a uv map to an already animated sequence... ? The order is wrong in the workflow but I'm trying to save time having to model and animate somethign that's already done... just trying to get it into houdini with hotocean sim :)

Link to comment
Share on other sites

Generally speaking the UV map should not change in time. It is 'stuck' to the geometry. If you have something moving about and then apply a uv map you risk having the whole thing wobble about, especially if you use any kind of projection method. That's why I said you should keep uvs as they are on a single frame.

When you import data and have uvs perhaps you should make sure they are on points/vertices (wherever they should be).

Is your pointcount changing by any chance?

Edited by Macha
  • Like 1
Link to comment
Share on other sites

I have a little input.

Does the point count change over time? If not you could export one OBJ file from Maya with UVs included. Then in Houdini, use the VertexSOP to copy the UV map from the OBJ file to the BGEO sequence. The FBX may also hold UV data too.

Also if you want to import your geo sequence back in Maya, you can export an OBJ from Houdini with the UV map, or use the same one in Maya, and use the attribute transfer function in Maya.

But that's if the point numbers stay the same...

Edited by Ryan
Link to comment
Share on other sites

  • 2 months later...

For any newbs finding this later: I had the same problem, having a bgeo sequence that I hadn't properly uv'ed and needing to give it uv's retrospectively.

The vertex sop worked perfectly by:

1) Plugging the File node with the bgeo sequence into the desired uv sop (uvproject, in my case).

2) Locking the uv sop on the desired frame (probably frame 1).

3) Feeding that into the second input of a vertex sop, and the File node into the first input.

4) Hit Add Texture on the vertex sop, and add a 2 at the end of the x, y, and z variables to tell it to use the second input.

5) Cake.

:D

  • Like 2
Link to comment
Share on other sites

  • 2 years later...

It's a old thread, but seeing as it just came up again, I just wanted to add:

Instead of "2) Locking the uv sop on the desired frame (probably frame 1)."

Try using a TimeShift node with the Frame set to 1 - that should have exactly the same effect without requiring you to bake a copy of the entire input geometry into your .hip file by locking the node. Generally locking should be avoided unless you're using it to quickly hack a solution.

Link to comment
Share on other sites

  • 4 years later...

An even newer update to Whithers' original helpful post and danw's update that I hope helps those new to Houdini (hopefully Whithers won't mind my copy/paste of much of his original text). I added a few more steps since I'm being very explicit:

The vertex node you want in Houdini, at least as of v. 17.5 is called "Vertex - Old." The new node called "Vertex" is an Attribute Expression sop and doesn't work with these specific instructions.

1) Plug the File node with the bgeo sequence into the desired UV sop ("UV Project", "UV Texture", etc).

2) Plug that UV sop into a "Time Shift" sop.

3) Click in the "Frame" field of the "Time Shift" sop and change it to 1 (or whichever frame you are "locking").

4) Connect the "Time Shift" sop to the second input of the "Vertex" sop. Again, it's actually the "Vertex - Old" sop. 

5) Connect your File node (your imported .bgeo file) into the first input of the "Vertex" sop.

6) Click on the "Vertex" sop and about halfway down, change the "Keep Texture" tab to "Add Texture."

7) You will see green boxes that say @uv.x, @uv.y and @uv.z. Change these to @uv2.x, @uv2.y and @uv.2.z. The original instructions confused me at this step and I first changed it to @uv.x2, etc. which doesn't work :)

Your texture should now stick to your geometry. I even applied it to a specific piece of my entire .bgeo animation (using the blast node to separate it from the rest) and it worked great. Thanks again to the previous posters for their instructions. Hope this helps on the newer versions as well.

  • Thanks 1
Link to comment
Share on other sites

instead of dealing with Vertex SOP or Vertex - Old SOP, you can use Attribute Copy SOP to just copy any desired attribute (or multiple attribs) from static geo to deforming one as long as they have the same topology or if you have attribute to match them by

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...