Jump to content

Search the Community

Showing results for tags 'lightmap'.

  • 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 10 results

  1. Hi! As we can see in my cornell box scene, something is now wrong with lightmap texture : https://www.babylonjs-playground.com/#J5E230#11 All was working good last time I play with it. If line 7 you change mode to ambientTexture instead of lightmapTexture... var mode = lightmapModes.AMBIENT; ...you will see that textures are correctly assigned, so I don't think this bug is due to my code (or maybe I'm wrong? )
  2. Hello, Is there a way to access the texcoord1 in the shader as an attribute? I know I can access texcoord0 using attribute vec2 uv; but uv0/uv1/uv2 etc don't seem to do anything. This is trivial for using lightmaps
  3. Hi, would it be possible to add light map in 3d max somehow as right now need to do it manually by getting material ids an applying to them in code that gets tedious wiht each change in scene Thank you in advance.
  4. Hello everyone I am trying to use Unity Lightmaps with babylon via the Babylon Unity exporter I use Unity v5.6.3p2 and the BabylonJS Toolkit v 1.0 with Babylon 2.5 For now it's a nightmare, i've tried a lot of combinations with different shader/configuration and nothing works I do my test with a simple fbx and 2 materials/textures, someone have some informations about that? Any help appreciated
  5. Hey guys, So I'm looking into an ideal way to set up lighting for my levels. I'm going with PBR since that's what I'm familiar with from other engines. Right now I'm just leaving reflection color black until my diffuse + lightmapping are standing on their own. What I'm stumped on right now is how to deal with hot-spots and maybe lightmap contrast in general. There are sconces on walls and I use them as emissive textures to generate the lightmap bakes. In a typical Blender Cycles render, the surface nearest to the emissive sconce will get washed out. I bake the direct+indirect diffuse as a lightmap from this. When I apply this as the ambientTexture it looks close, but as I understand it, ambient is really a shadowmap, so its not making anything brighter than it already is and therefore no hotspots. I tried using lightmapTexture, but I don't think I understand how to format it correctly because setting my lightmap to it as-is effectively blasts on-top of everything rather than mix with it. The only thing that has come close to doing what I intend is applying the lightmap to the emissiveTexture and bumping up emissive color to BABYLON.Color3(5,5,5); It's rough, but it does get me surfaces that are lighter and darker than the albedo at the same time. (see bottom image for that) So that's where I'm at. I'm holding out hope that there's a proper way to mix lightmapTexture and albedoTexture that I'm just missing. Also open to alternative approaches if I happen to be running against the grain in what I'm attempting. Thanks in advance for any pointers. Blender Cycles preview render in Babylon with PBR Material albedoTexture = wrapping basecolor textures emissiveTexture = lightmap emissiveColor (1,1,1) albedoTexture = wrapping basecolor textures lightmapTexture = lightmap albedoTexture = wrapping basecolor textures emissiveTexture = lightmap emissiveColor (5,5,5)
  6. Hello all, Since a week now I try to implement a simple lightmap system by myself for my game following this tutorial for libgdx. I've learned tiny bits of OpenGL API when I was coding "for fun" in C++ and I think I can implement this code with the raw WegGL api. However, I would like to do it with Pixi.js. The "ambient light" filter is really simple. But, for the lightmap I need to bind 2 framebuffers : the texture one and the lightmap one. How do I achieve this with Pixi? I've dig into the code of pixi.js, pixi-lights and pixi-extras-filters to try to figure how I can do. For the moment, I render my lightmap on a RenderTexture of the same size of my tilemap. I've found that textures are bound in FilterManager.prototype.applyFilter but I don't see any way in Pixi.js API to bind a second texture. Am I missing something or looking at the wrong place? What is the good way to go if I want to bind another texture for some filters? Extend the filter manager used by Pixi.js? Here is a very messy codepen where I make my tests. There is maybe a very simple solution to this problem but I'm beginner to GLSL/WebGL and I may not understand how to use the exposed API.
  7. Hi all, Is there a way to set a lightmap on a mesh rather than its materials ? I always use this workflow on others 3d engine, and i think it's more efficient ; but after some searches i don't find a procedure to do this on BJS. Thanks
  8. Hi everyone! I have trouble to get what I want with the blender exporter. I have a mesh with a material containing two textures, a standard image texture and a lightmap created with blender. I have two sets of UVs, one for the basic texture and one for the lightmap. When I export my scene, a new texture is baked and applied, but I don't need it, I already have my lightmaps. What am I doing wrong? Is where a way to keep the exporter from baking? Thx all!
  9. I try to create mask that clip sprite(light) in this way that we will see shadows. Lets assume: 1. Draw a pixel map where black pixel means rock, white means air. 2. Draw black lightmap on it (black sprite on whole map, with MULTIPLY blending) 3. Draw an light(sprite with ADD blending) on lightmap texture by PIXI,RenderTexure these 3 steps allow us to create lightmaping on map, but lights always will go through walls. So we need to use masking. 1. use Bresenham Algorithm for rasterize Circle (with radius of our light = half of width of texture) result is array of pixels XY that create circle. 2. sort these pixels based on angle (from 0 to 360) so we have then polygon/circle data array. 3, create a mask based on these data now we have masked light but nothing is changed, now we need to raycast from center of light to each pixel on circle again with Bresenham Algorithm 1. use Bresenham Algorithm for rasterize Line from center of light/sprite to each point on circle, result is pixels on the radius/line, if one of them are Rock/black pixel - change this position/pixelXY on circle to collision position. 2. apply mask now we see occlusion to the pixels (rock/air) on map, and shadows. But.. it is too slow!! I've searched a lot of stuff to find a better way, but have nothing. Someone knows a better way for occlusion lights/sprites to pixel map(rock/air)?
  10. hello, i'm trying to export my baked ligthmaps from blender. As my model should not receive any dynamic lighting, i created the first UV set for the "Emit" slot and a second one, lightmap packed, for the "Ambient" slot. So i have two different sets of texture coordinates for two different texture slots. The python exporter seems to have problems with that: (excerpt from a simpe babylon file, exporting a quad) ,"uvs":[0.2066,0.2066,0.7934,0.2066,0.2066,0.7934,0.7934,0.7934],"uvs":[0.2066,0.2066,0.7934,0.2066,0.2066,0.7934,0.7934,0.7934]],"indices":[0,1,2,1,3,2] It produces two identical UV arrays and mistakingly adds a bracket "]" at the end of the second one. Does Babylon support multiple texture coordinates?And Is there a way to get them from blender or maybe with FBX? In addition, is there a way to exclude objects from dynamic lighting or specific lights?
×
×
  • Create New...