satguru

Members
  • Content Count

    366
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by satguru

  1. @gryff Please note I am only loading the mesh and skeleton from the file created by the Blender exporter. I am using the "BABYLON.SceneLoader.ImportMesh(..)" function rather than "BABYLON.SceneLoader.Load(..)" or "BABYLON.SceneLoader.Append(..)". In other words I am ignoring lights, shadow setting etc in the file. Light and shadows are being set in the code.
  2. @gryff Sure. No hurry. Setting "shadowGenerator.bias = -0.3" solves my problem for now. I will also keep looking. Thx
  3. @gryff It's a single mesh. Attached is the blend file, if it helps. vincent.blend
  4. @Deltakosh Yes " shadowGenerator.bias = -0.3;" works. is setting shadowGenerator.bias to a negative value "normal" ? or is this a workaround? what is it in the skeleton which results in this? Can I set the bones differently?
  5. If it helps, this problem started due to some code change after 06/19/2017. I have a babylon.js file from that day and it works fine.
  6. I am loading a mesh from a babylon file The mesh has a skeleton. The shadow casted by it is not proper. See file "with_skel.jpg" to check the shadow casted. Now if i remove the skeleton by doing mesh.skeleton=null; The shadow is proper. See file "without_skel.jpg" I was able to reproduce the issue in playground but wasn't able to save the code. I got the error message "file too big" when trying to save. The code is a little large as it has an embedded scene file. So I have attached the code here. See file "playground_code,txt" Copy the code to playground to check. comment on/off line 44 to see the issue playground_code.txt
  7. See if this helps. https://ssatguru.github.io/Vishva.ts/public_html/ A third person camera keys "a" and "d" rotates the character left and right , in other words rotates the character around y axis and the camera seems to follow. I say seem because that is not quite true. It is not the camera which follows the character but the character which follows the camera Rotate the camera and then rotate the character based on the camera rotation Here's the code https://github.com/ssatguru/Vishva.ts/blob/master/src/ts/component/CharacterControl.ts Here are the lines for rotation https://github.com/ssatguru/Vishva.ts/blob/master/src/ts/component/CharacterControl.ts#L262
  8. @Wingnut You are right. Setting position of a mesh after adding phyiscsimposter creates an issue. So in the following example (cleaned up a little bit) https://www.babylonjs-playground.com/#1RKZXB#78 if we comment out line 3 and uncomment in line 12, we see the issue. But if instead of constructor, were we to use setParam() to set the parms then setting the position before or after does not matter. So using setParam() seems to be a better approach for now
  9. Don't think the "explode" was because of overlap. Even with 1 box you have the same issue. Has to do with the way parms are set. uncomment line 37 and comment out lines 39 to 42 and you will see that the explode happens again. Yes, I see your point about flatshaded.
  10. found a fix for my issue I was doing "grnd.freezeWorldMatrix();" before creating the HeightmapImpostor Moving that after creating the HeightmapImpostor fixed the issue see https://www.babylonjs-playground.com/#97B3B7#9 notice lines 44 and 49. As an aside I should have created box after creating ground but it works anyway for this example, so ok
  11. @Raggar, @Wingnut, @Deltakosh, @RaananW Found something else. I noticed in @Wingnut original example https://www.babylonjs-playground.com/#1RKZXB#45 all boxes with box/sphere imposters had some rotational/linear velocity when they were created. In my example they did not. I then noticed that I was setting friction and restitution parameters differently from @Wingnut I was setting them using the setParam() method whereas @Wingnut was setting them in the constructor. I rewrote @Wingnut example redoing the way the params are set. see https://www.babylonjs-playground.com/#1RKZXB#72 notice lines 37-42. Works as expected. So the constructor stuff needs to be looked into. Of course the problem of box sinking into the ground, as shown by my example, still needs to be looked into.
  12. BABYLON.PhysicsImpostor.HeightmapImpostor doesn't seem to be working properly. See this PG https://www.babylonjs-playground.com/#97B3B7#7 Here I am dropping a box to the ground. The box drops, halts below the ground, turns and continues dropping below the ground
  13. @JCPalmer I mostly use NetBeans, both at work (Java) and at home (TypeScript). Use NetBeans typescript plugin a lot. Has worked pretty well for me. Use Visual Code too from time to time. Light weight and fast. Not a big fan of Eclipse. Haven't used Python a lot, would like to though, if nothing else then just to do more Blender programming. Good support for npm and gulp in NetBeans too. Prefer npm over gulp for my builds. Keeps things simple How to Use npm as a Build Tool
  14. how about VRDeviceOrientationArcRotateCamera ? http://doc.babylonjs.com/classes/2.5/vrdeviceorientationarcrotatecamera
  15. @Ridge Batty can you share your blend file?
  16. @Borislav To make the camera follow the character use camera.target camera.target = character.position. I am in the process of writing a character controller. Does gravity, animation etc. You can see the code here https://github.com/ssatguru/Vishva.ts/tree/master/src/ts/component and you can see it in action here https://ssatguru.github.io/Vishva.ts/public_html/ About a week more to finish it off
  17. @Ridge Batty I use Action library. Few things which I found helpful 1) The last action in the action editor should be the rest pose ( I normally use a t-pose as the rest pose). To position an action as the last action in the action editor, name it something starting with "z". The actions are sorted by name, alphabetically 2) Just before you export make sure the action in effect , in other words the action chosen in the action editor, is this last , rest pose action. 3) If the action name has a dash ("-") in it then it is ignored by the exporter. So for example if you call your action "my-action" it will be ignored. 4) in the babylon scene I find that the animation range "from" value is off by one. So after I load the file into my scene, I increment the "from" value of each animation range by one. I am using 5.3-beta exporter.
  18. satguru

    [solved] CYOS down?

    yep, working now.
  19. satguru

    [solved] CYOS down?

    http://cyos.babylonjs.com/ seems to be down. get 404 on https://www.babylonjs.com/babylon.js
  20. New Release 2.3.0 (06/05/2017) Changes migrated from Java to TypeScript rewrote picking process to make the control snappier added transforms in planes added scale snap changed UI - hopefully more intuitive now Documentation: https://ssatguru.github.io/BabylonJS-EditControl/ Demo: https://ssatguru.github.io/BabylonJS-EditControl/demo Download: https://github.com/ssatguru/BabylonJS-EditControl/releases
  21. @Spankied If you are referring to Vishva then it is more like open-sim but at a much smaller scale @DigiHz Data Yes I have changed the code. It is isScalingEnabled() now. Good luck with OS desktop
  22. FYI I have updated the EditControl. I have changed It to use pivotpoint rather than absoluteposition. This is based on some discussions here Also to get rotation values back in euler you can set editControl.returnEuler(true);
  23. @JohnK I think you are right regards "Its position is the position of the pivot whereas its absolute position is its position of its original centre" I did some more testing and this is what I found. Somebody let me know if I got anything wrong. I was wrong to equate the mesh origin point to mesh pivot point. They are different. The mesh origin point is located at the origin of the mesh local frame of reference. Its location in the mesh is fixed and cannot be changed(?) The mesh pivot point is also located at the origin of the mesh local frame of reference. But, unlike origin point, its location can be changed. It can be changed using a. mesh.setPivotPoint(vector3, space) b. mesh.setPivotMatrix(matrix) I am assuming with setPivotMatrix(), in addition to changing location, we can also change the rotation of the pivot axes(?) To get the pivot point location we can use a. mesh.getPivotPosition() - will return position relative to mesh origin (not mesh parent) b. mesh.getAbsolutePivotPosition() - will return position relative to world origin. Now the location of the mesh itself is always (?) set using the mesh pivot point rather than the mesh origin point. There are two ways we can set the location of the mesh a. mesh.position = Vector3 b. mesh.setAbsolutePosition(Vectors3) The first moves the mesh so that its pivot point is located at the given position relative to the mesh's parent The second moves the mesh so that its pivot point is located at the given position relative to the world origin. Note: a. there is no mesh.setPosition() b. there is no mesh.absolutePosition = Vector3 To get the mesh location we can use a. mesh.position b. mesh.getPositionExpressedInLocalSpace() c. mesh.absolutePosition d. mesh.getAbsolutePosition() The first two returns the location relative to the mesh's parent. The last two returns the location relative to the world origin BUT the location they return is the location of the mesh based on the mesh origin point rather than the mesh pivot point. This is confusing because "mesh.setAbsolutePosition(Vectors3)" sets the location using the mesh pivot point BUT "mesh.getAbsolutePosition()" gets the location using the mesh origin point This, thus, also explains why, even when the mesh does not have any parent, its "postion" is different form its "absolutePosition". The mesh "position" is its location based on its pivot point The mesh "absolutePosition" is its location based on its origin point. !! Of course the "position" and "getPivotAbsolutePosition()" will be the same in case of no parent.