Jump to content

Uniform Texture Coordinates


Recommended Posts

  • Replies 59
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Ok as I suspected when I put the timers in I found that the bottle neck was in the actual smoothing loop.

I've totally rewritten that part and used a pre caching loop that totally speeds things up. Its about 3 - 4 times quicker. It still chugs through at about 0.5 secs per loop for 10,000 points, but its hard to see any way to make it even quicker. Open to ideas though.

Probably need to put some interrupts in and find a better way to show the progress rather than using the console.

I'm thinking of adding a float param that I update as the sop cooks, but that seems a bit naff.

@Edward, is there a proper progress bar I can access in the hdk?

UVuniform.zip

Link to comment
Share on other sites

I'm not really sure but check out UT_Interrupt.h.

But 3-4 times quicker sounds like quite a bit of progress! :)

Yeah, feels much better now, you have to wait a bit but at least it feels like the handbrake is off! :rolleyes:

Added a proper progress bar too now, that helps a lot, at least there is something pretty to watch...

UVuniform.zip

thanks for the pointer, UT_Interrupt was the one. I've used it before but never realised it handled the progress dialogue too. Cool.

Edited by sibarrick
Link to comment
Share on other sites

The simplest way is to copy the .dll into your $HFS/houdini/dso directory and restart Houdini.

Just have to watch which version of Houdini you are using... this is compiled for (H8.1.760, windows) it should work for other windows builds around that number, but I can't be sure which ones.

Link to comment
Share on other sites

ok

thanks

I loaded it now I just need to figure out how to use it :D

Copy the config stuff into your $HOME/Houndini8.1 directory and then you should get the help. Which might help.... :unsure:

FAQ

Why use a chain of sops and not just one?

2 reasons

1. Speed, each one uses a slightly less dense grid to do the uniforming process - the grid density is based on the median edge length in uv spce - hence each one cooks quicker than the previous one. I could make that all internal but its extra work B)

2. It seems to be quite hard for the alogorithm to find a solution with a really dense grid so as each sop uses a looser grid it gets better at being able to move points far enough to get a good result.

Does it anly work with point uvs? and why?

It doesn't do vertex coordinates, why? Laziness :rolleyes: Its much more tricky to deal with vertex coordinates so I'm leaving it to the user to convert back to vertex coordinates at the end. 2 sops will help with this attribute promote and attribute copy. Here's an example

sphere_uvuniform.zip

Can it sort out overlapping uv's?

No. Unfortunately bacause it just uses a deforming grid to do all the work any uv's that are overlapping in the original will stay that way.

Notes:

UV's must start in the range 0-1 and be point uvs

In general the only parameters you will probably need to change are the max number of iterations and the retransfer every # number. You will probably always want that at a value lower than the max iterations - say a quarter or half the amount - perhaps lower, just play with that one.

Turn up the max iterations until you don't see any more changes in the result. If it gets too high and too slow start using a chain of sops.

Known Bugs

Just found 2 bugs.

1. When the primitive normals are the wrong way around - ie facing inwards it won't work.

2. At least one pelt I tried only half works, one half of the mesh is not being effected. Or more precisely the top left quarter and the bottom right quarter in uv space. I haven't figured out why yet.

But if anyone tries this sop and finds more situations like this please post them so i can find out what is going on.

ta

Edited by sibarrick
Link to comment
Share on other sites

I tested this and its definetely a big bug. I can't find the cause yet though, let alone fix it. The algorithm should work in this situation, but for some reason the grid isn't picking up the distortion. You can turn on the visualise button and see a symmetrical colour pattern on the mesh but then after that something goes wrong. I now have a mesh based on your cup one that doesn't do anything - ie the sop just doesn't cook, so I need to dig around at quite a low level to find out what is going wrong.

Link to comment
Share on other sites

I tried the SOP with the cup-sample from this thread. It seems the UVuniformSOP displace the UVs slightly and the symmetrical UV-layout is damaged.

post-171-1170332744_thumb.jpg

cup_uvuniform.zip

Well I found the problem - its the way the GQ_Detail is built which means that the edges don't necessarily always go in the same direction over the entire uvGdp, which is fundamental to my quick search method.

The fix at the moment is to use the slow search and reverse polys that are flipped in uv space - so this is not ideal. There must be a proper fix for this so I'll keep playing til I get something that works.

Link to comment
Share on other sites

Thanks for the update. The problem seems to be gone :)

But I have an other specific now. I tried the SOP on my raptor-model. The UVs overlap in some areas - please look at the picture. Right side is the pelted geometry only and on the left side with the UVuninformSOP.

post-171-1170680354_thumb.jpg

And the result of the UVuniform-SOP in the viewer.

post-171-1170680783_thumb.jpg

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