Search the Community

Showing results for tags 'texture'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Coding and Game Design
  • Frameworks
    • Phaser
    • Pixi.js
    • Babylon.js
    • Panda.js
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Found 221 results

  1. get data from Texture

    Hey, i'm trying to get the data source from a loaded Texture in BABYLON. But I haven't found a way to do this. Basicly my idea is to get the data from the image and save it as base64 in the local cache. And then I can get the image from the cache again and load it into BABYLON. This should improve performance and result in faster loading times once you already loaded the scene once. Does this accually makes sense or is there a better way of caching textures?
  2. When i recreate texture or material, clone/dispose created more one texture (clone logic incorrect material.texture.clone() and material._texture.clone()) example this is very important for dynamic scene, please fix source ** I tryed run in this latest version and saw what recreate correctry, but i not undersend how... and other -- i see what canvas2D will be not suported in future? I see GUI, this is very cool feature, but GIU can't do many tasks... Tell me whether it is possible to work with canvas2d in babylon.js 3.0, or will the support be returned in the future?
  3. Work offer

    Hi guys, After some previous attempts to solve some problems in our project, we saw that we were not getting anywhere so we decided that we needed a professional help. This is the offer we published on the Upwork platform, so if anyone is seriously interested in completing the job, please contact us. This is the text of the offer: _______________________________________________________________________________________________________________________________ Representation of a snow-covered mountain scene in Babylon.js Engine The task consists of representing a snow-covered mountain landscape with forest and water bodies in Babylon.js. The focus has to be made on the visual attractiveness while still offering high performance. An example of a scene like that would be this one (Scene1), made in Three.js. We are providing a basic scene (Scene2) made in Babylon.js, and the following improvements have to be made to this scene: 1) Implementing a GLSL Shader / Babylon.js Custom Material which accepts the following criteria: Terrain Texture: - Rocks: should be a procedural texture with a nice natural transition between the snow and the rock texture like in the Scene1. - Water: should be the WaterMaterial provided by Babylon.js Material library. - Snow: it is already acceptable in the Scene2, but any visual improvement is welcome. If needed, the mask image for the texture mapping can be also provided as three separated alpha mask images, one for each type of texture. Furthermore, it has to support a Dynamic Texture on top of the Terrain Texture, so that it should be possible to draw directly on the ground. An example of this would be this scene (Scene3), implemented with ShaderBuilder : The problem with this scene is that it lacks bump maps, fog and shadow effects. There should be visual consistency across the most popular browsers: Chrome, Firefox, Edge and Safari. 2) Representation of the forest: - Positioning the trees based on an alpha mask image, as opposed to placing them based on a position array (see treepoints.js file in the source code), like in this example (Scene4). - The forest should be realistically dense, similar to that in the center of the Scene4, with the same tree size. - For optimization purposes, the trees should disappear at a distance and be substituted by a texture in a visually subtle manner like in the Scene1. - The trees can be sprites / particles / solid particles / meshes / shaders / anything else, as long as the performance is still good. _______________________________________________________________________________________________________________________________ If you have any questions, we're ready to answer them. Thanks!
  4. Hello, I have a big texture and a little object. I would like to use only a part of the texture to render the mesh and eventually change the texture offset. I read the docs and did a lot of tests but all the times I apply a texture to a mesh the texture is resized to the mesh size. I cannot use the sprites because the portion of the texture that i want to use has different sizes. In is possible to apply a texture to a mesh keeping the original texture size?
  5. Shower visualization

    Hi everybody: These days I'm starting with a development involving the visualization of a shower. The software must run in desktop and mobile (this last by means of an hybrid app). In order to show the (falling) water I'm considering two strategies: chroma-keyed video with the water falling (I'm using both a mp4 and a webm containers); particles (I'm afraid of As I am concerned about the performance penalty of using particles (it needs 30,000+ and motion blur in order to resemble a "real" shower), we are tackling first the video way. Running a raw example from server, over Chrome (Win) and Safari (OSX), shows the alpha 100% clear: With Firefox (Developer Edition / 56.0b1) the alpha channel is instead shown with a degree of opacity: Do you think is possible to obtain a correct alpha in this last browser? Best regards.
  6. 3D Props Assets Texturing Service

    Hello! Lirio Art Production can provide mainly high quality texture or 3D props from scratch to final output for your next-gen game. Please feel free to leave a comment here or directly message me regarding your project and estimates at - Texture Only: PBR Texture Tileable - $30/texture Included: Base Color or Albedo Map Normal Map Ambient Occlusion Roughness or Glossiness Map Metallic or Specular Map PBR Props texturing - $45/props/texture Included: Bake the sculpt to the game res Base Color or Albedo Map Normal Map Ambient Occlusion Roughness or Glossiness Map Metallic or Specular Map Substance Painter smart material [optional] - Asset sculpting, game res and texture: Basic Props [Flashlight, Cabinet, Chairs and Tables, etc.] - $150/props Included High resolution Sculpt Game Resolution Bake sculpt to game res PBR Textures [Base Color, Normal Map, AO, Roughness, Metallic]
  7. Hello! Lirio Art Production can provide mainly high quality texture or 3D props from scratch to final output for your next game. All textures are set to 2048x2048. - Texture Only: PBR Texture Tileable - $30/texture Included: Base Color or Albedo Map Normal Map Ambient Occlusion Roughness or Glossiness Map Metallic or Specular Map PBR Props texturing - $45/props/texture Included: Bake the sculpt to the game res Base Color or Albedo Map Normal Map Ambient Occlusion Roughness or Glossiness Map Metallic or Specular Map - Asset sculpting, game res and texture: Basic Props [Flashlight, Cabinet, Chairs and Tables, etc.] - $150/props Included High resolution Sculpt Game Resolution Bake sculpt to game res PBR Textures [Base Color, Normal Map, AO, Roughness, Metallic]
  8. Hi all, We with my colegue decided to share texture generator node-js tool that we created. Its port of compresed texture generator script to node, so it can be used cross platform not just on win machines, also included in build scripts. NPM: GIT: Feel free to post issues and suggestions on github. More information is located inside file.
  9. Hello, I have a little Problem with my Mirror Material. I cant get the Blur to work. If I try to blur the reflections in this playground Example by adding the lines: mirrorMaterial.reflectionTexture.blurKernel = 64; mirrorMaterial.reflectionTexture.blurRatio = 1; everything works fine. But If i try it in my own Scene nothing happens (changing the Values has zero Effect). Does anybody have an idea why it works in the playground but not in my scene?
  10. Hi Everyone, I need guidance on how can I approach this problem: Would like to apply a tiled texture to complex polygons. I'm using P2 for the physics and tiled for the level editor. I would like to get something similar to worms where the terrain has a tiled texture, the top has grass and the bottom is darker. These are some examples of what I would like to achieve: I don't care at all about destructible terrain. This is how my level looks now with polygons from tiled:
  11. Is there a way to change texture uOffset and vOffset without having the texture smearing? You can see it here
  12. I've noticed when scaling textures with uScale and vScale it does it from the corner. Is there a way to scale from the centre, so it really looks like you're zooming in? Here's a playground to demonstrate how it scales from the corner:
  13. Apply Texture to Vertex

    Are there any examples of how to apply a texture to an individual vertex as is described in this tutorial:
  14. Hi folks, I am a beginner for babylon.js and blender. So I imported a cube with one face textured from blender to babylon js using BABYLON.SceneLoader.Load. The scene has the default point light in blender and the HemisphericLight I created using babylon.js. Everything looks good (please see the 2.jpg in the attachment), but after I resize the cube to make the cube flat (using cube.scaling.y = 0.1), the lower part of the textured face will be always shadowed, no matter how i adjust the light or how to move the cube (please see the 1.jpg). I already made the scene as simple as possible to narrow down the cause of the issue, but I still cannot figure out why the lighting cannot be rendered properly. So any help will be much appreciated!
  15. Hy everyone! I'm making a game and need a little help with the transparency stuff. So, in the game I have one material that has a texture (a png image that contains transparent parts). The mashes are made out of planes, merged together and the planes shows parts of the texture (think about it like Minecraft). I can set the colors of each plane in the mesh with the colorKind vertexdata.. except the alpha part. So I tried to find some topics about it and saw somewhere a tip to set the hasVertexAlpha on the mesh to true and add the texture to the opacityTexture. That worked, now I can set the RGBA on any parts of the mesh but the rendering order goes wrong Here's an image: the red and the green are one mesh (that has two planes, the green is above the blue), the blue is the other mesh. The green is half transparent using the colorKind alpha : It's cool, this is the result I'm looking for! But when I rotate the camera, the blue is displayed above the green. And here is playground link to what I'm experiencing in the game: So in short, I want to have a material with a diffuseTexture that has transparent parts and use the colorKind RGBA on every plane in every mesh. What am I doing wrong and how can I fix it? Thanks for the help!
  16. I want to draw a texture on the line that user draws on the screen. Like a mouse trail, so I follow this tutorial. . The only thing that doesn't answer me is sending the custom uv to the shaders. I vaguely remember that in C++, I can create struct or something and the shader will know how to handle it. It seems that is not the case here. I can't even figure out how does "index" property in vertex shader gets there. Even so, I can't use the "index" approach as the line won't be full rectangle as in the example. Right now, I copied & pasted the entire lines2d classes and try to customize to be able to draw texture on there, but I don't know how to send the custom uv that I've calculated to the shader. Anyone can explain that to me? Or am I looking at this a wrong way?
  17. Fixing texture repeat

    Hi! I am a newbie to babylon js, and I already have problems. I have loaded textures to my object (stick/bar) and problem is when I resize my object, texture resizes too. I tried to apply texture after scaling object, but texture resizes anyway. I really don't want to create a new texture for every object just because its size changes. So, my questions are: Is there a way in babylon js to set its size to be fixed? Or is there a way to set texture to repeat itself rather than scale itself to wrap the object. Image is attached (mind the upper bar is longer and its texture is scaled <-- that's my problem).
  18. Does anyone know why the edges of my transparent texture have red lines on it? Is there a way to prevent it from happening?
  19. Hi, I have exported model from 3dmax and loaded in babylon and meshes are cloned after load (also tried instance). But sometimes some meshes appear in scene with default color not with texture, but after changing angle of camera (ArcRotateCamera) some of them get texture back. I will try to isolate problem but meanwhile maybe someone seen similar behaviour? I use alpha version of babylon from npm. Thanks.
  20. Let's say I have a material with the following properties: var ref = new BABYLON.CubeTexture("skybox", scene); var mat = new BABYLON.PBRMaterial("PBR", scene); mat.albedoTexture = new BABYLON.Texture("a.png", scene); mat.reflectionTexture = ref; mat.microSurface = .4; //mat.diffuseTexture = new BABYLON.Texture("s.png", scene); //mat.reflectivityColor = new BABYLON.Color3.FromHexString("#eeeeee"); //mat.albedoTexture.hasAlpha = true; //materialGloss.albedoColor = new BABYLON.Color3.FromHexString("#f00001"); Is it possible to have a texture on top of the reflecting surface? Preferably with an alpha channel. What about multiple textures layered on top of each other, like a dirt map on top of a logo?
  21. Trying to help this topic The problem is scaling texture on the caps of an extrusion. What is needed is something like this on the caps what I get is any suggestions
  22. when exporting my model to .babylon (using blender) it gives this error "RuntimeError: Error: Maximum number of textures added 18" the model export correctly but some textures are missing. Can anyone help me ?
  23. Hi, I was wondering if someone had experienced slight differences in "offsets" using sprite2D texture and wether it might be related to caching. As an example I have a fairly small texture of 16*16 here in svg, but i tried also using png, same problem. That's the begining of the sprite texture zoomed in 4800% When using it in chrome with a code like this: const crossSheet = taskObject.cloneAssetIntoScene(R.get.crossSheet, scene) crossSheet.hasAlpha = false const cross = new BABYLON.Sprite2D(crossSheet, { parent: canvas, id: 'cross', marginAlignment: 'v: center, h: center', spriteSize: new BABYLON.Size(16, 16), spriteLocation: new BABYLON.Vector2(0, 0), }) cross.spriteFrame = R.get.cross_predict The texture is at the center of the screen here, in chrome the top misses 0.5px In Safari there is a difference in colors and width of strokes: If now I am using a 16,17 sprite size i get a correct sprite in chrome: But somehow it is seems worst in safari: Any clue ? Do you think it is related to the caching strategy ? @Nockawa Here is the link to the texture: Here is a playground, on the playground it is the BOTTOM 0.5px that get cutoff..
  24. Hello everyone, First time using Phaser, and I'm trying to add a tileSprite to the game using a texture generated by Pixi. But I'm getting the following warnings and errors: Warning - Phaser.Cache.getImage: Key "__default" not found in Cache. Warning - phaser.min.js:3 Phaser.Cache.getImage: Key "__missing" not found in Cache. Error - phaser.min.js:3 Uncaught TypeError: Cannot read property 'base' of null at new c.TileSprite I discovered that the error disappears when I add a preload method, load any image, even an image that does not exist. By doing this, the tile appears normally and the erros desappears. Can anyone tell me what's going on? I need to use textures already loaded outside the Phaser. My Code(.coffee) @_game = new Phaser.Game(window.innerWidth, window.innerHeight, Phaser.AUTO, @element, preload: @_preload create: @_onPhaserCreate update: @_onPhaserUpdate render: @_onPhaserRender) _preload:()=> @_game.load.image('load-nothing', ''); _onPhaserCreate:()=> @_game.physics.startSystem(Phaser.Physics.ARCADE); @_background = new PIXI.Texture(new PIXI.BaseTexture("image_element")) @_stars = @_game.add.tileSprite(0, 0, window.innerWidth, window.innerHeight, @_background) _onPhaserUpdate:()=> # _onPhaserRender:()=> #