# How to simulate "Projection Camera Mapping" of video on to a Babylon Mesh?

## Recommended Posts

How would I project a standard 16:9 video onto multiple  Babylon mesh (live code) (sample meshs in pink bg, teal lines, gray sphere image below); as if, the camera was a projector and the mesh was an object in a space ?

The results I'm looking for is that the video would serve more as a gradient of colors to the mesh or on the otherhand a distortion to the video itself.

Hope this makes sense, I've attached an image from cinema 4d on the concept I'm taking about.

If you know how to answer this question: http://stackoverflow.com/questions/36852783/how-to-simulate-projection-camera-mapping-of-video-on-to-a-multiple-babylonjs EXTRA POINTS!

##### Share on other sites

Hey

Something like this?

##### Share on other sites

@Deltakosh Thats exactly what I was looking for with a few exceptions, Sample code: http://www.babylonjs-playground.com/#203BJM#5

1. Is it possible to apply it to the BABYLON.Mesh.CreateLines()? if not, any ideas on how you would approach creating a crazy mesh like I have below with a different type of geometry?

``````    for (var u = 0; u <= 2*Math.PI; u += incrementer){
for( var v = 0; v <= 2*Math.PI; v += incrementer){

points.push(new BABYLON.Vector3(
Math.sin(u)*10*(Math.cos(v)),
Math.sin(v)+Math.cos(u)*10*(Math.cos(v)),
Math.cos(v)+10*(Math.sin(v))*Math.sin(u))
)
}
}

var shape = BABYLON.Mesh.CreateLines('Shape', points, scene, true);
``````

beautiful

## 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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.