Jump to content

biological modelling methods

Recommended Posts


I was wondering what would be the best strategy to get a clean UV unwrap with this setup?

I tried quickly to get UVs along each trail and transfer the attributes to the mesh resulting from the VDB, but without real success.

Share this post

Link to post
Share on other sites

Here is one way to add UVs to those lines. It does not convert to VDB, it uses a sweep to loft the mesh along the line. If you need VDB output, you can do that at the end and use an AttributeInterpolate to transfer the UVs to your final mesh.

This setup drops in an attribute VOP to add a secondary displacement map along the length of each spline. This means mesh displacement is happening prior to render, but you can still add more normal maps or bump maps to the surface when you get to adding materials.



Edited by Atom
  • Thanks 1

Share this post

Link to post
Share on other sites

Thanks a lot for your answers, i will dig the two options you propose tonight.

Konstantin, your solution would work for pure procedural shading, or with triplanar maps, but you could not generate UV out of it right?

Meanwhile i was playing with super simple polar UV projection and got nice results, here is a test render, but it will not do the trick for more detailed image based displacement.


Edited by nicolas.schlafer
  • Like 4

Share this post

Link to post
Share on other sites

This setup looks amazing, thanks Konstantin.

I usually work with Redshift but this really open my eyes to the power of mantra shading.

Still a lot of blackmagic there for me, but i will definitely dive deeper in it, and i think i grasp the base idea of it at least.

Share this post

Link to post
Share on other sites
On 8/19/2019 at 1:52 PM, konstantin magnus said:

Great stuff, Nicolas. This is starting to look Giger-like already!
You don't necessarily need to create UVs in SOPs, though. To project textures on those VDB meshes it's arguably more efficient to do in a shader:


1) Transform position to world space.   2) Curve IDs shown as random colors.       3) U value from curves in HSV colors.
4) Direction to nearest curve position.   5) Tangents from curves set to absolute.  6) Direction to curve oriented along tangents.
7) V coordinate enclosing each wire.     8) UV coordinates in red and green.            9) UV mapping an image texture.

10) Texture based displacement along curves or at least what happens when mandrills do the job ; )

The material snippet:

string geo = 'op:/obj/curves/OUT';
P = ptransform('space:current', 'space:world', P);

int prim = -1;
vector uvw = vector(0.0);
float dist = xyzdist(geo, P, prim, uvw);
vector pos = primuv(geo, 'P', prim, uvw);
float u = primuv(geo, 'u', prim, uvw);
vector tangent = primuv(geo, 'tangentu', prim, uvw);
matrix3 rot = dihedral(tangent, {0,1,0});
vector dir = normalize(P - pos);
vector dir_mod = dir * rot;
float v = fit( atan2(dir_mod.z, dir_mod.x), -M_PI, M_PI, 0.0, 1.0 );

P = set(u, v, 0.0);



This is super cool Thanks!!!

Share this post

Link to post
Share on other sites

Nice technique Konstantin! Thanks for sharing!

Edited by Drughi

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