Jump to content

3d Volume from Image?


Recommended Posts

Hello, 

Is it possible to generate a 3d volume with depth from an incoming image?  Request is to convert a figure from an image into a cloud like structure, and Im trying to figure out an intuitive way to do this.  

Currently Ive just manged to take an image mapped to the uv coordinates of a piece, scatter points based on the color, and then create a volume from that, but that is all i have so for.  

My thought was to perhaps deform the geo based on the luminance values of the image so as to give it more depth, but overall Im not really sure how to approach this.

Ive attached a pic and the current scene file. 

Any tips would be appreciated.  Thank you!  

 

image2cloud_testing.hiplc

Screen Shot 2019-03-20 at 4.31.48 PM.png

Link to comment
Share on other sites

Creating geometry beforehand is not a bad idea, because it lets you tweak otherwise hard to control process.

Do you have a depth for you image? (from a render or stereo camera, or the challange is to create an illusion of such?). 

In case you want to go right from pixels to voxels and you have some depth channel, the example uses Houdini's render  with P-plane, which holds depth in (RG)B channel. Anyhow it's just a gray image after all...

volume_from_depth.hipnc

ezgif.com-crop.gif

btw: 

 

  • Like 3
Link to comment
Share on other sites

14 hours ago, konstantin magnus said:

Hi Justin, in order to fill a voxel field with image pixels put this code in a volumewrangle after a volume node:


vector bbox = relbbox(0, v@P);
vector map = colormap(chs('image'), bbox.x, bbox.y);
f@density = luminance(map);

 

Thank you Konstantin,! 

Implementing this code this morning.  

Link to comment
Share on other sites

 

Thank you as well Szymon,  

Taking a look at your file as well.  Unfortunately we do not have depth from the image.  As you questioned, that is the challenge here.  And I agree with you completely, having some sort of geo should help.  

Im gonna see what happens applying Konstantin's code to a premade 3d cloud volume and see what i get. 

What we might try--is to generate some real proxy geo of the image, project the image onto the geo as a texture, convert that into a volume, and drive both the color and the density of the volume with the color from the point or vertex level.   Maybe?  Lol

Thank you both.  Ill post here again with a file if I have any success.

 

Cheers,

JK

Link to comment
Share on other sites

Just as an update on this--we have killed the project.  The image we were given did not relay itself well to the concept itself-- it was an image of a man comped against a sky to begin with.  If we were to do this in the future, we would generate some 3d geometry to help the cause.  Szymon your heads up on the depth matte from image software is a really great thing to keep in mind though.  Thanks for the tips both of you.  

Best, 

JK

Link to comment
Share on other sites

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