Search the Community

Showing results for tags 'material'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

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

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 107 results

  1. While importing meshes designed in software like Autocad and Blender, I noticed that the color of a previously imported mesh is getting applied to many meshes that are later imported. Then I realized that that this is due to conflicting material IDs. Is there a way to modify material ID of an imported mesh or is there any other solution to this problem?
  2. Dong

    waterMaterial

    I love BABYLON , I encounter a troble about waterMaterial.It often appear some black edges at some angle of camera. I can't find what cause it. lights: there are two lights ,hem and point. but the waterMaterial still black when I adjust the lights camera: arcRotate,target is (0,0,0),and the bigger the beta ,the darker the water renderList:[skybox]
  3. Hi everybody ! I'm importing .obj files in my application, and I want to change their color. However, the color seems to be changed when the page is loading, but when it's finally loaded the mesh still has its basic grey material (so while the whole scene is loading we can see the mesh being pink for half a second and then takes back its basic color/texture/material). I've seen something about UV maps etc.. but I checked it in Blender and it is activated when I import into obj. Here's a pg trying to reproduce my problem ( first you will need to help me importing my object into the pg because it doesn't seem to be working, I can't see it on scene); I added a skull.babylon to show that the code I provide is supposed to work : https://www.babylonjs-playground.com/#V9KE7I#7 Thanks for your time !
  4. I was unable to transform mesh instance if the original mesh had a shader material. Is this a bug? I have created a playground example using box mesh. If you open the debug -> mesh panel, you realize there are 6 meshes, but only 5 are displayed. This is because one of the instances in the second row was not transformed properly. On the other hand, clones of meshes with shader material can be transformed properly. https://playground.babylonjs.com/#B2NZ1M#1
  5. I'm glad I discovered babylonjs. I'm testing on different browsers and I have a color rendering problem with the stable version and FireFox only. Normally we should see a red sphere and a green sphere. ■ SandBox : https://www.babylonjs-playground.com/indexstable#ZM9G4E#3 ■ Demonstration Video : Thank you for your help and bravo for this framework.
  6. pichou

    Rim Effect

    HI everybody! Is it possible to add a rim effect on mesh like in this image : Thanks, Pichou
  7. Hello, No bug, no issue today ! I was just wondering about the choice of linking materialDefines to subMeshes, rather than directly on materials themselves. Does that mean that two subMeshes could have the same material, but different defines ? As the material updates the defines depending on its own properties (not the properties of the subMesh), I can hardly see how it's possible. I would love to see an example of this if you have one. I mean, I'm missing something. I'm quite sure this choice has been made for a good reason. But I don't get why. Thanks for your help !
  8. Are vertex colors and materials compatible? I've created a playground based on the custom mesh playground to illustrate the issue: http://www.babylonjs-playground.com/#VKBJN#160. If no material is attached, I get an interpolation of the colors over the triangle. If the material is attached to the mesh in line 42 the triangle is black and it appears to use only the colors of the material. My ultimate goal is to use a point cloud with vertex colors and a material. Thanks, Jess
  9. Hi everyone, I know it's possible and advised to use InstancedMesh when several meshes share the same geometry and the same material. Is there some recommended optimization to do when two meshes share the same geometry but have different materials ? For example with this case : http://playground.babylonjs.com/#T4Z2V9#1 (here VertexData object is already loaded) Is there something better than two calls to "applyToMesh" ? Like obj1.geometry = obj2.geometry, this kind of thing... (my question is based on the fact that Unity explicitly share the same geometry across objects, even when Materials are different. But perhaps it's only done to optimize data packing / loading and has no impact at runtime...) (I'm fairly sure I have already found this question somewhere, but can't remember the answer nor find where it was...) Thanks a lot for your inputs ! Have a nice day,
  10. Hello, I'd would like access to any mesh through my loader for change a texture map , but the log output 2 times the same model : https://bin.fuelphp.com/snippet/view/OJ Is it my script which run 2 times or what version I should use ?
  11. trollolloo

    meshes get same material

    I'm using BabylonJS V3 with Blender 2.79 to create product visualizations. Many times, it is necessary for me to define more complex shaders in the JS code. I'm using lines like scene.meshes[1].material.emissiveColor = new BABYLON.Color3(1, 0, 0); to define the shaders after export. Usually every mesh can get it's own shader this way. Unfortunately, I can't get it to work somehow. Even in small test scenes (one red icosphere, one green cube, a hemi lamp and a camera), both objects get the same material. When trying to change the appearance like shown above, both meshes change color. When I navigate the camera, so that one object isn't visible, the right material gets loaded (green, in my sample scene). Here is a small video of the strange behavior: https://imgur.com/a/zYlLT Both blender meshes have individual datablocks and individual materials. No duplication, instancing ... Do the mesh indices change, when a mesh gets unloaded? Where could I have made the mistake? In blender or in my .js? I am greatful for every hint!
  12. Sebavan

    Glow Layer

    Hello, It has been a while I did not introduced a new feature in BJS so as the higlight layer was famous, let s introduce the glow layer: http://www.babylonjs.com/demos/glowlayer/ Documentation is available here: https://doc.babylonjs.com/how_to/glow_layer
  13. Hello folks, i try load an .obj file and modify the material/texture scaling. Loading goes well, but not scaling of the textures When i try to access the material object i get a undefined error. meshes[0].material is undefined, in the screen shot you can see the property is there. I dont know what i do wrong // first param: ["myMesh1", "myMesh2"] // https://doc.babylonjs.com/how_to/load_from_any_file_type BABYLON.SceneLoader.ImportMesh("", "./assets/temp/house/", "restaurant.obj", game.scene, function (meshes, particleSystems, skeletons) { // do something with the meshes and skeletons // particleSystems are always null for glTF assets //console.log(meshes, particleSystems, skeletons); console.log(meshes[0]); });
  14. negrant

    Material Color

    Hi all, I want to ask about StandartMaterial, if I add to material a ambientColor or a diffuseColor or a specularColor it means that this colors mix with material.texture colors in every frame, or just at once and then new colors saves somewhere in buffer. Need to know this for performance, if all colors mixes every frame I think this bad for performance and I will be find some other ways. Thanks : )
  15. Hey everyone! Is there a way to add a smooth transition when changing the material of a mesh? Thanks, Pichou
  16. Hi, Is it possible to control image format export for 3d max materials (force jpg, png for example) somehow? As for physics material (pbr) it produces png right now for me even without any transparency. Thank you in advance.
  17. hi, anyone knows why changing the value of "pointSize" doesn't influence the size of points of a shaderMaterial? shaderMaterial.pointsCloud = true; shaderMaterial.pointSize = 10;
  18. pichou

    Chrome Material Issue

    Hey everyone, I have something weird happening with the game I develop. See in this test page : http://test.wazana.io/ ( it is a special preview for you! ) The materials of the units and buildings are flashing. I observed this behavior only on chrome (working normal on IE, Edge and Mozilla) and not on all computers I tested (maybe there is a problem with a specific version of chrome). I use BABYLON.MultiMaterial on units and buildings because they always have 2 colors so one material for each color. But when it flashes on Chrome, this is either one color or the other on the entire mesh. I put a video attached which show the bug in case you don't see it on the test page. (weird video format but playable with VLC) Bye, Pichou chromematerialbug.webm
  19. Hi all, I found something weird while optimizing my code: I was using InstancedMesh as much as possible, and switched all my materials to ShaderMaterial. And then boom, everything disappeared. After a bit of research, it seems instanced meshes will simply not be drawn when their source has a ShaderMaterial assigned. Playground repro: http://www.babylonjs-playground.com/#TWDEA#6 Uncomment lines 40 to 44 to see for yourself. It's actually a bit more complex than that: when you assign a shader material to it, even the source mesh disappears if it has been instantiated (?), but only if its instances are in the field of view. I'm currently looking at BJS code and ANGLE_instanced_arrays doc (the extension used for drawing instanced meshes), but I thought I'd come here to fish for ideas... FYI these are two errors I noticed in the log when this problem showed (errors not always there): drawElementsInstancedANGLE: at least one enabled attribute must have a divisor of 0glDrawElementsInstancedANGLE: attempt to draw with all attributes having non-zero divisorsThanks
  20. I'm using a custom material which is pretty similar to the ground material used in WorldMonger demo. The problem is that I don't get a shadows on it. Well it's not a big surprise, because I'm overriding the _effect property of the base material. The question is how can I get both my effect with a base material effect without copy-pasting the code from base material. I mean how can I get shadows while using additional effects?
  21. Hi, It seems like in the GlossySpecular workflow, the values of diffuseColor and diffuseTexture are not multiplied together. Then, if you wan't a material with a quite saturated color, like Adding a texture with this green is not the same as setting this green as the diffuseColor. Sample playground is here : http://playground.babylonjs.com/indexstable#6DDR9C#1 Is there a configuration for the PBR Material to get the result we see with a monochromatic texture, without using any texture ? Thanks a lot ! Have a nice day,
  22. I am new to Babylon and I have some knowledge about unity shaders but I am not sure how can I create shaders for Babylon, can any one suggest me any tool or any link which can help me to design or create some beautiful Shaders for Babylon. as BabylonJs Object's material, as we have shader forge available for unity, can any one suggest me a tool for WebGL shader create tool? that will be your good help for me, I am getting frustrated and need extream help from Babylonjs Community.
  23. Hi, I am trying to load an obj file into a scene. The mesh loads fine, but the MTL file (which is in the same directory as the OBJ) doesn't load so the mesh basically has no texture. I am not sure why. In the documentation it says that babylonjs should load it automatically. What am I missing? Thanks for the help!
  24. amethlex

    Merge Two Grounds.

    Hi All, I am using Babylonjs to create map these days. Basically, I have two layers, one layer is tiledmap, which is a png image, another is semantic map, which is a svg file. The size of two map is almost same. So I just create two grounds whose materials are created by the png image and the svg file and put them at the same position. If I make them locate at different heights, one ground will hide another. If I make them locate at the same heights, they cannot merge perfectly, at some angle you can see svg materials clearly, and png materials at some other. My problem is how to merge these two grounds perfectly?
  25. I generate a Ribbon from a path array which looks like in the attached image. I assign a single color material to the mesh, now I would like to add an another material/color to the center "strip". How can I achieve it. or did I have to create 3 separate paths (left , center, right) ?