BitOfGold

Members
  • Content count

    217
  • Joined

  • Last visited

  • Days Won

    2

BitOfGold last won the day on November 7 2016

BitOfGold had the most liked content!

1 Follower

About BitOfGold

  • Rank
    Advanced Member
  • Birthday 11/27/1980

Contact Methods

  • Website URL
    http://www.bitofgold.com
  • Twitter
    BitOfGold

Profile Information

  • Gender
    Male
  • Location
    Budapest

Recent Profile Visitors

1,704 profile views
  1. shadow casted by mesh with skeleton not proper

    @satguru yes, no problem with my models now. Maybe it's another, different error. Negative scale can look similar bad with shadows. A very similar bad transparent/distorted look was with (when using PBR material), the setting of alphaMode (I had to set it 0) mo.material.subMaterials[0].specularColor = new C3(0.4,0.4,0.4); mo.material.subMaterials[0].alphaMode = 0; mo.material.subMaterials[1].specularColor = new C3(0.12,0.12,0.12); mo.material.subMaterials[1].alphaMode = 0;
  2. Lossless Compression algorithm

    @Pryme8 Two easy methods for compressing files: - you can use deflate on webserver: all files arrive with automatic gzip transfer encoding to the browser. just some .htaccess settings on apache. - jszip. Easy file access from a zip file. I'm already using this (in my engine I'm working on), not just compression but lower the number of http requests. https://stuk.github.io/jszip/
  3. If you use Quaternions, you can multiply rotations. Feel free to copy from my code: http://www.bitofgold.com/solarsystem/ Like this: Setup: mesh.baseRotationQuaternion = BABYLON.Quaternion.RotationYawPitchRoll(0.0, 0.0, 20.0 * Math.PI / 180, 0.0)); mesh.rotationQuaternion = new BABYLON.Quaternion(); ... at every frame: mesh.rotationQuaternion.copyFrom(mesh.baseRotationQuaternion); mesh.rotationQuaternion.multiplyInPlace(BABYLON.Quaternion.RotationYawPitchRoll(alpha, 0.0, 0.0));
  4. What's next?

    About the problems above: https://playground.babylonjs.com/#UZQ8TN#44 (Sorry if this is not the place of bragging about my shadow problems... ) So, just look at that, how hard it is to set up shadows, in a pretty simple scene/map. Many shadow settings (with lots of experimentation to get them right), and some of them are not working, some has many ugly artifacts.
  5. About linearity and gamma correction

    I think no correction done in standard material, at all. That's not really a problem, theese are only values. SRGB in, SRGB out = works. You have to convert and output srgb value in every shader material, that's all. And I don't really know if this works in PBR - but I think it's working, most workflows output SRGB maps.
  6. What's next?

    Nearly all my problems are and were shadow related... So I'm hoping some of theese will be easier to use, or better working, or working at all in 3.2 The best would be "fire and forget", just set casting shadows or not, set shadow quality, and it is working. Like: - cascading shadows - no shadows on instances - hard to set bias (and other settings like shadowMax, ) correctly when light and camera is moving - exponential shadowsmaps and blurred shadowmaps self shadowing are just not working for me. I searched for many days but could not find the right settings... self shadowing just does not work for me on a big scale scene. poisson shadows always work. - same with point light shadows: with some special settings it is working, but not generally looks ok. Maybe I should make some realy good playgrounds to show how hard to make multiple direct and point shadows working in a simple FPS environment, with walls, floors and objects. All is working well if you light a small object with some light, and fine-tune bias and other parameters - but not at all when the scene size, lightmap size and light distance is different or changing.
  7. About linearity and gamma correction

    A little more research: https://playground.babylonjs.com/#T23QTP#6 This shows a png image (which is in SRGB as nearly all other png and jpg images on the web) The browser loads and correctly shows this on the upper right. It is displayed correctly, because the 0,255 rgb values (stripes) look the same luminance as the 187 (middle grey) value. (In linear, 128 would be the middle grey value) On the boxes, the same texture is loaded on to a emissive texture (black diffuse) and a diffuse texture. Standard materials. The emissive texture should look correctly too IF the texture is loaded from SRGB, corrected to linear RGB values, light calculated (no change because it is an emissive texture), and then corrected back to SRGB (display space) It should look correctly without SRGB correction at all, because the input is srgb and the outout is srgb too. Edited: It looks correctly now with good monitor settings. So, it kind of works without SRGB/linear and linear/SRGB corection, so I think everything is done in display space.
  8. About linearity and gamma correction

    I researched this a little bit, but could not find the place where srgb->linear and linear->srgb display space conversions happen in Babylon. Maybe it is somewhere, maybe all is done in SRGB display space (which kind of works, but not correct) in webGL 2, there is a way to load textures with automatic srgb-> linear correction like this: gl.texImage2D( gl.TEXTURE_2D, 0, // Level of details gl.SRGB8, // Format gl.RGB, gl.UNSIGNED_BYTE, // Size of each channel image ); Here is the texture creation, babylon do not do this automatic correction for sure: https://github.com/BabylonJS/Babylon.js/blob/8f752185e4cfd962ebf687dd25bb4f1ebaa32a46/src/Engine/babylon.engine.ts#L3112 let internalFormat = format ? this._getInternalFormat(format) : ((extension === ".jpg") ? gl.RGB : gl.RGBA); gl.texImage2D(gl.TEXTURE_2D, 0, internalFormat, internalFormat, gl.UNSIGNED_BYTE, img); But elsewhere maybe?!
  9. Or, (just an idea) you can have two sprites as layers over each other: one is for the lower body (running) one is for the upper body over it (fighting)
  10. Calculating elliptical planet orbits

    And you would not see anything in front of you, only a band of stars at the sides, as light would turn into red and then infrared. Behind you the light would turn blue and into ultraviolet.
  11. Calculating elliptical planet orbits

    If you would travel at the 99% of speed of light, from the spaceship's view it would take only about 6.1 minutes to reach Jupiter. And Jupiter would look as a flat ellipsioid, not a sphere, about 1/14th width of the diameter. (But, the video would be shorter )
  12. Calculating elliptical planet orbits

    First you make a full screen GUI: scene.gui = BABYLON.GUI.AdvancedDynamicTexture.CreateFullscreenUI("UI"); After that, add a label connected to each planet mesh (planet.model is a BABYLON.Mesh): var rect1 = new BABYLON.GUI.Rectangle(); rect1.width = "150px"; rect1.height = "40px"; rect1.color = "rgba(255,255,255,0.37)"; rect1.thickness = 0; rect1.background = "transparent"; scene.gui.addControl(rect1); var label = new BABYLON.GUI.TextBlock(); label.text = planet.title; rect1.addControl(label); rect1.linkWithMesh(planet.model); rect1.linkOffsetY = -40;
  13. Motion Blur available on Particles?

    @Luaacro I have seen some animation about speed buffer based motion blur: https://otakhi.tumblr.com/post/166606704295/per-pixel-and-velocity-buffer-based-motion-blur (This extremly unusable oTakhi page with very valuable videos and techniques... Lot to learn from)
  14. I think the issue is, when x and z is over the edge of the ground. getHeightAtCoordinates does not give you 0 result or something but an error. Does it give an error on the console?
  15. Calculating elliptical planet orbits

    No I didn't, it looks rad! It has even the famous moons. I even learnt some things about the solar system, like I never imagined the enormous Jupiter turns every 10 hours. Never imagined it so fast.