• Content Count

  • Joined

  • Last visited

About jacquesr

  • Rank
    Advanced Member

Recent Profile Visitors

1330 profile views
  1. sorry, I did not see the forum was closed, haven't been here for a long time 🤭
  2. Hi, I saw that the engine has a fallback texture (the red-black checkerboard texture). Like in this example, where I deliberately try to load a non existing texture. https://www.babylonjs-playground.com/#CZ9EMB Is there a way to assign this fallback texture to a material via the API on purpose? I want to show it in certain scenarios even when I am not trying to load a texture, but also if I am trying to create an invalid material. We have a high level material description that must follow some rules and I want to unify the appearance of invalid materials in the scene. Thus I was thinking using what is already available would be a good way to do it. However, I don't want to cause it to perform an http request, so the approach in the playground is not really satisfying.
  3. Sorry, seems to be a known issue as filed here. I expect this to be the same problem.
  4. Hi, since Firefox 58 is released, our component that uses Babylon.js to display truck loads renders certain cubes in grey. This only happens in recent Firefox versions. I investigated the scene objects and the materials and their colors are indeed assigned to the objects. There are no errors in the console. Also, this does not affect all objects, only the ones we create before the first render (as it seems, so far...) alhtough we create everything using the MeshBuilder createBox/createCylinder factory methods. Also, this does NOT happen on every machine. I experienced this on my own laptop, now it doesn't happen for me but it happens for a colleague. So it has definitely happened on different GPUs. @Deltakosh Are you aware of such a behavior? Have you ever experienced this and can lead me into a direction? I will go and fire up the firefox gl debugger when I have time. But to be honest, I don't have too much hope to find anything.
  5. Hey Raanan, just see those examples: left handed http://www.babylonjs-playground.com/#9U086#201 right handed http://www.babylonjs-playground.com/#9U086#200
  6. Hi guys, please forgive me, I was not sure if reporting this as a bug is really the best approach or if it should rather be an open discussion. From what I can see I expect that scene.useRightHandedSystem is just scaling everything as "x *=-1" This makes the feature rather impractical when text (on textures, basically) is involved in the scene. I was hoping so much for this setting to address an issue we have where in our ecosystem, babylonjs is the only component with a left handed coordinate system and requires offset translations for everything we draw... I may also have textures that show logos, which would then also be inverted. So my question is this: Is this the desired behavior of the feature? Playground (from someone else, just found it and flipped the coordinate system to make my point): http://www.babylonjs-playground.com/#9U086#120
  7. You made my day. And the next day, too. And the day after tomorrow. And all that within 10 minutes. Great, thanks
  8. Oh and this.sceneObjects.sunLight is a directional light
  9. Hi guys, I recently started with some visual fidelity stuff in my scene and I wanted to add shadows. Now, I load a mesh that I exported from blender and I do this BABYLON.SceneLoader.ImportMesh("", "lib/orteclbvis/themes/defaulttheme/models/","yard.babylon", this.scene, (newMeshes, ParticleSystem, skeletons ) => { newMeshes[0].rotate(BABYLON.Axis.Y, BABYLON.Tools.ToRadians(180), BABYLON.Space.LOCAL); newMeshes[0].position.y = this.getEnvironmentHeight(); newMeshes[0].position.z = 0; newMeshes[0].position.x = 30000; if(this.sceneObjects.sunLight) { var shadowGenerator = new BABYLON.ShadowGenerator(1024*16, this.sceneObjects.sunLight); shadowGenerator.setDarkness(.3); SceneManagerHelper.enableMeshShadowsRecursively( <BABYLON.Mesh[]>newMeshes, shadowGenerator); } }); // recursive shadow enabler method code: static enableMeshShadowsRecursively(meshes : BABYLON.Mesh[], shadowGenerator : BABYLON.ShadowGenerator) { for(var i = 0; i < meshes.length; i++) { var m = meshes[i]; shadowGenerator.getShadowMap().renderList.push(m); m.receiveShadows = true; var childs = m.getChildMeshes(); if(childs && childs.length > 0) { this.enableMeshShadowsRecursively(<BABYLON.Mesh[]>childs, shadowGenerator); } } } } And my shadows are weirdly offset. See attached images. Any idea how that can happen? My scene scale is quiet big (1 babylon unit = 1mm)
  10. http://www.babylonjs-playground.com/indexstable#43BR33#5 worked days ago, also still works on stable but doesn't work correctly in latest
  11. Hello everyone, I started programming motion calculation to get into math and physics a little deeper again. I know that my problems have already been solved by other people around the globe every day, but I don't want to use the simple approach with a physics engine for now. I want to understand how things work. So. Here is my problem: I have an entity with mass and velocity and it is currently heading 0. Now, I apply a side force (centripetal force). It might come from any angle. My current implementation uses a standard centripetal force calculation using a circle, where I get the radius from mass and velocity and can tell where my new point is, given the amount of time that has passed between two frames. Yet, in theory, that is not the correct calculation, if we delete the time aspect. Why? because my force direction is absolute. I am not in a car where I apply angle to wheels so I would go in a circle forever. I want to go e. g. to 90deg while currently, I am heading to 0. The centripetal force calculation with the circle only works approximately and while we assume that the framerate is high enough so we don't slip through the 90° point (because e. g. at 89, where the centripetal force amount is only 1deg, if enough time passes, the next point in the circle could be more than 90deg relative to the starting point where the force was initially applied). It could then potentially go back and forth a little. So what I would need is a spline that is correct at the current time and then I can set the relative time that has passed and that gives me a new point where I am. Of course, when my angle changes, I need a new spline. But as long as no parameters are changed, I need to have a calculated spline on which I can move. But silly me, I did only do middle school and I have never been in touch with such calculations. Can someone help me with that? I hope my problem is clear. See the attached screenshot.
  12. Hello everyone, I started working on a game. Those of you who can remember Soviet Strike/Nuclear Strike can take this as reference regarding what I am going for with my helicopter controls. I'm not that much of a physics / math pro and so I started thinking about how I can model the behavior of a helicopter where my assumption is that its height over the surface is not controllable but instead is automatically adjusted when moving across the game world. My current idea is to model the helicopter behavior with the inertia of a sphere that moves on a flat surface and I apply force to it into the direction that the keyboard/controller input goes. Do you guys have other ideas? I am working with babylon.js and I know there are physics engines like Oimo. Can I take built in stuff for what I want to do?
  13. great starting point, thank you very much
  14. Hi, I would like to have a silhouette effect around a mesh, comparable to the targeting help of diablo 3 (see the attached, unfortunately low-res screenshot). I know that there are properties for that in babylon.js but they don't work that well with my scenario. The mesh has several submeshes and I really only want to have a single outline that might be the result of evaluating child mesh geometry edges. It would be great if you guys could lead me into the correct direction for solving that problem since such a visualization could greatly enhance the UX in my app. Regards Jacques EDIT: I should maybe clarify something: It's not submeshes but rather a hierarchy of children, so child meshes. Some of them might be merged meshes with complex geometry.
  15. Hi, I need to implement a check that can determine if a bounding box is completely inside a set of bounding boxes. See my attached graphic for a better understanding of the situation. I am thinking of consuming the A to B paths on each axis of the original bounding box using the axes limits of the containing bounding boxes. Then, for each axis, I would store those in an array, sort them by starting point, find if there are overlaps, eliminate them, find gaps (could probably happen if outer bounding boxes are not adjacent to each other) and if none are there, look if the total length is the length of the object bounding box. If this is the truth for every axis, then I can be sure that the item is completely inside the valid area. The only thing I am worried about is that this can become quiet slow. Since this is usually an edge case, I would first go through all container bounding boxes and see if the object is completely inside one of them. Only if that is not true, I need to do the more complex check. Any ideas on different, maybe faster algorithms? Regards Jacques