Raghavender Mylagary

  • Content count

  • Joined

  • Last visited

About Raghavender Mylagary

  • Rank
    Advanced Member
  • Birthday 04/28/1994

Contact Methods

  • Twitter
  • Skype

Profile Information

  • Gender
  • Location
    Hattiesburg, MS

Recent Profile Visitors

844 profile views
  1. importScene of undefined from undefined version

    Thanks brianzinn for your time. The problem is with the .babylon file. So, the issue is resolved after creating a new file.
  2. importScene of undefined from undefined version

    Thank you brainzinn for replying. I have checked the network tab and there is no 404 error. The babylon file and my react component both are in same folder. So, I think it is not the problem with getting the model file.
  3. Hi, I am trying to load .babylon file which is exported from blender using typescript and reactjs. This is the error I got, importScene of undefined from undefined version: undefined, exporter version: undefinedimportScene has failed JSON parse My babylon file is correct, I have tested it in sandbox and works correctly. Here is the Code: import * as React from 'react'; import * as BABYLON from 'babylonjs'; import BabylonScene from './BabylonScene'; import 'babylonjs-loaders'; export default class PageWithScene extends React.Component<{}, {}> { onSceneMount = (e: SceneEventArgs) => { const { canvas, scene, engine } = e; BABYLON.SceneLoader.Load('', 'design1.babylon', engine, function(scene) { scene.executeWhenReady(function () { var camera = new BABYLON.ArcRotateCamera('camera1', 0, 0, 0, new BABYLON.Vector3(12, 0, 0), scene); scene.activeCamera = camera; camera.setTarget(new BABYLON.Vector3(0, 0, 0)); camera.attachControl(canvas, true); // scene.clearColor = new BABYLON.Color3(0, 0, 0); engine.runRenderLoop(() => { if (scene) { scene.render(); } }); }); }); } render() { return ( <div> <BabylonScene onSceneMount={this.onSceneMount} /> </div> ); } Updated tsconfig.json as well, } Please let me know if I am missing anything. Thanks in advance.
  4. Blender to babylon export error

    @JCPalmer I generated .babylon file using the exporter given by you. Now while I am loading the .babylon file into the sandbox I am getting the below error. untitled.babylon
  5. Blender to babylon export error

    Hi @Deltakosh@JCPalmer @Wingnut @RaananW@JohnK I am trying to export a model from blender to babylon and I am getting the below error while exporting. ========= An error was encountered ========= File "C:\Users\Raghav\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\babylon-js\json_exporter.py", line 152, in execute self.to_scene_file() File "C:\Users\Raghav\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\babylon-js\json_exporter.py", line 212, in to_scene_file mesh.to_scene_file(file_handler) File "C:\Users\Raghav\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\babylon-js\mesh.py", line 634, in to_scene_file if self.hasSkeleton: ERROR: 'Mesh' object has no attribute 'hasSkeleton' ========= end of processing ========= I attached the log file that is generated while exporting. Thanks, Raghavender Mylagary untitled.log
  6. Edge detection in babylon

    Hi @Deltakosh @Wingnut @Nesh108 Is there any way to mark the edges of the following image, when it is applied as a dynamic texture to the plane.
  7. Selecting 3d coordinates in a scene

    Hi, Is there any way to read 3d coordinates (x,y,z) in a scene? I have tried using the following code: //When pointer down event is raised scene.onPointerDown = function (evt, pickResult) { // if the click hits the ground object, we change the impact position if (pickResult.hit) { x = pickResult.pickedPoint.x; y = pickResult.pickedPoint.y; z = pickResult.pickedPoint.z; } }; But I could not read the value of z.
  8. MRI data in babylon

    Hi @Deltakosh @Wingnut, Is it possible to load MRI data as a 3D model using BJS. Suppose if I have MRI data of Brain as a sequence of images, can I place all those sequences together and create a model. Also, i want to select individual slices separately after the model is created. Thanks, -Raghavender Mylagary
  9. Live streaming video as a texture

    @Deltakosh If I load the URL http://clips.vorwaerts-gmbh.de/big_buck_bunny.webm in a new browser the stream is working. Is there any way to overcome permission denied error?
  10. Live streaming video as a texture

    @Deltakosh I tried to set correct url for VideoTexture but its not working http://www.babylonjs-playground.com/#1P9EED#0
  11. Live streaming video as a texture

    @Deltakosh For live streaming of YouTube videos, if we use url of the video as source for VideoTexture it's not working. YouTube videos works in iFrame. Is there a way we can do that?
  12. Live streaming video as a texture

    Hi @Deltakosh @Wingnut @JCPalmer, Is there any way we can show youtube or any live stream video as a texture? http://www.babylonjs-playground.com/#140LZL#9 Is it possible to draw iframe on to the canvas element of the dynamic texture or is it possible to use the video element of video texture to render the livestream? Thanks -Raghavender Mylagary
  13. Drawing Video onto the DynamicTexture Canvas

    @Deltakosh I want to display the video with HTML5 Video controls. I tried with video texture but isn't working so I tried to draw video element with controls onto the dynamic texture canvas. It is also not working, is there any way we can display the video with controls??
  14. Drawing Video onto the DynamicTexture Canvas

    <!DOCTYPE html> <html> <head> <title></title> <script src="scripts/babylon.js"></script> <script src="http://www.babylonjs.com/cannon.js"></script> <script src="http://www.babylonjs.com/oimo.js"></script> <style> html, body { overflow: hidden; width: 100%; height: 100%; margin: 0; padding: 0; } #renderCanvas { width: 100%; height: 100%; touch-action: none; } </style> </head> <body> <canvas id="renderCanvas"></canvas> <canvas id="c"></canvas> <video id="v" controls> <source src=video.mp4 type=video/mp4> </video> <script type="text/javascript"> window.addEventListener('DOMContentLoaded', function () { var canvas = document.getElementById("renderCanvas"); var engine = new BABYLON.Engine(canvas, true); var scene = new BABYLON.Scene(engine); var v = document.getElementById('v'); // Setup environment var light = new BABYLON.PointLight("Omni", new BABYLON.Vector3(10, 10, 50), scene); var light2 = new BABYLON.PointLight("Omni", new BABYLON.Vector3(10, 10, -20), scene); var camera = new BABYLON.ArcRotateCamera("Camera", -1, 0.8, 100, new BABYLON.Vector3.Zero(), scene); camera.attachControl(canvas); // Video plane var videoPlane = BABYLON.Mesh.CreatePlane("Screen", 50, scene); videoPlane.position.y = 10; videoPlane.position.z = 30; // Video material var videoMat = new BABYLON.StandardMaterial("textVid", scene); videoMat.diffuseTexture = new BABYLON.DynamicTexture("dynamic texture", 512, scene, true); videoMat.backFaceCulling = false; var context = videoMat.diffuseTexture.getContext(); //Applying materials videoPlane.material = videoMat; context.drawImage(v, 0, 0); videoMat.diffuseTexture.update(); engine.runRenderLoop(function () { scene.render(); }); window.addEventListener('resize', function () { engine.resize(); }); }); </script> </body> </html> @Deltakosh I tried to implement it but it's not working. Can you please look into the above code? playground link http://www.babylonjs-playground.com/#1JQNK1#1
  15. Hi, Is it possible to draw video onto the canvas element of the dynamic texture? Thanks - Raghavender Mylagary