• Content count

  • Joined

  • Last visited

About kurhlaa

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. kurhlaa

    Walking up/down vertical stairs

    Short additional info - camera's parent already is a mesh, so it is easy to look around, while moving a mesh/character. However it would be interesting to see camera-only version too, if that's possible.
  2. Hi, I'm trying to implement a walking up/down vertical stairs, for example from the ground to the roof. Unfortunately I have no completely working ideas. Somehow player's mesh should: 1. With WS keys move Up/Down when he is next to the stairs; 2. When he is at the top of the stairs - he should go forward instead of Up, to the roof, without falling down after disconnecting from the stairs; 3. When his mesh is walking down and reaching the ground - he should "disconnect" from the stairs and start walking normally with the same S key pressed. Could you give me some ideas how this should be implemented? Thanks! NOTE: vertical stairs not standard diagonal, but vertical. Like here -
  3. Hi, What about setting light.range = 20; to a smaller value? 20 looks too much for your scene.
  4. kurhlaa

    Can't access existing playgrounds

    @RaananW, that helped thanks. https://babylonjs-api2.azurewebsites.net needed JavaScript access too. After adding this domain to the whitelist PG is accessible. Script blockers fault - they do not show that this domain is blocked.
  5. Hello, On one of PC I use I can't access any existing PG. For example, if I open a PG from the latest questions - https://playground.babylonjs.com/#199KHL%2317 - I'm forwarded to the https://playground.babylonjs.com/ so no chance to see the PG. I have an AdBlock and ScriptSafe, but I allow everything PG needs, cookies are also allowed. Could you tell me what else can prevent accessing the playgrounds? I try Chromium and Firefox.
  6. @JCPalmer, Thanks anyway May I one more question about Blender exporter without new topic?! In Blender (mesh Data) you have a checkbox "Cast Shadows", but I don't see it in the exported *.babylon file. How this setting can be used in BJS?
  7. @JCPalmer, I tried to edit *.babylon file and to replace name, for example, "image_name.png" with "images/image_name.png". There probably can be any path, relative to the assets/ folder. It works, but that means editing these files (every texture's path!) after every Blender's exporting. How do you deal with that?
  8. Hello, When I use Blender and apply texture to some object - I can select an image from any folder. However, when I import scene to the BJS - it looks for all images in the folder where *.babylon file is. Import example: var meshTask = loader.addMeshTask("someName", "", "assets/", "myScene.babylon"); As a result - *.babylon file contains filenames only and BJS looks for them only in "assets/" + image_name.png. If we want to store images (and other files?) in a different separate folders - how it can be achieved? Because putting all Blender source files and all related files in one folder - not comfortable at all I see that Blender has a field with a relative path - maybe it can be exported/used somehow?
  9. @Deltakosh, I've learned to use a free hosting 000webhostapp.com for you I've prepared a demo with 3 variations. DebugLayer included. While trying to move to the same position and watching in the same direction somewhere to the right I get: 1. Slowest - https://bjsdemo.000webhostapp.com/slowest/ - Potential FPS ~300-400, with mesh.alwaysSelectAsActiveMesh = true; 2. Medium - https://bjsdemo.000webhostapp.com/medium/ - Potential FPS ~400-500, without mesh.alwaysSelectAsActiveMesh = true; 3. Fastest - https://bjsdemo.000webhostapp.com/fastest/ - Potential FPS ~500-700, without mesh.alwaysSelectAsActiveMesh = true; and with mesh.freezeWorldMatrix(); meshes.material.freeze(); .. lines 117-119. Partly I understand why Nr. 3. is the fastest out of this examples, mesh.freezeWorldMatrix() and material.freeze() really help. The strange thing is with the difference between Nr.1 and Nr.2. I believe alwaysSelectAsActiveMesh should improve the FPS even more, somehow. P.S. Hosting provider says "Your website will be sleeping for 1 hour from 22:00 to 23:00 every day your local time (GMT +2)" - funny please don't be surprised if this demo is somewhen down.
  10. @Deltakosh, Thanks, with 2. and 3. no more questions. Can you give more info about 1. ? When it increases FPS and when decreases? I've just tried to use Chromium profiling tools, I'm not an expert in such things, but with mesh.alwaysSelectAsActiveMesh = true and without I have more or less the same % numbers for the functions _evaluateActiveMeshes and i.computeWorldMatrix. Top CPU users are mostly functions with "render" in their names, it doesn't give me more debug info. If I disable detecting active meshes with mesh.alwaysSelectAsActiveMesh = true - shouldn't percentage numbers for these 2 functions become close to 0 ? That would give a higher FPS, but I get lower. Also I haven't found a function mesh.freeze() - PG says TypeError: scene.getMeshByName(...).freeze is not a function. What is a correct name?
  11. kurhlaa

    Trouble with bounding spheres

    Hi, diff.negate returns a function, but currentMesh.position.addInPlace() expects position. So replace diff.negate with diff.negate(). But what you will still get (and you should) - your mesh will freeze after the intersection.
  12. Hello, I've got info that both setting all meshes as active and calling freezeActiveMeshes() should improve the performance, because it turns off some expensive calculations. So I tried to implement this feature. But in my case: 1. If I only call mesh.alwaysSelectAsActiveMesh = true for all meshes - DebugLayer shows smaller potential FPS, by ~100. Should it be like that? I have <100 meshes, nothing very complex. Maybe disabling detecting visible meshes enables some other expensive calculations?! Then I thought that freezing should help with that. But that gave me 2 more problems 2. If I use AssetsManager -> addMeshTask -> loader.onFinish() -> scene.freezeActiveMeshes() I get an error: TypeError: Cannot read property '0' of undefined at t.isInFrustum (babylon.js:8) at t.isInFrustum (babylon.js:8) at r.i.isInFrustum (babylon.js:9) at r.isInFrustum (babylon.js:15) at i._evaluateActiveMeshes (babylon.js:13) at i.freezeActiveMeshes (babylon.js:13) at i.Game.loader.onFinish (index.js:64) at i._decreaseWaitingTasksCount (babylon.js:48) at i (babylon.js:48) at i.e.onDoneCallback (babylon.js:48) What does it mean? In my example - http://www.babylonjs-playground.com/#MPS90E#6 - try to uncomment Line 28 to get the same error. I was hoping to freeze active meshes right after they all were loaded. 3. If I put scene.freezeActiveMeshes() somewhere later - all my actions are disabled/removed, nothing happens when one mesh intersects some other, creation of decals also disappears, particleSystem also doesn't work. Some kind of "freeze the world". Example with intersections only - http://www.babylonjs-playground.com/#MPS90E#6 You see a moving red mesh - when it exits from yellow mesh - "intersection" should appear in the console. But after the first time scene.freezeActiveMeshes() is called and nothing is printed out any more. If you comment out the line 93 - every iteration prints "intersection". Can you please explain what am I doing wrong in these 3 questions and how to fix them? Thanks!
  13. kurhlaa

    Blender exporter - isPickable flag

    @JCPalmer, this also now looks solved, I seen new checkbox in Blender settings. Thanks!
  14. kurhlaa

    Pre-import of meshes into memory

    I use Blender. How this works internally? importMesh() will also create normal visible mesh first, which then will be disabled automatically (hacky way)? Or it will create disabled mesh directly (fastest way)?
  15. Hello, If there is an existing scene - is it possible to pre-import meshes without starting rendering them (something like isEnabled = false from the beginning)? For example, I would like to be able to load mesh from a *.babylon file into memory. So later, when/if I need it, I just call mesh.setEnabled(true) to make it visible. If I do normal importMesh() - drawing a mesh first and then erasing it feels a little hacky, so I'm interested whether there is a cleaner way?! Thanks!