I use a 3D model 3DDFA for face. I have an image 2D, and I want to apply it on the 3D face like a texture. How to do it in C++ ?
Thank you
Related
I used sprites in Three js to display 2d images, the problem that I faced with sprites that they rotate to face the camera.
I am trying to use it to fake a shadow for the 3d object. When I rotate the camera the 3d object tilt with the camera until it makes a 30-degree angle with the horizontal but it's shadow (2d sprite) still at 0 degrees.
How to disable the auto rotation of sprite, or is there another solution to preview 2d images in three js to look like a 3d object?
How to disable the auto rotation of sprite, or is there another solution to preview 2d images in three js to look like a 3d object?
It's not possible to disable the orientation towards the camera with a flag or configuration. You would have to modify the shader code of SpriteMaterial for this.
I suggest you use a mesh instead based on a PlaneBufferGeometry and a MeshBasicMaterial. Alternatively, you write a custom billboard shader with ShaderMaterial or RawShaderMaterial.
Can you please explain the difference between texture and sprite? When we zoom in a sprite, it appears blurry because it's basically an image. Is it the same for a texture?
I read this comment on the image below online:
The background layers are textures and not sprites.
Can someone explain?
Sprites and Textures are both images.
A Sprite is an image that can be used as a 2d object, which have coordinates (x, y) and which you can move, destroy or create during the game.
A Texture is also an image, but that will be used to change the appearence of an object. E.g. you can set a texture for the faces of a cube, a layer (like the background) or even a sprite. But as texture are not objects, you can't move them during the game.
Sprite is the image that is moving related to static images (for example background). Sprites are usually planes (rectangles) with texture on it. Sprites are used in 3D graphics for tricks such as Billboard or Impostor. In 2D games sprites are used instead of moving objects and also as backgrounds.
Texture is an raster image that is to be projected on polygonal object. It worth using textures each time when using polygons is expensive for given objects details (for example bullet dots)
The goal is to turn any transparent PNG into a 3D card with a slight thickness and the geometry of the image minus transparency. For example, I'd like to take an image like this one: http://findicons.com/files/icons/730/soft/128/user_male.png and turn it into a card object with a slight thickness. However, the card should not be rectangular - its edges should follow the shape of the transparency in the image.
Is there any simple procedural way to accomplish this on any given PNG?
Thanks.
Could someone please enlighten me as to how I add simple 2D text to a scene in three.js? I don't need fancy text geometry.
The purpose of the text is to dimension a 3D rotatable version of this: http://img225.imageshack.us/img225/9823/capturespm.png
You can generate the text with a 2D context, then convert it to a texture and finally display it in 3D space as a particle/billboard.
I have some troubles about ensure the quality texture when zooming in the 3d model with texturing the image two-dimensional image in opengl ES while have decided to ask for help!
I have loading the .obj format text file and texturing by 1024*1024 image. I can arbitrary rotation and scale the 3d model with texture.But when scale to certain degree,texture is shown that low quality.
How can i ensure the high quality texture?
What good method to solve this problem?
Any pointers would be appreciated.
Thanks!