Jump to content

Search the Community

Showing results for tags 'Texture'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





  1. I'm a beginner with babylonjs. I'm trying to make a demo to see how it's work. Everything work fine with "Bane, Batman, Penguin" sample But when i try to load the model downloaded from sketchfab.com it just not working properly. Here what i've got. What's happening? What am i missing? Here the entire code // The first step is to get the reference of the canvas element from our HTML document: var canvas = document.getElementById('renderCanvas'); // Then, load the Babylon 3D engine: var engine = new BABYLON.Engine(canvas, true); // After that, we create
  2. Hi, I want to dynamically swap sprite texture ( i want it to be able to get texture from internet ), but i don't know why it sometimes not working, it become blank. i didn't use the requestAnimationFrame(animate) loop to minimize resources usage. and, can i resize sprite using drag? touch pinching ? Thank You the sample code : var renderer = PIXI.autoDetectRenderer(800, 600); document.body.appendChild(renderer.view); // create the root of the scene graph var stage = new PIXI.Container(); var bol = false; // create a texture from an image p
  3. Hi friends, I searched for a while, but because of the fairly common search terms I might have missed the info I'm looking for in which case I apologies. I want to use seperate/different UVs for diffuse and opacity textures in the StandardMaterial. Is this a thing that is possible, or would I have to modify the source? As always, thanks for using you're precious time to help a pleb like me. let mesh = new BABYLON.Mesh("face", scene); let vertexData = new BABYLON.VertexData(); mesh.material = mat; //set positions, indices, normals vertexData.uvs = normalTextureUVs; vertexData
  4. I load a texture using the asset manager, once load is complete, I create a sprite using that texture. I created a PG where you can see the code working: http://www.babylonjs-playground.com/#1KDQTU#6 But when I try to run the exact same code in my project, nothing appears. The DOMContentLoaded listener was written in a way that'd allow me to keep my PG createScene() unmodified. What am I missing? window.addEventListener("DOMContentLoaded", () => { window.canvas = document.getElementById("renderCanvas"); window.engine = new BABYLON.Engine(canvas, true
  5. I have a problem loading a texture and then displaying it in a Sprite2D. There's already a topic for it that includes a few versions of zipped projects that reproduce the problem. @Nabroski suggested this might be a bug, so I posted it here. Link to topic: http://www.html5gamedevs.com/topic/23800-loading-texture-what-am-i-missing/
  6. so I have a 2x128 vertical gradient, I do that to reduce the spritesheet size. What I want is to stretch the sprite to 64x128. When I created a sprite out of it, I notice it having a weird incorrect width. When I do, sprite.width = 64, it doesn't go to 64 px. And when I use a huge number to force it to 64px on screen, it uses the wrong sampling where it tries to interpolate the pixel across the x direction using the pixel above and below. How can I resolve this ?
  7. So when I run my game sometimes it works fine, and sometimes I'm getting these errors: WebGL: INVALID_OPERATION: texParameter: no texture bound to GL_TEXTURE_2D WebGL: INVALID_OPERATION: generateMipmap: no texture bound to GL_TEXTURE_2D WebGL: drawElements: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering or is not 'texture complete'. Or the texture is Float or Half Float type with linear filtering while OES_float_linear or OES_half_float_linear extension is not enabled. (this last one one is happening every frame). First
  8. I wonder whether it is possible to translate browser viewport on Plane in 3D world. Like video texture on plane. And If this 3D plane can be interactive like browser is ??? Just ask how it is with this. Could be that possible to do? Could we have more browsers planes in 3d world which will be interactive? greetings
  9. How do I create a 2D image with a texture from image file in Canvas2D? (not an animation from sprite)
  10. Hey guys, I just start to phaser. I tried to develop a game that allow user using their fingers to draw/paint on some particular area of the mobile screen. So my solution is to create two layers, one is the background tile sprite, and the other one is sprite that allow user to draw on it. Here is my code: background = game.add.tileSprite(0, 0, 1080, 1920, 'background'); game.add.sprite(x/2, y/2, 'tree'); bmd = game.add.bitmapData(game.width, game.height); bmd.addToWorld(); game.input.addMoveCallback(paint, this); However, when I tried to draw. I cannot particularly draw on
  11. I don't see a way to export a terrain material from Unity. Is there a method I could use to export an array of textures, and then create the terrain material later in babylonJS with those textures?
  12. Hi, I'm new here, my name is Royi. I'm loading a custom image (.png) using AssetManager, on complete I'm rendering a scene with a box. I want one face of the box to display the custom image I loaded. I experimented with Sprite but it seems to be completely restricted to 2D (by definition I guess), I was hoping for a thin 2D sprite I could rotate around the z axis as well. Is there some option to set the texture of a polygon's face to an image? Otherwise, how do I achieve it?
  13. I am trying to achieve a similar design as this site using pixi- http://www.spaceneedle.com/home/ However I am having trouble even finding out how to make a full page texture. Any image I use won't stretch to match the viewport. I have tried setting- this.sprite.texture.width = viewPort.width; or this.sprite.width = viewPort.width; However there is always blank space on the right hand side? Any guidance would be greatly appreciated.
  14. Hi there guys. Say I want to make a filter that does something to original texture after it was blurred with Blur filter. Here's the PIXI blur filter: BlurFilter.prototype.applyFilter = function (renderer, input, output) { var renderTarget = renderer.filterManager.getRenderTarget(true); this.blurXFilter.applyFilter(renderer, input, renderTarget); this.blurYFilter.applyFilter(renderer, renderTarget, output); renderer.filterManager.returnRenderTarget(renderTarget); }; Is there a way for me to store original input texture and use it as a uniform for my filter, kinda
  15. hi i test some stuff about Texture and see a interested result in a large scene and one time use material with colorfull paint all and keep other effects i see fps between (45 - 60 ) and zero Ram Take and make that scene just with textures (i test DDS and Small Text too ) i see fps between (25 -40) and 2 GB Ram take any way to manage texture in buffer for optimize that? * for samples wait to load complete and see around in first time (it is not have loading or prepare stuff) I really don't understand 2G ram!!! -
  16. Hi guys! Recently I converted my .png textures to .dds using nvcompress and dxt1 as compression (don't need the alpha). For some reason the textures came out flipped on the horizontal axis. Setting the texture uAng property to PI fixes the issue, but I'm wondering where did I go wrong...? Cheers
  17. Hello everybody, I have a color rendering problem. When I add a texture to my box ( text ) , the color of the box turns dark . But when I remove the texture color is respected. I would just write a black text on my box and the texture around my box respects the original color With texture (text): http://www.babylonjs-playground.com/#INTPO Without texture: http://www.babylonjs-playground.com/#INTPO#1 Good day
  18. 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 l
  19. Hi all, I'm still beginning on learning how to use babylon js, so for now i just playing a little with babylon playground. right now i just make play ground to combine example of using extention .obj loader and function of drag and drop at default babylon playgorund sample. the play ground i make is working (what i mean is the drag & drop is function and the .obj file is loaded) but i found something funny here, how to fix it maybe : - the ground(camera) can't rotate if i not drag and drop any object before - the .obj file why is it so small, is there a way to make it
  20. Hi anyone! I want to create panel of ui and I need to stretch a background of panel like Scale9Image in Starling. Can i do it? Thanks so much!
  21. Hello. I'm having an issue with stripes of pixels from one sprite appearing in other sprites sporadically. I've included an image below. I'm loading a spritesheet made by the free version of texture packer. I then make sprites out of the textures, set anchors to 0.5, set scale to 3. Animations are performed by changing textures. I also emulate a camera by having one container named 'stage' and moving it around based on the player's position and window dimensions. I frequently (but inconsistently) see an extra strip of pixels appear on the left edge of sprites as if the source rectangle we
  22. Hi,I have hard times with asynchronous mesh loading. I need to apply textures to meshes right after meshes are ready. I'm importing in this way: var loader = new BABYLON.AssetsManager(scene); someLoader = loader.addMeshTask("roulette", "", "", "rouletteTable.obj"); anotherLoader =loader.addMeshTask("chip", "", "", "blackChip.obj"); someLoader.onSuccess = function (t) { t.loadedMeshes.forEach(function (m) { tableMeshArr.push(m); }); tableMeshArr[0].material = materialWheel; tableMeshArr[1].material
  23. Here's my loader code which worked on the old version of pixi.js (1.6.1) http://pastebin.com/4032KFxm But now there's a new loader implemented, and I don't understand how it works. How can I make my loadercode work for the latest pixi.js? Basically you send a file called "assets/gfx/something.sprdef" to the loader which had forexample this line in it: 42,42 then it'd take the same name as above, but replace .sprdef with .png, then split the png into 42 wide and 42 high textures which then could be used in pixi. Then I could easily use it with: player = PIXI.Sprit
  24. I'm trying to apply texture to my mesh, everything looks good except one thing: numbers are like on the photo attached. Does anyone know what is solution here?
  25. Hello , I search for this topic a lot but i don't get any similaire. I find an example for a plan in this topic : So ,I'm trying to apply a texture for my custom mesh. I've got failure and i don't why . If I apply it with a sphere or any Babylon meshes it runs ok. this is a playground link : http://www.babylonjs-playground.com/#VTDRC#1 I noticed that there is an [uvs] table and I don't have any idea how to make it and is it necessary to implement the texture ?
  • Create New...