Jump to content

What do you want in Babylon.js - http://babylonjs.uservoice.com


GameMonetize
 Share

Recommended Posts

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

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

  • 2 weeks later...

Hi everyone,

 

I suggest a new way to manage cameras.

 

Currently, BabylonJS manage camera by type:

  • ArcRotateCamera
  • FreeCamera
  • OculusCamera
  • ...
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

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

From: https://github.com/gwenael-hagenmuller/Babylon.js/blob/tags/Babylon/babylon.scene.js

BABYLON.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");
Link to comment
Share on other sites

@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

  • 2 weeks later...

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

  • 3 weeks later...

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

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

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?

Link to comment
Share on other sites

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

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

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

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...