Quantcast
Channel: Babylon.js
Viewing all 388 articles
Browse latest View live

camera rotation not exported from max exporter?

$
0
0

I'm trying to import an animated camera from max. But I only get the position keyframes.

Is it correct that the exporter doesn't export rotation for the camera? Or is it the importer?

Or is it me?

 

I'm simply loading like this:

BABYLON.SceneLoader.Load("assets/", "myscene.babylon", this.engine, function(scene) {

...

}

 

I hope it's possible..


Creating fun & immersive audio experiences with Web Audio

$
0
0

Hi,

 

 I’ve written an article dumping almost everything I know about Web Audio and what I’ve learned while writing the audio stack of Babylon.js: Creating fun & immersive audio experiences with Web Audio. I’m also explaining how we’ve built the Music Lounge demo being hosted on the MS Edge dev site.

 

 It also turns out to be the best up-to-date documentation on our audio stack (I'm talking about the new audio streaming feature for instance). 

 

 Enjoy!

 

Bye,

 

David

Attached Thumbnails

  • 7853.Picture2_7055E5CA.png
  • 0552.Create-fun--immersive-audio-experiences-with-Web-Audio-01_thumb_018BA6AD.png

ShaderMaterial

$
0
0

I'm trying to construct a custom mesh using ShaderMaterial porting some code from three.js.

In the example I'm copying though, since the shape is only 2d, they save performance by making the vertex positions in a vec2 buffer instead of vec3 and they don't use any indices at all (it just uses gl.TRIANGLE calls to make each set of 3 verts into a triangle.

The problem I am having is that if I don't do setVerticesData with the full vec3 vertices and then setIndices with a list of indices, Babylon doesn't seem to draw anything.

 

Is there some way to do these kind of tricks without having to fill in all the vertices and generate the indices manually?

 

Thanks!

clean scene disposal

$
0
0
Hi, I've got multiple scenes running in multiple views. Those views can be dynamically destroyed while new ones are created immediately afterwards (in The same logic flow, synchronously) I call scene dispose and also engine dispose, yet I get The too many webgl contexts warning (I think that was an exception in 2.1). I expect that to be due to my synchronous destroy/create but I did not find a disposed Event. Maybe I didn't look in The right spot. How can I ensure doing This The clean way?

babylon file size

$
0
0

Is there a limit to the size of a babylon file? I am in the 270MB range and it appears that the file is not loading. It is really large because there is a great deal of animation in the file. Have I reached the limit?

Skybox Textures Not Loading

$
0
0

I get a weird red/checkered background (see attached).

 

Thanks!

 

- Nick

Attached Thumbnails

  • Screenshot (202).png
  • skybox_nx.jpg
  • skybox_ny.jpg
  • skybox_nz.jpg
  • skybox_px.jpg
  • skybox_py.jpg
  • skybox_pz.jpg

test new scene

$
0
0

http://185.88.152.45

 

 

hi all please test this scene  and share fps  ( you must wait 30 sec for first load ) you can

 

move with arrow and 'w' 's' 'd' 'a'  up :'+' down:'-' and click

thanks 

 

shift  = speed

 

Can´t export from 3dsmax

$
0
0

Im using Max2Babylon-0.24 to export 3d models to babylonjs but I cannot get it to work.

When I select export and run, all I get is a black browserwindow 

 

Same if I manually try to import the generated babylonfile to a scene.

 

Ive tested with 3dsmax 2015 and 2016.

 

What am I missing?


Easy Shader Management

Problem with serialise for light.range

$
0
0

Hello,
 
When one does not inform the property range to all light and that it serializes the scene. you get a number => 1.7976931348623157e+308.
If I information this value "light.range = 1.8"  for example, it works well, the serialized value is correct but not the default value.
 
see line 1 in the console of playground :
 
{"autoClear":true,"clearColor":[0.2,0.2,0.3],"ambientColor":[0,0,0],"gravity":[0,-9.807,0],"lights":[{"name":"light1","id":"light1","tags":null,"type":3,"direction":[0,1,0],"groundColor":[0,0,0],"intensity":0.7,"range":1.7976931348623157e+308,"diffuse":
 
http://www.babylonjs-playground.com/#2EAMX1#3
 
Je pense que le fix serait:
 
this.range = parseFloat(Number.MAX_VALUE);
 
Ou directement mettre une valeur par défaut qui semble être 1.8 à chaque fois quand on arrondit tout sur 1.797...
 
this.range = 1.8;

Nuget package version of babylonjs

$
0
0

Hi,

 

Does the Nuget package version of BabylonJS has version of package the same as BabylonJS version ?

 

Because :

- package version is 2.2.0

- BabylonJS version in package is 2.3.0-alpha

How to set group for CASTORGUI.GUIRadio ?

$
0
0

Hi,

 

I want to set a group for CASTORGUI.GUIRadio, so that it will auto keeping only one radio button is been checked at any time.

 

How to do that? 

 

In addition, how to get check state (been checked or not ) of CASTORGUI.GUIRadio?

 

Thanks for your help?

CASTORGUI.GUISelect.addOptions

$
0
0

Hi,

 

I use CASTORGUI.GUISelect.addOptions() with this code:

 

        var sel = new CASTORGUI.GUISelect("testSel", { x: 5, y: 10, w: 200, h: 40 }, gui, { alert("click") }, false);
        for (var i = 0; i < 10; i++) {
            sel.addOptions("value", "text");  // ????  
        }
        mywin.add(sel);
 
But it seems not work.
 
However, it works without    sel.addOptions("value", "text");
 
How can I use this GUI control method?
 
Thanks for your help!

get frustum width and height?

$
0
0

hi all:)

 

how to get frustum`s width and height?

 

or

 

camera`s view range width and height?

 

 

3D fashion retail website

$
0
0

Here's an example of using Babylon.js for fashion retail.  Its fully-responsive and runs on mobile devices too.

 

http://www.punkoffice.com/retail/

 

Its part of my portfolio which I'm putting together to try and get some work.  That guy is just some Italian tourist who's staying at the beach here in Melbourne.

 


Performance - standardMaterial.isReady and scene.pick

$
0
0

Hi,

 

Two questions related to performance tuning:

 

1. I don't know what StandardMaterial.isReady does, but it seems to return early in various cases. What can I do to make my materials fall into those cases? This is usually the #1 most costly function in my game.

 

2. It appears that scene.pick gets called every onPointerMove, even though I'm not using picking or BJS's pointer support in any way. Can I prevent this?

 

In both cases the underlying problem is that v8 deoptimizes the functions, making them dog-slow. This may be fixable in and of itself, but I expect it would be a lot of work.

 

Thanks for any help...

 

Best Monster clothes ever

$
0
0

If only this were just a texture.  http://www.reynantemartinez.com/separation-anxiety.html

 

There are also Tutorials & Articles on this site, so thought someone might benefit.  I know I need to use Blender better.

 

BTW, could you make a texture that was clear in spots, & when curved around a mesh, let you see all the way though?

Modify mesh in a particular Viewport

$
0
0

Hi 

 

I am trying to develop very basic 2D car game. In the game I want to show a small map on top right side of the screen which is actually same track but with a zoomed out scene so that user can see what is coming ahead of the car. I was able to accomplish this but now my problem is in the zoomed out map car is very small mesh.

 

Is there any view where I can change size of a particular mesh(Car) and then create a view port

 

or can I change size of mesh(Car) in just one viewport. I am attaching screenshot of scenario and code by which I have implemented my existing code 

var camera1 = new BABYLON.FreeCamera("camera1",  new BABYLON.Vector3(0, 0, -8), scene);
camera.viewport = new BABYLON.Viewport(0, 0, 1, 1);
var camera2 = new BABYLON.FreeCamera("camera2",  new BABYLON.Vector3(0, 0, -50), scene);
camera2.viewport = new BABYLON.Viewport(0.8, 0.8, 0.2, 0.2);
scene.activeCameras.push(camera1);
scene.activeCameras.push(camera2);

forumscreenshot.jpg

Alpha rotations camera

$
0
0

Hi, i've been around for some time with no account. Had all my questions answered with existing topics.

 

Now, I'm developing an interactive globe/ world with babylon. Now, is it possible to calculate, return with some property to find the amount of rotations i did with the camera around my sphere/world? I need this to show labels (no babylon text, that's super ugly) on continents. Now I show them when i hit a certain alpha and beta.

 

Does anyone have an idea how to acomplish this?

 

 

Thanks in advance,

Dries

SPS Finished

Viewing all 388 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>