Jump to content

Search the Community

Showing results for tags 'multimaterial'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 9 results

  1. I tried to import the obj file, and obj contained a number of posts, but in babylonjs, it seemed that each child's map was replaced with the last one. I looked at the console, and the network window shows these stickers loaded. Here's the demo:http://www.babylonjs-playground.com/#E5KRAX The correct effect should be: blender: threejs: babylonjs:(The wrong)
  2. Hello, I'm having an issue when trying to import a blender model (i.e. .babylon). I have created a simple bottle in blender with multimaterials (3 colors) and export it to .babylon. Here is the snippet code: var bottleMeshTask = assetsManager.addMeshTask("BottleTask", "Bottle", "assets/Bottle/", "bottle.babylon"); bottleMeshTask.onSuccess = function (task) { console.log(task); bottle = BABYLON.Mesh.MergeMeshes(task.loadedMeshes, true, true, null); bottle.position.z = -150; bottle.position.y = 0; bottle.position.x = 10; bottle.rotation.z = Math.PI / 2.0; bottle.scaling = new BABYLON.Vector3(0.3, 0.3, 0.3); console.log(bottle); }; bottleMeshTask.onError = function (task, message, ex) { console.log(message, ex); } assetsManager.load(); The problem is that when I insert the asset using the addMeshTask(...) it only shows the top first material. Any ideas? bottle.babylon bottle.blend
  3. Hello. My Kayak model has 4 sub materials on it. I have a button called "KayakLime". I'd like this button to change sub material #2 from Peach.png to Lime.png when clicked. Example #1 below works, but it changes the 4 kayak sub materials all to Lime.png. var myKayak2; BABYLON.SceneLoader.ImportMesh("", "models/", "Kayak.gltf", scene, function (newMeshes) { myKayak2 = newMeshes[0]; }); var LimeTexture = new BABYLON.StandardMaterial("Lime", scene); LimeTexture.diffuseTexture = new BABYLON.Texture("models/Lime.png", scene); LimeTexture.diffuseTexture.hasAlpha = false; LimeTexture.backFaceCulling = false; document.getElementById("KayakLime").addEventListener("click",function () { myKayak2.material = LimeTexture; }); Example #2: I thought this click code below would change only sub material #2 to Lime.png. However it turns the kayak invisible. Do I need to add more properties in the LimeTexture material? Or is it something else I'm missing? document.getElementById("KayakLime").addEventListener("click",function () { myKayak2.material.subMaterials[2] = LimeTexture; });
  4. I have been playing with the worldmonger demo, and want to uses an emissive texture to overlay a grid upon the ground. I can do this with simple ground materials, but not with the more complex multi material, is it possible to add an emmessive texture to a multi material such as the one used in Worldmonger?
  5. Hi All I have been exploring multimaterial texturing today and its great. However... I have encountered an issue that I can see no obvious solution to. What I am wanting to do is have "smooth" blended transitions between each of the multi-textures that are applied to the shape. Provided below is the 3D scene I have created which has the multimaterial textures applied: http://www.babylonjs-playground.com/#RF9W9#479 As you can see there are two textures that are being alternated across the face of the 3D model - each transition is a "hard" transition whereby there is no blending. Question: What I am wanting is for each texture transition to be blended - is there an easy way to do that? One solution "hack" is to create a 3rd texture that is a blended rendition of the two textures, then I could insert this blended texture between each of the transitions. Hopefully there is a simple solution that prevents me from having to go down this route! Thanks in advance...
  6. I have the latest Blender exporter (4.6.1) and I am trying to export a model that has some faces textured via UV Unwrap and other faces are just a plain old color. When I export the model it only exports a single material for the textured faces and applies that texture to the non-unwrapped faces as well. The material with just a color does not get exported. I was considering getting the face indexes from Blender and trying to sub-mesh this thing, but the indexes are not nice ranges and Babylon doesn't seem to have a function that would take an array of faces to submesh. Any ideas? I think this worked in a previous version (its been awhile since I've used Babylon last).
  7. I have problem with physics and mesh impostor with sphere. I create some componets in blender. And add each component texture. I create pathMesh from components. (pathMesh have multi materials and textures because each component has its own material and texture) If I load babylon with sandbox it load OK (but sandbox doesn't have pathMesh.bakeCurrentTransformIntoVertices(); . If I have pathMesh.bakeCurrentTransformIntoVertices(); in loop then pathMesh is loaded without textures and physics works OK. If I remove pathMesh.bakeCurrentTransformIntoVertices(); then pathMesh is loaded correctly with textures, but physics doesn't work as it should. var pathMesh; meshTask.onSuccess = function (task) { for (var i=0; i<task.loadedMeshes.length; i++ ){ var newMesheI = task.loadedMeshes[i]; if ( newMesheI.id == "Path" ) { pathMesh = newMesheI; pathMesh.checkCollisions = true; pathMesh.bakeCurrentTransformIntoVertices(); // this line works ok with physics but pathMesh doesn load correcly with textures pathMesh.pBody= perplexus.setPhysicsState(BABYLON.PhysicsEngine.MeshImpostor , { mass: 0, friction: 0.4, restitution: 0 }); } ... I need pathMesh.bakeCurrentTransformIntoVertices(); and correcly inported pathMesh with its textures? Can anybody help me solve this problem? Any advice? What should I do? Am I missing anything? Greetings
  8. Instance of mulitmaterial mesh does not render properly on some hardware see http://www.babylonjs-playground.com/#1UFKIN The MultiMaterial part starts at line 81 This renders fine on my PC. My PC has a dedicated graphics card This does not render well on my laptop. My laptop does not have a dedicated graphics card On my laptop it appears as in the attached screenshot.
  9. Hello, I have started using Babylon.js yesterday and i was playing around a bit, i wanted to make a cube with different textures for each face (well, to be precise it will have a different texture for top and bottom, then the same texture for all the sides) but when i do that with some code i found on this forum ( http://www.html5gamedevs.com/topic/12392-having-different-textures-for-each-face-on-a-cube/ ), the textures are rotated into different directions for each couple of faces (top-bottom, front-back, left-right). You can see that here: http://www.babylonjs-playground.com/index.html#1QKKTU#2 the texture is supposed to have the yellow lines at the sides, the black thingie on the left and the blue dot in the bottom-right corner http://www.babylonjs-playground.com/textures/misc.jpg (used the one from materials playground sample). I have also noticed that when using the the "invertY" parameter on front and back this happens: - No parameters set Front flipped horizonatlly and vertically, back normal - Front: false Back: false Front flipped horizontally, back flipped vertically - Front: true Back: false Front flipped horizonatlly and vertically, back normal - Front: false Back: true Front flipped horizonatlly, back flipped vertically - Front: true Back: true Front flipped horizonatlly and vertically, back normal Now, did I do something wrong/didn't understand how it works (I admit i just copy/pasted the code for multimaterial texture) or is this the expected behavior?
×
×
  • Create New...