How to get UVs into a Vex Geometry Vop?

   8256   9   1
User Avatar
Member
511 posts
Joined:
Offline
Hi there,

I have a model which I am shading with a zbrush displacement map, and the excellent Axyz SSS shaders. I realise that I have to displace my point cloud the same as the displacement shader.

I pretty much figured out how to displace the geometry, it works apart from the fact that I dont know how to get the UVs into the vop network.

In other words, I got as far as displacing the geometry along normal using a color map with P connected to its u and v inputs… need something other than P.

at the moment my geometry network is as follows: File OBJ -> Reverse (this has the render flag) -> Subdivide -> VEX -> AxyzP Cloud

You help is much apreciated.
Cheers
Serg
User Avatar
Member
4261 posts
Joined: July 2005
Offline
You can use the Import VOP to import the uv attribute.

Attachments:
import.hip (73.6 KB)

if(coffees<2,round(float),float)
User Avatar
Member
511 posts
Joined:
Offline
Hi Wolfwood,

I imported your scene, replaced the texture with my displacement image and it seems to work perfectly with the grid, unfortunatly when I use it with my geometry I get a lot of noise, even in areas where its not supposed to displace at all, and lots of spikes along discontinuous uv edges (not present in render)… tweaked displacement amount etc but no success.

I suppose I could just load a high rez uv mesh and generate the pcloud from that… but… :roll:

Thanks
Serg
User Avatar
Member
511 posts
Joined:
Offline
I'm stuck between a rock and a hard place… cant use dispalcement Sop because of the above, and cannot generate pointcloud on a 400K poly mesh… Houdini memory consumption rises to 1.25GB then crashes.

Gonna try boot into Linux to see if it copes better there.

Does anyone else have problems with Vex sop displacement maps on complex meshes or is it just me?

Serg
User Avatar
Member
52 posts
Joined: July 2005
Offline
Hi Serg

ZB spits out its UVs as vertex attributes. Using an attribute promote sop to convert them to point attributes before sending them to your disp sop should sort things out.

User Avatar
Member
12461 posts
Joined: July 2005
Online
This might help you a bit with ZBrush and Houdini. Personally I have never used ZBrush so I hope this all applies still

http://odforce.net/forum/index.php?showtopic=3462&hl=ZBrush [odforce.net]

One day SESI or someone should put together a comprehensive set of ZB tools and also some user documentation (on OdWiki?)…
Jason Iversen, Technology Supervisor & FX Pipeline/R+D Lead @ Weta FX
also, http://www.odforce.net [www.odforce.net]
User Avatar
Member
52 posts
Joined: July 2005
Offline
jason_iversen
One day SESI or someone should put together a comprehensive set of ZB tools and also some user documentation (on OdWiki?)…
I noticed SESI recently posted in the ZB forums inviting Canadian Zbrushers to apply for internships with them. I take this as a sign that things might be moving in the direction you suggest. I hope they get some worthy takers - http://www.zbrushcentral.com/zbc/showthread.php?t=37302 [zbrushcentral.com]

User Avatar
Member
710 posts
Joined: July 2005
Offline
Unfortunately point UVs won't do him any good, he needs seam discontinuity for something like this.

Hi Serg, depending on how detailed you need your pointcloud to be, the following solution ought to work. I'm going to assume the pcloud doesn't have to be so dense that you need to create it from geometry approaching 400k polys (otherwise you might as well be loading in the displaced ZBrush mesh).

What you can do is “bake” your displacement texture into your model as point colors and then use those point colors (well, grayscale but you know what I mean) to drive the displacement. You can use the ‘tex’ function to do it. Your network would look something like this…

File OBJ -> Reverse -> Subdivide -> Vertex -> Point -> VEX -> AxyzP Cloud

Vertex SOP
“Add Texture”
Leave default $MAPs

Point SOP
“Add Color”
tex(“Cmytexture.jpg”, $MAPU, $MAPV, r)
tex(“Cmytexture.jpg”, $MAPU, $MAPV, g)
tex(“Cmytexture.jpg”, $MAPU, $MAPV, b)

In VOPs use the Cd attribute to drive the displacement:


Hope this helps a bit.
User Avatar
Member
511 posts
Joined:
Offline
Thanks Da Juice this works almost perfecto! very handy to know this

I say almost because the Subdivide Sop seems to subdivide the uv boundaries linearly. It causes some small problems on some areas of my model, but the sss shader is forgiving enough to let me get away with it, and those areas happen to not be intended to be displaced anyway so I can jut paint 50% gray on them. But its something sesi should look at.

The other thing is that houdini is very hang prone when doing anything to the 400K mesh. Still cant generate the pcloud on this resolution, the point attributes that the Axzys pcloud sop generates pushes it over the edge, a regular Scatter sop works fine but those extra attributes are necessary for the shader to work. Perhaps the the Axzys sop can be slimmed down to bare bones?

Also is it possible to turn off display of point colors? it really slows down interactivity, and if I'm looking at the 400K version the model has a tendency to disapear from view more often than when there are no point colors. Maybe its a driver issue.

Cheers
Serg

edit: the point colors slows it down as in from 60fps to 4fps
User Avatar
Member
4261 posts
Joined: July 2005
Offline
Serg
The other thing is that houdini is very hang prone when doing anything to the 400K mesh. Still cant generate the pcloud on this resolution, the point attributes that the Axzys pcloud sop generates pushes it over the edge, a regular Scatter sop works fine but those extra attributes are necessary for the shader to work. Perhaps the the Axzys sop can be slimmed down to bare bones?

Also is it possible to turn off display of point colors? it really slows down interactivity, and if I'm looking at the 400K version the model has a tendency to disapear from view more often than when there are no point colors. Maybe its a driver issue.

edit: the point colors slows it down as in from 60fps to 4fps

Are you using the density estimate? Or hand setting the number of points to be generated? If you are using the density estimate then the number of polygons doesn't affect the number of points generated on a surface, what does matter is the size of the object. If its creating too many points then you might want to set the scattering distance higher.
if(coffees<2,round(float),float)
  • Quick Links