GameMonetize Posted March 18, 2014 Author Share Posted March 18, 2014 Sounds good Understood your ask! gwenael 1 Link to comment Share on other sites More sharing options...
gwenael Posted March 18, 2014 Share Posted March 18, 2014 I don't know how parenting would be handled since a mesh could be parent of a box or a box could be parent of a mesh so when the box would be imported (if boxes are imported before meshes) its parent wouldn't exist yet in the scene but I guess this possible issue is already solved since that's the same case for cameras and meshes. What about this? Link to comment Share on other sites More sharing options...
GameMonetize Posted March 19, 2014 Author Share Posted March 19, 2014 I already handle that for cameras, lights and so on, so this is not a problem. I saved a _parentToCheck and after loading everything I check objects with this property Link to comment Share on other sites More sharing options...
gwenael Posted March 19, 2014 Share Posted March 19, 2014 (edited) Perfect. So don't worry about my request, I will add the feature. When I start working on it, I'll contact you to agree on .babylon file format. Edit: Donehttps://github.com/BabylonJS/Babylon.js/pull/192https://github.com/BabylonJS/Babylon.js/wiki/Babylon.js-file-format Edited May 15, 2014 by gwenael Link to comment Share on other sites More sharing options...
Dad72 Posted March 21, 2014 Share Posted March 21, 2014 I would like to have a 'tags' property on meshes. Its value would be a list of tags (words) separated by spaces like CSS classes in HTML. It's a way to categorize/group meshes so you could get all meshes that have a specific tag like you would do to select DOM elements according to their classes. You could exclude from a light all meshes which have the tag "notLightedByLight1" (for example). myMesh.tags= "notLightedByLight1 character hero"; Link to comment Share on other sites More sharing options...
AlbertoBonn Posted March 25, 2014 Share Posted March 25, 2014 2600 FREE bvh fileshttp://mocap.cs.cmu.edu/ babylon dev team, please integrate.bvh support to handle meshes with bones (bvh)For example:BABYLON.bvh.constrain(mesh, bendingStiffness[array], tolerance, scene) benoit-1842 1 Link to comment Share on other sites More sharing options...
Mick Posted April 3, 2014 Share Posted April 3, 2014 Hi everyone, I suggest a new way to manage cameras. Currently, BabylonJS manage camera by type:ArcRotateCameraFreeCameraOculusCamera...But if you want to use Oculus with an ArcRotateCamera, you need to develop it.So, I propose to create an united camera where you can add some components, like in the Game Engine Unity3d. A component is a behavior for the camera, a camera could have multiple kinds of components. (Oculus, Anaglyph, Stereoscopie, FreeCamera, ArcRotate, Touch...) What do you think of this proposal ? Is it consistent with the roadmap of BabylonJS ? Best Link to comment Share on other sites More sharing options...
gwenael Posted April 4, 2014 Share Posted April 4, 2014 I would like to have a 'tags' property on meshes. Its value would be a list of tags (words) separated by spaces like CSS classes in HTML. It's a way to categorize/group meshes so you could get all meshes that have a specific tag like you would do to select DOM elements according to their classes. You could exclude from a light all meshes which have the tag "notLightedByLight1" (for example). myMesh.tags= "notLightedByLight1 character hero"; https://github.com/BabylonJS/Babylon.js/pull/170 Link to comment Share on other sites More sharing options...
Dad72 Posted April 4, 2014 Share Posted April 4, 2014 I do not see the babylon.tags.js class in Babylon/Tools/. I would prefer this:http://www.html5game...object/?p=30974 Link to comment Share on other sites More sharing options...
gwenael Posted April 4, 2014 Share Posted April 4, 2014 (edited) I do not see the babylon.tags.js class in Babylon/Tools/. I would prefer this:http://www.html5game...object/?p=30974 It's a pull-request that hasn't be merged yet but you can test it by pulling from my fork. Edit: It has been merged Edited May 15, 2014 by gwenael Link to comment Share on other sites More sharing options...
Dad72 Posted April 4, 2014 Share Posted April 4, 2014 Ah, ok. And for this. It would not be simpler to use.http://www.html5game...object/?p=30974 Link to comment Share on other sites More sharing options...
gwenael Posted April 4, 2014 Share Posted April 4, 2014 From: https://github.com/gwenael-hagenmuller/Babylon.js/blob/tags/Babylon/babylon.scene.jsBABYLON.Scene.prototype.getMeshesByTags = function (tagsQuery) { var meshes = this.meshes; if (tagsQuery === undefined) { // returns all meshes (could be done with BABYLON.Tags.MatchesQuery but no need to have a for-loop here) return meshes; } var meshesByTags = []; for (var i in meshes) { var mesh = meshes[i]; if (BABYLON.Tags.MatchesQuery(mesh, tagsQuery)) { meshesByTags.push(mesh); } } return meshesByTags; };I use BABYLON.Tags.MatchesQuery that I added too to be able to look for meshes matching more sophisticated query such as:scene.getMeshesByTag("(tag1 && !tag2) || !tag3"); Dad72 1 Link to comment Share on other sites More sharing options...
Dad72 Posted April 4, 2014 Share Posted April 4, 2014 This is perfect. Thank you Gwenael gwenael 1 Link to comment Share on other sites More sharing options...
Wingnut Posted April 7, 2014 Share Posted April 7, 2014 @gwenael, this is off-topic, but, why do you use 'var' in .... for (var i in meshes) ? Is that the 'more proper' way? (thx) I think I should have used a PM for this. Lots will read this and be disappointed. Sorry. Link to comment Share on other sites More sharing options...
gwenael Posted April 8, 2014 Share Posted April 8, 2014 @Wingnut: answer is here: http://www.html5gamedevs.com/topic/4961-user-data-in-mesh-object/?p=33197 Link to comment Share on other sites More sharing options...
csakbalint Posted April 23, 2014 Share Posted April 23, 2014 I'd like a simple thing: better documentation.This feature will improve the usefulness of the project a lot. I guarentee it.It's ok, there are no description of the class methods, but don't know, what is the type of a parameter? It's a bit disappointed. Link to comment Share on other sites More sharing options...
gwenael Posted April 23, 2014 Share Posted April 23, 2014 @csakbalint, you may like the last sentence of http://www.html5gamedevs.com/topic/5759-exemple-tutoriel-for-new-version/?p=34671 Link to comment Share on other sites More sharing options...
csakbalint Posted April 23, 2014 Share Posted April 23, 2014 @gwenael, thanks the information, i appreciate it. gwenael 1 Link to comment Share on other sites More sharing options...
nithiz Posted May 9, 2014 Share Posted May 9, 2014 I would really like to see the physics work with a heightmap. I don't really see the point in having a heightmap without the collision detection. I simply can't proceed working on my game because of this problem.. Link to comment Share on other sites More sharing options...
Dad72 Posted May 9, 2014 Share Posted May 9, 2014 I would really like to see the physics work with a heightmap. I don't really see the point in having a heightmap without the collision detection. I simply can't proceed working on my game because of this problem.. Same for me. but if a person is able to make a plugin to add Oimo.js or Ammo.js, we will be able to have a more complete physical to make real game. I hope someone will do, but I doubt because of the complexity. Link to comment Share on other sites More sharing options...
kolar Posted May 13, 2014 Share Posted May 13, 2014 Asset manager.Example: http://jsfiddle.net/kolar/gPt7U/2/, every time when some particular model is imported babylon creates new texture/mesh/skeleton etc. So each application which is something more than static scene needs some kind of asset manager to avoid unnecessary memory and bandwidth consumption. There is also no way to simply remove everything loaded by ImportMesh. Each time I want to clean up I have to remove separately texture/mesh/skeleton. Doing such things manualy is stright way to memory leaks and strange bugs.It will be nice if I can write something as high level as:var A = assetManager.load("ModelA.babylon");var B = assetManager.load("ModelB.babylon");//if both A and B use the same texture, the texture should be loaded and kept only once assetManager.remove(A);//removes all textures/meshes/animations used by A but only if they are not used by B (reference counting)var C = B.clone(); Second wish: no lag during model loading.As you can see in example above, during model loading other animations start lagging even if mesh is rather small (~1000 vertices). Maybe it is possible to parse models in several steps or on web worker to gain more smooth experience? dbawel 1 Link to comment Share on other sites More sharing options...
GameMonetize Posted May 14, 2014 Author Share Posted May 14, 2014 I have no lag on my computer. This is extremely dependent on your driver. BTW I like the assetManager idea! Link to comment Share on other sites More sharing options...
kolar Posted May 20, 2014 Share Posted May 20, 2014 Custom functions for starting direction, particle velocity etc. in particle effects system. Example: I found it impossible to obtain 'nova effect' in current particle system implementiation. What do I mean by 'nova effect' you can see here: http://jsfiddle.net/kolar/gPt7U/9/ (I have changed BABYLON.ParticleSystem.prototype._update function). Particle system would be much more powerful if I can define custom function for ie. starting direction:particleSystem.startDirFunc = function(){ var r = Math.random()*Math.PI*2; return { x: Math.sin(r), y: 0, z: Math.cos(r) }} Link to comment Share on other sites More sharing options...
GameMonetize Posted May 20, 2014 Author Share Posted May 20, 2014 Love the idea!!! I updated the 1.12 (on github) to add two functions on ParticleSystem. By default these functions are the following: this.startDirectionFunction = function (emitPower, worldMatrix, directionToUpdate) { var randX = randomNumber(_this.direction1.x, _this.direction2.x); var randY = randomNumber(_this.direction1.y, _this.direction2.y); var randZ = randomNumber(_this.direction1.z, _this.direction2.z); BABYLON.Vector3.TransformNormalFromFloatsToRef(randX * emitPower, randY * emitPower, randZ * emitPower, worldMatrix, directionToUpdate); }; this.startPositionFunction = function (worldMatrix, positionToUpdate) { var randX = randomNumber(_this.minEmitBox.x, _this.maxEmitBox.x); var randY = randomNumber(_this.minEmitBox.y, _this.maxEmitBox.y); var randZ = randomNumber(_this.minEmitBox.z, _this.maxEmitBox.z); BABYLON.Vector3.TransformCoordinatesFromFloatsToRef(randX, randY, randZ, worldMatrix, positionToUpdate); };Feel free to change them! Link to comment Share on other sites More sharing options...
davrous Posted May 21, 2014 Share Posted May 21, 2014 I would really like to see the physics work with a heightmap. I don't really see the point in having a heightmap without the collision detection. I simply can't proceed working on my game because of this problem.. Unfortunately, we're falling into JavaScript mono-threading nature limitation here. Heightmap is generating a lot of geometries. Testing against every one of them is done on the CPU on a unique thread which is not optimized at all. Even webworkers won't help a lot. Maybe using another physics engine could help a little. We'll try to discuss on possible optimizations in one of our future weekly babylon.js team conf-call. Link to comment Share on other sites More sharing options...
Recommended Posts