Justin K Posted March 20, 2019 Share Posted March 20, 2019 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 Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted March 20, 2019 Share Posted March 20, 2019 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); 1 Quote Link to comment Share on other sites More sharing options...
symek Posted March 20, 2019 Share Posted March 20, 2019 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 btw: 3 Quote Link to comment Share on other sites More sharing options...
Justin K Posted March 21, 2019 Author Share Posted March 21, 2019 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. Quote Link to comment Share on other sites More sharing options...
Justin K Posted March 21, 2019 Author Share Posted March 21, 2019 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 Quote Link to comment Share on other sites More sharing options...
Justin K Posted March 27, 2019 Author Share Posted March 27, 2019 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.