Jump to content

Announcing a new Babylon JS editor project


DigiHz Data
 Share

Recommended Posts

Hello everyone.

This is my first posting.

I am working on a Babylon JS editor, (v1.0 Alpha), so don't expect to much yet :)

The editor can be tested at http://www.meet-now.org/babylonjseditor/

 

(INFO:double click on a mesh, camera or light, (or right click))

 

Looking forward to responses from you all.

 

 

Link to comment
Share on other sites

DB:

Yes i am a no quiter, and i do this project for that reason to (For making more people learn Babylon JS the more easy way, and in a more fun way).

I am not an expert in deep coding of javaxcript, and i started learn about Babylon 1 month ago.

I am going to require some help and ideas from all of you here.

Link to comment
Share on other sites

Editor is updated!

http://www.meet-now.org/babylonjseditor/

 

2015-10-16:

Added a file browser into the editor.
Added confirmation request if scene to append has been appended before.
Added confirmation request if imported meshes has been imported before.
Added my own window GUI (Not to use jquery's dialogs anymore).
Editors verion number is now v1.0.1 Alpha.
Link to comment
Share on other sites

I am soon about to release v1.0.2 Alpha of the editor. But i have to clean up my code a bit and a have a few questions.

 

1. Can someone explain to me WHY there is only the ability to use 4 lights at the same time?

Is it a restriction in the BJS material? Or is it an webGL limitation? I really need to know this so that i can put the right information in my coming documentation.

(I read somewhere about self emitting meshes....Is that a way to add more virtual lightning to a scene if we want more than 4 lights at the same time in a scene?)

 

2.When lights are appended into a scene, the rotation is not in the exported BJS file from Blender. Is the rotation of light not yet built into the Blender exporter?

 

And to all you that are testing my editor.....PLZ report bugs to me here in this forum.

 

And i would be happy if people could make some SIMPLE scenes with texures on the meshes, so i have a bit to test. I am a beginner my self at blender.

(Keep in mind that the texture should be in the same folder as the scene/mesh)

 

Thx in forehand.

Link to comment
Share on other sites

Hi again, DD!  Ok, I want to address only #1.  Did you search the forum for "four lights"?  That will find you a small pile of returns about this subject.

 

This topic seems like a nice start:  http://www.html5gamedevs.com/topic/8046-more-than-four-lights-any-developments/

This looks okay, too:  http://www.html5gamedevs.com/topic/8435-lights-per-mesh/

 

Let's take a look at a slightly-modified Playground demo where Deltakosh introduced his new "soft shadows" feature... which included spotlights casting shadows for the first time ever.  Previous to this, they could not.  http://www.babylonjs-playground.com/#2FNT2E#2

 

There are some interesting things to be seen/scene in there.  First, there are 8 lights.  Nice.  There are 14 grounds!   Wowzers!   What the heck is going-on in there, huh?

 

By the looks of things, the situation might be "four lights per mesh", eh?  But you know those darned BJS lights... they shine-on forever, distance-wise.  So you can use light.excludedMeshes to make sure a light doesn't spew its lums in unwanted places.  And there's light.includedOnlyMeshes,  too, according to the docs.

 

Ok then, that's all I know... and I'm not real sure if I'm mentally cohesive whatsoever.  :D  Keep in mind that material.emissiveColor and .emissiveTexture can light an object without needing a light.  And if you set material.ambientColor or .ambientTexture, then scene.ambientColor will affect the mesh final color/lighting. 

 

And and and...  you can set vertexData colorKind onto the mesh without using a material, and that's something, too.   The fun never ends!  :)

 

I don't think I was helpful at all.  I probably sucked a bunch of time and life-force from folks who read this, and they'll never get it back again.  heh.  And I have a sentence about lights in the Babylon Primer which is just plain misleading and wrong.  Hey, I had a higher puppy quotient back then.  :)  I'll fix it soon, as soon as I get a GitHub-coping gameplan.

Link to comment
Share on other sites

Hi Wingnut.

Yes, i have been looking google and the documentation and this forum about information about the 4 lights issue, but it is not well explained. (Thats my thinking)

 

Thank you for explaining to me. I am a beginner in BJS, so it is a bit advanced for me yet with what you tell me.

Will get back about this in a later stage.

 

I impemented a warning in the lights tab for now if there are more than 4 enabled lights in the scene. (in my coming release v1.0.2 Alpha)

 

My second question might be best for RaananW to answer i think.

Link to comment
Share on other sites

Hi again!

 

   Yeah, I agree.  Not well-explained.  Another way to think about...

 

Pretend 8 pointLights... illuminating one (1) mesh in a scene.   Only the 4 latest-created lights (found in scene.lights)... will be used on that mesh.

 

