Jump to content

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.


Screen Shot 2016-04-25 at 4.10.27 PM.png


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!

Link to comment
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(
    var shape = BABYLON.Mesh.CreateLines('Shape', points, scene, true);


Link to comment
Share on other sites

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.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...