14 hours ago, YixunLiu said:
I use a real camera to take a picture of the sphere and then want to render this slice combined with the picture to give people a feeling that this slice is inside t
If the real picture is a texture on top of a 3D model then you would manipulate the 3D model and textures.
If the real picture is an augmented reality image then it will be much harder. You'd need to turn the object into a model through whatever means you have available, such as back projection or object registration or an object recognition library someone has already developed. If that is the situation then I strongly recommend using an existing tool. This will create a 3D model and texture that you would manipulate the same way.
On 7/4/2017 at 1:32 PM, YixunLiu said:
The way I can figure out is to add a hole geometry on the sphere to give us a feeling that we look the slice through a hole, so the slice looks like inside the sphere.
Once you have the model and texture to manipulate, manipulating the graphics will require some knowledge of graphics and model processing, or some tools that can do it for you.
For something simple you could make a slice of the model's geometry, or perhaps use a clipping plane to cut across it, or perhaps using a shader to modify the geometry or change to a transparent texture for the cutout. The details will depend on the effect you are trying to achieve and your level of skill with the tools.
For more advanced shapes you might use tools for constructive geometry to subtract sections, assuming tools are available to you.
14 hours ago, YixunLiu said:
This slice is an image cutting through the sphere, like ultrasound image.
If you have volumetric data for the sphere and you want to show a proper cutout, there is a bunch of research on how to do that efficiently. The IEEE VIS conference has twenty years of research papers that can help as a starting point.