how to transform svg into 3D in three.js - svg

I am building a floor map in svg, it is a 2D map, I am wondering how can I transform this map into 3d space using the three.js.
I am wondering is there any API in three.js help me to transform / render these svg into 3D

Related

Automatically Mapping Image Texture to UV Maps For Custom Mesh?

I am trying to apply texture to 3D clothing model using openCV. I have the UV maps of the clothing model and an image of the texture I want to apply which I prepared using grabcut(). How do I deform the texture image to match my UV mesh using OpenCV or any other automated method. I am providing the input Texture Image and also the UV mesh of the clothing. I am new to 3D modeling and OpenCV and I am facing issues with this please help me out.
Input Texture Image
UV mapped mesh of 3D model
Similar query at this link here

Warping though SVG

Is it possible to apply a warp transformation on an image in a SVG ?
The goal if to "bend" an image, as if it was stuck on a cylinder, therefore going from this :
To this:
No. Not easily.
SVG only supports affine transformations.
If your SVG was pure vectors, you could achieve the affect by manipulating the path points using your own non-affine transformation code. But that wouldn't work for bitmap images.
However you can warp bitmaps with a Canvas element. Or perhaps with WebGL.

UV Projection of 3D shape onto 2D images

Given a 2D image of a human face and the corresponding 3D shape, how do I project the shape onto the images to extract texture patches from them to form a partial UV map?

3d graphics from scratch

What the minimum configuration for the program I need to build 3D Graphics from scratch, for example I have only SFML for working with 2d graphics and I need to implement the Camera object that can move & rotate in a space
Where to start and how to implement vector3d -> vector2d conversion functions and other neccessary things
All I have for now is:
angles Phi, Xi, epsilon 1-3 and some object that I can draw on the screen with the following formula
x/y = center.x/y + scale.x/y * dot(point[i], epsilon1/epsilon2)
But this way Im just transforming "world" axis, not the Object points
First you need to implement transform matrix and vector math:
Mathematically compute a simple graphics pipeline
Understanding 4x4 homogenous transform matrices
The rest depends on kind of rendering you want to achieve:
boundary polygonal mesh rendering
This kind of rendering is the native for nowadays gfx cards. You need to implement buffers for:
depth (for filled polygons without z-sorting)
screen (to avoid flickering and also serves as Canvas)
shadow,stencil,aux (for advanced rendering techniques)
they have usually the same resolution as target rendering area. On top of this you need to implement supported primitives rendering at least point,line,triangle. see:
Algorithm to fill triangle
on top of all this you can add textures,shaders and whatever else you want to ...
(back)ray tracing
this kind of rendering is very different and current gfx HW is not build for it. This involves implementing ray/primitives intersections computation, Snell's law and analytical representation of meshes. This way you can also do multi-spectral rendering and more physically accurate effects/processes see:
How can I render an 'atmosphere' over a rendering of the Earth in Three.js? hybrid approach #1+#2
Algorithm for 2D Raytracer
How to implement 2D raycasting light effect in GLSL
Multi-Band Image raster to RGB
The difference between 2D and 3D ray tracer is almost none the only difference is how to compute perpendicular vector ...
There are also different rendering methods like Volume rendering, hybrid methods and others but their implementation is usually task oriented and generic description would most likely just mislead ... Here some 3D ray tracers of mine:
back raytrace through 3D mesh
back raytrace through 3D volume

How can 2D text be reflected onto 3D mesh surface?

How can a 2D text be reflected onto 3D mesh surface in C# ?
Thanks in advance.
Cemo
Render the text to a texture and use the texture on the mesh.

Resources