extrude mesh

For general discussion about Conway's Game of Life.
Post Reply
xedef
Posts: 4
Joined: August 4th, 2012, 10:19 am

extrude mesh

Post by xedef »

I am sorry for my probably stupid question, but I wish i could do something "Ready" application and I need your help. I want to import a mesh object into the app and apply a reaction pattern (which I managed to do so far). Then I would love to use those coloured reaction pattern to modify the mesh, let's say to extrude or create a relief on it so that those reaction pattern remain impressed on the object once I have exported to obj. Is this possible to do do it and how?
Thank you very much

xedef
User avatar
Tim Hutton
Posts: 64
Joined: May 20th, 2010, 7:30 am
Contact:

Re: extrude mesh

Post by Tim Hutton »

Hi xedef,

It would be great to see some images of what you've been doing. Glad you've been able to run RD on your own meshes.

For morphogenesis we certainly want in the future to have meshes changing according to the values at each location but this is not currently implemented. The easiest approach might be to write a bit of C++ code that we can call regularly to grow and subdivide the mesh. Perhaps the simplest is to use the surface normal but for a more biologically-plausible model it might be better to use 3d cells and drive the growth via cell division somehow. See the scientific literature for computer models of this.

If you just want the mesh embossed once, at the end, then Paraview might have a filter to load one of our vtu files and warp the points along the surface normal. Let me know if you get this working.

If you just want the surface colored by the values then Paraview might have a method for converting surface values to a texture image, or we could write that. Then at least you could get the mesh into 3d packages like Blender together with its coloring.

Tim
xedef
Posts: 4
Joined: August 4th, 2012, 10:19 am

Re: extrude mesh

Post by xedef »

Hi Tim,
thank you very much for your useful and detailed answer! What you described (in better terms) is just what I am after, namely to be able to open a reaction-diffusion colored mesh (like the bunny in the Ready example) in another 3D software where I can make my own editing.
I will definitely go try Paraview and tinker with it, and if something nice/interesting comes out I can post the results here.
Thank you again

Ciao
User avatar
Tim Hutton
Posts: 64
Joined: May 20th, 2010, 7:30 am
Contact:

Re: extrude mesh

Post by Tim Hutton »

Out of curiosity I had a go at extruding the surface based on the RD values:

Image

To achieve this I first used MeshLab to Poisson-reconstruct the surface (the Stanford Bunny is non-manifold in places) and subdivide it to make a high-res version. Then after importing it into Ready and running Gray-Scott, the resulting vtu file is loaded into Paraview. By only importing chemical 'b' and then applying the pipeline shown, we get a fun result. (But bear in mind that Greg Turk was doing this back in 1991!)

Some Paraview/VTK knowledge that is useful:
  • vtu files store unstructured grids but we need polygonal data for some Paraview filters - use Extract Surface for this
  • Ready works with cell data but some Paraview filters need point data - use Cell Data to Point Data for this
  • The Warp By Scalar filter uses the surface normals by default but only if they are present - use Generate Surface Normals to compute them.
I haven't worked out how to export the color information as e.g. a texture image. Let me know if you solve that one.

Tim
xedef
Posts: 4
Joined: August 4th, 2012, 10:19 am

Re: extrude mesh

Post by xedef »

That was killer tips indeed! I managed to modify my mesh following your instructions ( I had to figure out a little how ParaView works). Now I even succeed in exporting prom ParaView to Meshlab via .x3d file format. I can see the the "b" colour parameter together with the modified mesh, but that doesn't appair to be a texture and I am unable to export it to other visualization 3d softwares to render it. I should check with Meshlab manual/forums to solve this... anyway we are getting very close! Thanks again for your precious suggestion.

xedef
User avatar
Tim Hutton
Posts: 64
Joined: May 20th, 2010, 7:30 am
Contact:

Re: extrude mesh

Post by Tim Hutton »

In Blender:
Image

Using hints from you and from this page, here's a way to get mesh colors from Ready into Blender:
  • Load the .vtu into ParaView, only importing one chemical.
  • Apply the Cell Data to Point Data filter.
  • File > Export > .x3d
  • Open in MeshLab.
  • File > Export Mesh As > .ply
  • Open in Blender
  • Under the Material properties, enable Vertex Color Paint.
  • Render. (The colors only appear when rendering, not when viewing the 3d scene.)
xedef
Posts: 4
Joined: August 4th, 2012, 10:19 am

Re: extrude mesh

Post by xedef »

Here we go, that's great! The missing piece of the puzzle.
Thank you again and I look forward to exciting new updates to the Ready app which is a wonderful application.

xedef
gregf
Posts: 1
Joined: July 20th, 2015, 11:15 pm

Re: extrude mesh

Post by gregf »

I had some trouble getting this working but eventually figured it out with an older version of the software:

-Download Paraview version 3.14.1
-In Paraview, open the .vtu file
-In the properties tab, uncheck one of the variables, and click Apply
-In the Filters->Alphabetical menu select 'Cell data to point data' and click Apply
-Click on the Display tab and select Color by the variable you imported above
-Select File -> Export to .x3d

The .x3d file should now be openable in MeshLab.

Thanks for making this great tool. :)
Post Reply