I have already a 3D model for a planet and 4 pictures of front (0 degree), left (270), right (90) and back (180) side of the planet. Is there any known way to apply these 4 photos for texture of the 3D model?
I thought about combining these pictures into one like panoramic view and then apply it to the model. But that might be overkill. Maybe there is a way to apply 2D texture to the 2D view of 3D model like WYSWYG. Any hint would be appreciated.
Your best bet would be to combine the images into a single rectangular projection and then map that to the sphere using a spherical mapping.
Assuming your images are circular the first step is to create square images from those. A Mercator projection will probably work best.
Related
I would like to place a hairstyle after facial landmark detection. I'm able to render 2D images properly. I would like to render 3D model. I thought of using SceneKit to render 3D model. I would like to know how Instagram, snapchat and other face filter apps are rendering 3D models. I observe SceneKit coordinate system is different from UIKit coordinate system. I have googled but couldn't find the conversion of coordinate system. Could anyone help. Thanks.
Look for worldUp and simdWorldUp instance properties to understand how ARKit constructs a scene coordinate system based on real-world device motion (also, you can inspect ARConfiguration.WorldAlignment enum).
Please, look at this SO post: Understand coordinate spaces in ARKit for complete info.
And remember, ARAnchor is your best friend when placing 3D object. Click here
for further details.
i'm trying to create a 3D animation using WPF. To modelize a form i see that we can use PerspectiveCamera or matrixCamera. What's the difference between the both?
Perspective camera makes objects farther away look smaller, like what we see in real life or through a camera zoom lens. You can achieve the same thing using a matrix camera, but you can also do a lot more. The perspective camera and orthogonal camera are both special cases of the more general matrix camera. With a matrix camera, you could create a perspective in one dimension different from the other, like a panorama view. It requires more work than the other camera types to do the same thing, but has more possibilities.
I have a Viewport3D object containing a scene of hierarchical Model3D objects (grouped in Model3DGroups).
I need to "attach" 2D objects to 3D elements in the scene.
I read some articles on 3D projection but I couldn't fully understand how to apply my WPF scene data to those solutions.
What is the proper way to do that? I also tried Petzold.Media3D library but I didn't understand how to use it...
Thanks
I think you are looking for the Viewport2DVisual3D class. It allows you to render any Visual2D into the 3D space.
Searching the web for more info on this class will give you examples and videos explaining how it works.
Anyway, if you are doing any WPF 3D you also need to know about the Helix Toolkit - an awesome (free) WPF 3D toolkit.
It has two classes added recently that might also be relevant to what you are doing:
BillboardVisual3D (quad that always faces camera) and
TextBillboardVisual3D (text that always faces camera).
There are useful if you want to make some 2D image that must always face towards the 3D camera.
Is it possible to convert 3D object from Viewport3D and show it on Canvas, but conversion MUST NOT be depended from a camera position and its view point.
By another words using WPF i would like to make 4 views like in 3Ds Max, such as: Perspective (for 3D objects) and Front, Top, Left views (for 2D ).
Perspective view is a Viewport3D, but how show all 3D objects from the Viewport to the other views - Top, Front and Left ?
Mathematically speaking, no, it's not possible.
However, you should be able to simulate that by specifying a Camera Position that is top, front, and left. Can't you calculate approximately where that is based on the bounds of the 3D object?
http://en.wikipedia.org/wiki/Homogeneous_coordinates#Use_in_computer_graphics
Is there a lockbits equivalent of 2d in 3d in Windows Presentation Foundation to get direct pixel access ?
I understand you can paint a triangle at a time: 3d for the threst of us. Wouldn't it be easier to paint in cubes instead of triangles ? (I need to paint a stack of images such as an mri sequence).
The WriteableBitmap class allows you to access the pixels, I'm a bit unsure what you want with regards to 3d but you should be able to use a WriteableBitmap as the texture for each item and position them in 3D as required. For creating a stack of images 3D Panel and FluidKit's ElementFlow might be of interest to you.
Triangles are used because 3 points always make a flat surface this makes shading simpler and predictable plus you can make any shape if you use enough triangles.
If by painting in cubes you mean tiny cubes similar to how you use pixels in 2D these are known as Voxels they have their use-cases but most hardware and software are designed with polygons in mind.