The real issue here is... Babylon lights shine on everything, and not even walls and shadows can stop them.  You might build a landscape, a building, a room, and you'll put up a Sun, and then some street lights, and a general room light.  ALL THREE LAYERS of lights are still shining on your mesh... even if it is in the cellar in a vault.  Babylon lights are powerful.  :)

 

So, a user tries to put two spotlights on their mesh in the vault in the cellar... and one of them does not turn-ON.  Why?  It's the 5th light on that mesh.  No go. The user forgot to exclude the mesh from the Sun's rays... which are blasting right through the walls of the building and vault.  Wild, eh?

 

But I could be wrong.  I'm fairly incompetent.  heh.

 

#2 -  Maybe try setting "export quaternions" choice on the exporter panel.  No promises.  :)

Link to comment
Share on other sites

About issue "2.

I finally found out that it is not rotation, but direction that is used when importing a light :)

(Applies to SpotLight, HemisphericLight and DirectionalLight )(NOT applied  to PointLight ,PointLight not have any direction :) )

 

I think i got it working now!

 

EDIT:

I did NOT get it working :(

It seams impossible to have a pseudo mesh as parent to a spotlight (position is ok yes, but rotation /direction does not really work).

var spotLight_mesh = BABYLON.Mesh.CreateCylinder("spotLight_mesh", 2, 0, 2, 16, scene);

 

I tried and tried to get it working, but no luck, so i have to rethink about how to show the lights in the scene in a good way.

I will move/rotate the light and pseudo mesh instead together, not use parent. (but the pseudo mesh will NOT show the direction of light).

 

Well, i am not a quitter, so just bare with me.

Link to comment
Share on other sites

  • 2 weeks later...

Updated the editor to v1.0.2 Alpha

http://www.meet-now.org/babylonjseditor/

 

Read the change log for what has been changed/added/removed.

 

I will be continue with some material inplementation.

And prepare a structure for projects. (will require user login of course once it is implemented)

 

I am still not happy about the direction command in BJS about lights, it would have been so much easyer if the lights had rotation, but now it is what it is.

I think i will need a transformation code (angle to direction/ direction to angle) Feel free to help me out with this issue.

Link to comment
Share on other sites

  • 3 weeks later...

Hello everyone. Been a while, but i have been busy working on the editor.

 

Editor is updated!(v1.0.3 Alpha)

http://www.meet-now.org/babylonjseditor/

 

Plz report bugs to me in the forum that you find.

And plz give me feedback about this project.....What is wrong? What is good? What is bad? and so on.

 

When you test the mansion in the samples-master directory......That scenes camera seams to only function in firefox for some reason when you are in Scene camera mode.(i think that the version  of mansion on the web is not the same as in the samples-master directory).

And you not hear sounds in IE, IE not support mp3 :(

 

I am working on compression functionality for the .babylon files now. That will be needed in the editor, because it is not all servers that can handle for example 70 Mb upload .(And it will save bandwidth overall to use compression, let the client computer do the work ;) )

I did a test of this compressor: http://pieroxy.net/blog/pages/lz-string/index.html

Compressing heart.babylon (10.87 Mb) took 28 seconds on my computer and came down to a size of 1.45 Mb.

Uncompressing it took 3.8 seconds

I might find a zip/unxip to use instead, not sure about what compressor to use yet.

Link to comment
Share on other sites

Hi,

 

You can do something like this for audio compatibility with different browsers, so IE.
 

var audio = new Audio(), ogg = false, mp3 = false;if(audio.canPlayType("audio/ogg") != "") { // ogg    ogg = true;} else if(audio.canPlayType("audio/mpeg") != "") { // mp3    mp3 = true;}if(mp3) //use sound mp3else //use sound ogg

 
Have you seen my CastorEngine project which is also multilingual editor open source. I am also search of testers, but I think the Babylonians does not use editors. It is not easy to get feedback.

Link to comment
Share on other sites

Hi Dad.

I know about how to do the compatibility about sounds and video in different browsers.

I just wanted to inform the testers that there are mp3 and not ogg in the samples-master directory.

 

But thank you for that feedback.

 

I do know about your CastorEngine, but i have not tested it yet.

Is it online or only for using on a local computer? Would love to test it if it is online.

 

Babylonians will use editors......When there are editors that suites them.

Link to comment
Share on other sites

Hello everyone.

 

I would like to know who of you that are interested in being active alpha testers for my project.

The next version will require login for full functionality.

 

So the serious ones of you will have a account in the database i use for the project.

 

Send me a private pm here,  and i will give you account information back through pm.

(the login will require a email adress and a password).

 

It will take some time before the next version will come.

Thanx in advance.

 

NOBODY?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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