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
  • Like 3
  • 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 5

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

  • Like 2

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

This is a fun one to play around with. Redshift doesn't support code snippets, like Mantra, but I was able to leverage texture maps for displacement.


  • Like 2

Share this post

Link to post
Share on other sites
Posted (edited)

This one is really really cool, probably you will love it @konstantin magnus



Vincent Thomas   (VFX and Art since 1998)
Senior Env and Lighting  artist & Houdini generalist & Creative Concepts



Edited by vinyvince
  • Like 1

Share this post

Link to post
Share on other sites
On 02/10/2021 at 11:34 AM, konstantin magnus said:

Transferring curl noise curves into volumes along with displacements based on principal curvature is another way to shape organic sculptures.



We could also advect and grow few frames . I totally forgot the existence of the softpeak , thanks to refresh my memory :)


  • Like 2

Share this post

Link to post
Share on other sites

For UV unwrapping a mesh which based on underlying curves1, you can also use this code inside a Point or Vertex Wrangle:

// INPUT 1: CURVES with 'tangentu'-attribute 

int prim_crv;
vector uvw_crv;
float dist = xyzdist(1, v@P, prim_crv, uvw_crv);

vector tangent = primuv(1, 'tangentu', prim_crv, uvw_crv);
matrix3 rot = dihedral(tangent, {0,1,0});
vector pos = primuv(1, 'P', prim_crv, uvw_crv);
vector dir = normalize(pos - v@P) * rot;
float angle = fit11(atan(dir.z, dir.x) / M_PI, 0.0, 1.0);
float perim = primintrinsic(1, 'measuredperimeter', prim_crv);

float u = (angle * 2.0 * M_PI * dist);
float v = uvw_crv[0] * perim;
v@uv = set(u, v, 0.0);

1 https://forums.odforce.net/topic/43213-biological-modelling-methods/?do=findComment&comment=204915

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