Jump to content

How handle this mushroom shape procedurally ?


Tonhiox

Recommended Posts

Hey guys ! 

I've been struggling for a while now on this guy... That's why I'm hopping finding a hero among all of you ! 

I want to model produrally this mushroom shape. 
I try different approaches, but so far nothing successfull.
The thing Im struggling the most is to get those smaller leaves along those organics kinda veins... The overall veins structure and the small leaves are all connected.

 I join the hip file in the post :) 

So if any of you have some guidance feel free to share it :) 

58d52563b0c99bad48dd0e511da9f1b9.jpg

proceduralMushroom_odforce_v1.hip

Edited by Tonhiox
Link to comment
Share on other sites

Daaamn thank you so much guys !!!! 

I see the convert VDB being the solution here for most of the case.   I will probably get  sharper edges by playing with the curvature mask and more vdb resolution ! 

I come back to you once I will have proper animation and render ! 

You guys rock ! What an amazing community :wub:

Link to comment
Share on other sites

17 hours ago, konstantin magnus said:

Project a distorted grid on a displaced torus.

Hello, Konstantin!
Can you please explain the magic happening in the "skin" wrangle?
 

v@uvw = relbbox(0, v@P);
@uvw.y = fit01(@uvw.z, 0, 1);
v@P = primuv(1, 'P', 0, @uvw);


As I understand, in general, you are wrapping a grid around the torus with primuv, and with a fit01, you define where the wrap starts/ends.
But in detail... What is the @uvw attribute, why it's used in primuv function and what this function is doing? Why the fit modifies Y attribute relying on Z?

Link to comment
Share on other sites

Hello @kiryha,

first of all the torus is a NURBS surface, meaning it's treated as one single primitive which is also already unwrapped in UV space. This makes it an easy target for the primuv-function that is returning the position (or any other attribute) on a primitive at an primitive's intrinsic UV location.

Here is what primuv() does to a grid based on a mesh (left) as opposed to a NURBS surface (right):

primUV_poly_vs_nurbs.jpg.758636332e125cfc1c94cbb7e8f418f5.jpg

Now when you want to apply a geometry (mesh, points, curves) onto a primitive, it needs to have UV coordinates first. In this case the UVs are based on the grid points positions in relation to the bounding box: 

v@uvw = relbbox(0, v@P);

Because the grid lay on the XZ plane (for no reason in this case) I had to exchange the Z with Y coordinate:

@uvw.y = fit01(@uvw.z, 0.2, 0.5);

The Z coordinate should then be set to 0  for correctness:

@uvw.z = 0.0;

 

So in other words: if the grid was set to the XY plane right away, it's sufficient to transfer the position attribute from the NURBS torus like this:

vector UV_grid = relbbox(0, v@P);
v@P = primuv(1, 'P', 0, UV_grid);

 

primuv_example.hipnc

Edited by konstantin magnus
  • Like 2
Link to comment
Share on other sites

On 06/10/2020 at 1:11 AM, konstantin magnus said:

Here is my take on the schizophyllum commune:

  1. Project a distorted grid on a displaced torus.
  2. Iterate over remeshing and relaxing the grid.
  3. Scatter random points along the outer edges.
  4. Find their shortest paths across the mesh.
  5. Convert the curves into a signed distance field.
  6. Offset the SDF contour based on curve orientation.

mushroom_00.jpg.17f3f6aacbaad08f4a8bf424f53bbe93.jpg mushroom_01.jpg.0c26a1b4109e6e409f65134341d25a7a.jpg mushroom_02.jpg.685c90695f1919ad8014a0522efc0ba5.jpg
mushroom_04.jpg.b72939dde235013804ca914669dda87c.jpg mushroom_05.jpg.1bfae672f183e810c3fff7227566937a.jpg mushroom_06.jpg.b5d0dc834f8087a75a30b263ad666c8a.jpg


The gills can be flipped by negating the orientation along the path curves.

mushroom_10.thumb.jpg.49c8fd958fe79cae19635d562134ad46.jpgmushroom_11.thumb.jpg.a3f4369d62ddb6ac60f407c4606b2a46.jpg

mushroom.hipnc

Magnus shines again.  Adding some few iterations of differential mesh grow

Link to comment
Share on other sites

Master Magnus has spoken, hard to add something after :)

 

You might want to add inner veins details for SSS effect inside or whatever using the shortest path with origin from the center.

Magnus alrealdy did few iterations of remeshing and point relax with pscale , but you could eventually add few more difference mesh grow steps at the end on the "tips" parts

 

 

________________________________________________________________

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

 http://fr.linkedin.com/in/vincentthomas

Link to comment
Share on other sites

On 06/10/2020 at 8:03 PM, konstantin magnus said:

Hello @kiryha,

first of all the torus is a NURBS surface, meaning it's treated as one single primitive which is also already unwrapped in UV space. This makes it an easy target for the primuv-function that is returning the position (or any other attribute) on a primitive at an primitive's intrinsic UV location.

Here is what primuv() does to a grid based on a mesh (left) as opposed to a NURBS surface (right):

primUV_poly_vs_nurbs.jpg.758636332e125cfc1c94cbb7e8f418f5.jpg

Now when you want to apply a geometry (mesh, points, curves) onto a primitive, it needs to have UV coordinates first. In this case the UVs are based on the grid points positions in relation to the bounding box: 


v@uvw = relbbox(0, v@P);

Because the grid lay on the XZ plane (for no reason in this case) I had to exchange the Z with Y coordinate:


@uvw.y = fit01(@uvw.z, 0.2, 0.5);

The Z coordinate should then be set to 0  for correctness:


@uvw.z = 0.0;

 

So in other words: if the grid was set to the XY plane right away, it's sufficient to transfer the position attribute from the NURBS torus like this:


vector UV_grid = relbbox(0, v@P);
v@P = primuv(1, 'P', 0, UV_grid);

 

primuv_example.hipnc

 

If you don't want to deal with VEX and have iteractive feedback, you could do that with Creep considering you have a NURB surface. Just need to change the plane orientation

Link to comment
Share on other sites

2 hours ago, vinyvince said:

Master Magnus has spoken, hard to add something after :)

 

You might want to add inner veins details for SSS effect inside or whatever using the shortest path with origin from the center.

Magnus alrealdy did few iterations of remeshing and point relax with pscale , but you could eventually add few more difference mesh grow steps at the end on the "tips" parts

 

 

________________________________________________________________

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

 http://fr.linkedin.com/in/vincentthomas

Maybe forget my comments, just open the Magnus file and actually he did exactely what i was suggesting, but in different order Lol  :)

I was more thinking of starting with a skin surface after extracting the curves, cut in sections or whatever, running diff mesh grow on the tip, running shortest path there to get the then veins and sculpting the noise of the surface using vdb avoid VDB from particles which i m not a big fan of instead if i have to ...

 

Edited by vinyvince
Link to comment
Share on other sites

@vinyvince Abs Right.
When someone like you Have so much experience (just wish for you That you Make your own Studio why NOt) what you waiting  ..Take the Credit  And Have FUn ,give the Job  the some Talented Guys and Have Fun ..just mine  wishful thinking For YOU.
:wub:.who knows ....


 

exp.jpg

FLOWER_MUSHROOM_AND_FUN.hiplc

  • Like 1
Link to comment
Share on other sites

  • 4 months later...
  • 2 months later...

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