Abhay

Members
  • Content Count

    9
  • Joined

  • Last visited

About Abhay

  • Rank
    Newbie
  • Birthday 08/14/1991

Profile Information

  • Gender
    Male
  • Location
    gurgaon

Contact Methods

  • Twitter
    as88425@gmail.com
  • Skype
    abhaysingh9455
  1. Hello eucly2, thanks a lot for supporting me . it's help me a lot .
  2. Hello , Actually i want if have select texture 1 color red/green/blue , texture 2 color red/green/blue, texture 3 color red/green blue from drop down list changes should be happen according to ddl . I'm sharing with u another babylon txt file (the file name is testing.txt) and three texture file which i want to change dynamically . in babylon txt file texture1.jpg included . So please have a look & help me out . Thanks in Advance . testing.txt
  3. hello All, I have tried your recent code but using that i haven't get exact result what i want . hope you understood what i want . So could you please share the code for changing texture as well as color dynamically . Thanks in advance .
  4. Hello , many many thanks to both of u for supporting . but i have a query if i have texture in .babylon file and i want to change that like colors so how can i define texture file name in my html page . Thanks in advance .
  5. Hello eucly2, I have tried your latest code but that shows no results in browser . I'm sharing my code & test1.babylon file . Please have a look & help me out . <!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head> <title>Using babylon.js - How to load a scene</title> <script src="babylon.js"></script> <style> html, body { width: 100%; height: 100%; padding: 0; margin: 0; overflow: hidden; } #renderCanvas { width: 100%; height: 100%; } </style></head><body> <select onchange='changeTexture(this.value);'> <option value='0'>texture1</option> <option value='1'>texture2</option> <option value='2'>texture3</option></select> <script> function changetexture(number){ // this if you have more material than 1 myMesh.material= scene.materials[number]; // or this if you have more texture than 1 and material = 1 // myMesh.material.diffuseTexture = scene.textures[number]; } </script> <canvas id="renderCanvas"></canvas> <script> if (BABYLON.Engine.isSupported()) { var canvas = document.getElementById("renderCanvas"); var engine = new BABYLON.Engine(canvas, true); BABYLON.SceneLoader.Load("", "test2.babylon", engine, function (newScene) { newScene.executeWhenReady(function () { newScene.activeCamera.attachControl(canvas); alert("Nb materials : " + newScene.materials.length); alert("Nb textures : " + newScene.textures.length); engine.runRenderLoop(function() { newScene.render(); }); }); }, function (progress) { });}</script> </body></html> i am sharing test1.babylon text file because when i am uploading my file it shows error, so please have a look on test1.txt file Thanks in advance test1.txt
  6. Hello eucly2, . I have tried your code the page shows alert msg like Nb materials : 4 and Nb textures : 0 Actually blender exported texture with object means object and texture in the same file like test1.babylon . So please let me suggest how to i change texture dynamically using select box . Thanks in Advance .
  7. Hello eucly2 I understand what r u saying but my problem is i have a blender exported file & texture is in that file . I have call that file like this <script> if (BABYLON.Engine.isSupported()) { var canvas = document.getElementById("renderCanvas"); var engine = new BABYLON.Engine(canvas, true); BABYLON.SceneLoader.Load("", "test1.babylon", engine, function (newScene) { newScene.executeWhenReady(function () { newScene.activeCamera.attachControl(canvas); engine.runRenderLoop(function() { newScene.render(); }); }); }, function (progress) { }); }</script> In the script tag i have mark bold that file . Hope you understand what i mean . Thanks in advance
  8. hello ! I have exported a scene from blender it's working fine in web . But i want to change its texture and color dynamically . e.g. Suppose i have a bag object i have exported it from blender its name is test.babylon it has a texture name base.jpg. But i have have 3 another textures . i have create a dropdownlist in my html page. So i want to if i have selected red/black/purple from dropdownlist bag texture should be change . Please do help me out . Thanks in advance .
  9. hello ! I have exported a scene from blender it's working fine in web . But i want to change its texture and color dynamically . e.g. Suppose i have a bag object i have exported it from blender its name is test.babylon it has a texture name base.jpg. But i have have 3 another textures . i have create a dropdownlist in my html page. So i want to if i have selected red/black/purple from dropdownlist bag texture should be change . Please do help me out . Thanks in advance .