Leaderboard


Popular Content

Showing content with the highest reputation on 06/04/18 in all areas

  1. 2 points
    The Babylon field editor has gone into version 2.0 and is more stable. Many corrections, optimizations and improvements have been made. The interface has also undergone some small modifications with some patches. What you can do with the TerrainEditor : Create a new terrain with 5 sizes to choose from or load a recording. Rename or copy a loaded terrain or delete one. Create mountains or dig lakes, rivers. Smooth the terrain to soften your mountains or rivers. Raise trays rather than mountains. Paint up to 8 different diffuse textures for maximum terrain customization. (Thanks @Luaacro for the mixMaterial) Create ramps on the highlands or mountains to access your characters. Create holes in the ground to enter the basement, cellar / cellar ... Export the land in babylon format with all the textures used. An example file and html test is exported with. Export file meshes separate added in the terrain. Import and add meshes in the terrain Edit meshes with Inspector of properties Add water areas in the scene Add collision boxs in the terrain Add sound and music areas in the terrain Add portals in the terrain Each tool can be controlled to have more or less radius of your brush. You can choose the type of brush to have different shapes to paint textures. The brush is visible by a red allo on the floor following your mouse. Its radius defines what the brush will paint with precision. For texture paints, you can control the hardness and scale in addition to the radius of the brush. When raising mountains, you can control the maximum height limit of your mountains or the minimum limit if you dig. A grid allows you to see the sea level and is set to coordinate 0,0,0. This is useful when digging your rivers and lakes. You can save your work at any time and resume it on another day. When your field seems finished, you can export it for use in any project using the Babylon engine. Just take the hardware code of the export of the html file. I do not think that a publisher's documentation is necessary, but if you think you need it, leave me a message and I'll do one. But I think the editor is very easy to use. I hope this comprehensive field editor will help you. Do not hesitate to tell me if you have problems and tell me what you think, the improvements to make ... The publisher is open-source. You can download it on this repository The editor integrates a mini server to start it: https://bitbucket.org/JSbabylon/terraineditor/downloads/ Enjoy. Some screenshots:
  2. 2 points
    No problem, pleased I could help. It's always worth searching the playgrounds when you're stuck on something: https://doc.babylonjs.com/playground/
  3. 2 points
    B3L7

    Interactive Rectangle fill

    The closest I could get quickly was: function create () { var rect = new Phaser.Geom.Rectangle(250, 200, 300, 200); var graphics = this.add.graphics({ fillStyle: { color: 0x0000ff } }); graphics.fillRectShape(rect); graphics.setInteractive(rect, event); } function event() { console.log('over'); } But I couldn't find a simple way to check for pointerDown against the graphics object. I think it might just be faster to use a square image that you scale to the dimensions you want and check for clicks on that: https://labs.phaser.io/edit.html?src=src\input\mouse\click sprite.js
  4. 2 points
    enpu

    Hires & hidpi explanation / help

    Small addition to what @Ninjadoodle explained. hidpi setting affects any screen that has pixel ratio more than 1 (mobile, desktop etc) https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio So the setting just scales the canvas to match the screens physical pixels. And you are right, there is really no point to have hidpi turned off, so maybe i should change it's default value to true. I added this subject to my tutorials todo-list
  5. 2 points
    The Leftover

    Text as polygon mesh

    It seems like we have enough symbols done in Helvetica to issue a PR for Babylon Type (as I am calling it). https://www.babylonjs-playground.com/#XWVXN9#45 I probably need some coaching on conventions and maybe some mojo to issue a PR. I was gonna create a branch and put it in a separate subdirectory of https://github.com/BabylonJS/Extensions, called 'Type'. It was just going to be README and JavaScript. Similar repository at: https://github.com/briantbutton/BabylonType The plan is to support Helvetica (aka Arial) initially. Next, a Comic font. After that, I disappear mysteriously. (kidding!!)
  6. 2 points
    JohnK

    Demo with Ammo.js Physics Engine

    @RaananW you probably are well aware of the following information but in case you are not you may find what I have learned useful. Info on using BJS with Ammo Threejs demos with Ammo from this github
  7. 1 point
    dbawel

    Lamps on Babylon / Open Contest!

    @rodrix I don't see where you could improve your current lighting pipeline with the exception of integrating lighting specific shaders - which are generally highly complicated and computational. So unless you're not getting acceptable results, then I believe you've reached the practical lighting limits currently available. DB
  8. 1 point
    babbleon

    Animating ArcRotateCamera setTarget

    @promontis try this: function animateCameraTo(targetX, targetY, targetZ, locationX, locationY, locationZ, speed, frameCount) { var ease = new BABYLON.CubicEase(); ease.setEasingMode(BABYLON.EasingFunction.EASINGMODE_EASEINOUT); activCam = scene.activeCamera; cameraTarget = new BABYLON.Vector3(targetX + (Math.random() * (0.001 - 0.002) + 0.002), targetY, targetZ); cameraPosition = new BABYLON.Vector3(locationX, locationY, locationZ); BABYLON.Animation.CreateAndStartAnimation('at4', activCam, 'position', speed, frameCount, activCam.position, cameraPosition, 0, ease); BABYLON.Animation.CreateAndStartAnimation('at5', activCam, 'target', speed, frameCount, activCam.target, cameraTarget, 0, ease); }; I added the + random as the cam didn't move if the target was the same (I think that was the reason). This was adapted from one of @Wingnut's demo above.
  9. 1 point
    bghgary

    GLTF dont load material [SOLVED]

    I am a member of the 3d formats working group under Khronos and I'm not sure where you are getting this information. While there are some issues with consistency across tools, we are actively working on fixing them. That said, glTF is intended for runtime and not for interchange. It may or may not be the right fit for all situations.
  10. 1 point
    Wingnut

    The Wingnut Chronicles

    Hi gang! https://www.babylonjs-playground.com/#11NJQT#4 I'm working on a little teaching aid for layerMasks. (need to teach myself, first) I'm hoping to change the camera.layerMask... with button presses. Each button will show a different layer, that way. (in theory) But, I can't seem to get my menu buttons to be clickable (onPointerDownObservable). No clicks seen. hmm. The observers are "added late" in lines 164-194. Who has good eyes? Can anyone see where I'm screwing-up? Help welcome. (thx) I also don't know if all 8 bits are used for layerMasks, or just MSN. (most-significant nybble) (left 4 bits) LayerMask docs are a little unclear, on that. (more likely, Wingy's brain is a little unclear)
  11. 1 point
    Does this help you? https://www.babylonjs-playground.com/#0E2PG3#1 check the console.
  12. 1 point
    Nice work !! If somebody is having trouble starting the server then below might help 1) "TerrainEditor.exe" shortcut does not work. It points to "D:" drive. Instead of that click "PHPServeur\TerrainEditor.exe" 2) Modify " PHPServeur\home\us_config\us_user.ini" Change US_ROOTF_WWW = /TerrainEditor to US_ROOTF_WWW = ../ You might also want to change AP_PORT = 80 to a different port.
  13. 1 point
    @Bladetrick, thank you. I thought it was a web based thing!
  14. 1 point
    Hi @Bladetrick, may I ask - what is the UX you're using there with the tree?
  15. 1 point
    Hi @Bladetrick Best option for your is babylon js tags https://doc.babylonjs.com/resources/tags "Tags in babylon.js can be used to categorize/group elements, and helper functions are provided to retrieve/gather tagged elements."
  16. 1 point
    I am not sure why I am in this topic. BTW, there was a recent PR by @FunFetched to automatically create a .manifest file in the exporter. This will at least do this for you, and be more than just an empty file @dbawel. # Create or update .manifest file if self.scene.writeManifestFile: file_handler = open(self.filepathMinusExtension + '.babylon.manifest', 'w', encoding='utf8') file_handler.write('{\n') file_handler.write('\t"version" : ' + str(calendar.timegm(time.localtime())) + ',\n') file_handler.write('\t"enableSceneOffline" : true,\n') file_handler.write('\t"enableTextureOffline" : true\n') file_handler.write('}') file_handler.close(); You have to click the checkbox, since it is not done by default. I do not have anything to do the loading side.
  17. 1 point
    Luaacro

    Serialize ground probleme

    Fixed https://github.com/BabylonJS/Babylon.js/pull/4424
  18. 1 point
    Cool game:) I managed to win 3 gold medals on my desktop Then started playing on my phone - picked it up as console controller and started using my thumbs (I suppose that it may be the case of many players for landscape orientated games). So my first impression was that controlling is quite uncomfortable and it took me a while to come up with an idea that I rather should be holding it by one hand and using forefinger of the second one. I see that you have an image showing that it's recommended way of controlling in 'How To Play' section. Maybe it would be good to show it when player runs the first match, so it would be less likely to have wrong first impression such as mentioned above? Currently you can complete the whole game quite quickly. If you wanted people to enjoy it longer you could implement some tournament system as it is in real football World Cup (group phase, knockout phase). Instead of 3 chances to score a goal players could also take on a goalkeeper role - he/she needs to point the direction in which goalkeeper jumps to catch the ball. In order to ensure more diversity there could be different ending events i.e.: - yours and your opponent 3 chances to score a goal in turns - whoever manages to have 2 goals more than opponent wins the match - whoever manages to score 4 goals wins the match - match duration: 3 minutes When it comes to gender of soccer players, it seems that in your core game women vary from men only in hair length. In reality there are a couple more differences between them and I think it would be nice to include at least some of them in the game - now women's appearance is confusing
  19. 1 point
    If there isn't a technical term for it already, I'd like to propose... Mesh Babies!
  20. 1 point
    karneekarnay

    Endless Runner Problem

    Midway through writing this saying that I think you've got it right I realised wtf went wrong. KIDS. LET THIS BE A LESSON TO YOU ALL. NEVER COPY AND PASTE FROM THE TUTORIAL UNLESS YOU HAVE TO. The issue was that my code was place the sprites underground... The container var worked fine. It was just that because I've been trying to make the code work with a template I made earlier, I made changes the differed from the tutorial, so the Y & X placements were completely off. I fixed up the function, changed the x & y and it worked fine. @michebn I wouldn't have got here without you. Cheers bud.
  21. 1 point
    smart re-use of your hockey game, looks good! The inclusion of Finland completely ruins the realism though 😉
  22. 1 point
    8bitdna

    Hires & hidpi explanation / help

    Hi Guys, I'm pretty new to Panda 2 after purchasing a licence recently and have been having a lot of fun so far, awesome engine I'm wondering if I can get a little bit of help with the system class attributes 'hires' and 'hidpi'? Thanks to Tom Vencels fantastic video here https://www.youtube.com/watch?v=IiBnUgylJEY&lc=z22bs1azftrhef3ciacdp4320lswfsnhmwgvimzealpw03c010c.1528017727658162 I think I have a basic understanding of whats going on. Hires essentially allows for assets to be swapped in using higher (or lower) resolution versions that match better for the device being run on based on the 'logical' game size. A little dig into the Panda 2 source code tells me that it looks for assets based on multiples of 2 and I also see what Hires scale things are running at currently by using the debug panel. Please correct me if I'm wrong! Hidpi I'm a little more confused about. This is to help with displays that have super high pixel densities? So if the my game is running on one of those displays with it switched off it will try and swap in a higher resolution asset? Switched on it won't? Can anyone describe when its good to have this switched off and when its good to be switched on please? @enpu Having something in the docs would be great to explain some things like this, I didn't realise Panda 2 had builtin support for dynamic resolution asset management until I stumbled on Tom's vids Cheers Folks Pete
  23. 1 point
    Ninjadoodle

    Hires & hidpi explanation / help

    @8bitdna - No problem, and honestly - I think you will pick this up in no time. Sure, there are a whole bunch of things I can't do yet, (I'll slowly increase the complexity of my projects lol), but once you get the basics and how everything fits together, Panda is incredibly easy to use! I have a current subscription to Construct 3, which is a very good tool, and super easy, but I'm not using it very much - nothing beats the Panda 2 workflow and flexibility!
  24. 1 point
    8bitdna

    Hires & hidpi explanation / help

    Thanks Guys, Appreciate the explanation/s. Hope you don't mind the questions. Getting up to speed with JS as well which is helping. I come from a web dev background of C# and PHP mainly, never did much frontend work, a bit of jQuery here and there if that counts. I do love the whole instant nature of Panda 2's workflow, keep finding myself pressing reload from the IDE and watching my monitor and mobile devices refresh for no reason Xbox support is awesome, will have a play with that soon as well. Cheers
  25. 1 point
    Ninjadoodle

    Hires & hidpi explanation / help

    Hi @8bitdna - Happy you found my vid useful I'll try to explain the 'hidpi' setting a little more. Many new monitors have very high resolutions (2k, 4k etc.). There are however, still a lot of 1080p screens floating around. With high resolution monitors, there will usually be a setting in your OS that will 'zoom in' , otherwise the icons that were designed for 1080p screens will appear very small. The same happens with websites etc. When 'zoomed in' normally the same number of pixels will be rendered as if zoomed out. If however, you have the 'hidpi' setting enabled, it will use all the pixels available on the monitor, instead of just magnifying the canvas. I don't really see a reason to have 'hidpi' turned off, apart from maybe some performance gains on heavy games. As far as 'hires' goes, I think you pretty much have it down! PS. I agree that it would be very useful to have an official tutorial on this / some more detailed documentation, for any Panda newcomers Hope this helps! Tom "Ninjadoodle" Vencel
  26. 1 point
    NasimiAsl

    cloud : fill inside of mesh

    make points instance inside of box mesh https://www.babylonjs-playground.com/#L3PEXN#17 https://www.babylonjs-playground.com/#L3PEXN#18
  27. 1 point
    Wingnut

    Remove Round Frames in VR

    Hi Lary Here ya go... https://www.babylonjs-playground.com/#TAFSN0#27 Should work. Line 31... I dump scene.cameras to console. It shows 5 cameras... 0-4. At console, I clicked on each camera object, which views that object in an object inspector. scene.cameras[1] had a ._rigCameras array with a length of TWO. I assumed that was the stereo cam. So then... we just need to change the rigMode on that camera... just like we did in the previous playgrounds. Line 33 does it. Hope this works. Report back, as wanted. By the way... that was a PERFECT playground example... it made my helping... easy to do. Thx for that... well done.
  28. 1 point
    Update. Thanks again for your answers - following advice we went with option 1, Customization. We ended up putting 70 teams in the game (but reusing 8 kits). AND IT INCLUDES FINLAND! We disabled using Geo-IP lookups for team selection because I didn't feel comfortable relying on a third party service. The team customisation layer consumed about 3 days of development time. The final result, SOCCER HERO, can be found in this post:
  29. 1 point
    maybe your tweenOnUpdate method affected I haven't found your problem https://codepen.io/wsqviva/pen/jKbQJe
  30. 1 point
    I'm on my phone so I can't check it but it seems that teens have a stop method : https://labs.phaser.io/edit.html?src=src\tweens\immediate stop a tween.js So saving the tween and calling stop before creating a new one might do the trick var tween = null; //global or in a class ... if (tween) tween.stop() tween = this.tweens.add(...) Something like that...
  31. 1 point
    Rodrix3

    Lamps on Babylon / Open Contest!

    Very nice @V!nc3r! You got a ver nice showcase. Could you tell me more about your ideas? I have tried adding ambient occlussion shadow, pre-baked texture, to the lampshade. However, as soon as emissive is on, all traits of ambient occlusion shadows disappear. What exactly do you bake and how? In my models, I just bake AO for all. I am not familiar with IES. @Wingnut, I agree with Vinc3r that baking textures is important. Beware, however! You can bake AO shadows and still have dynamic lights. AO is the fine details of the shadow, usually independent of a light source. For me this is the key to achieving realisim. And yes, it takes LOTS of work from setting up the scene, export, baking, and setting up the materials again. But it is worth it! Anyways.... I still can't think of how to make this lampshade realistic. I am beginning to think that emissive should NOT be used at all. Any ideas?
  32. 1 point
    babbleon

    Lamps on Babylon / Open Contest!

    I gave up using baked light / AO maps on a recent project as the customer wanted bits of the scene to move. Not that it's very helpful to the OP, but when processors get fast enough.. this is that kind of thing that would be great to have for realtime realistic scenes: https://erichlof.github.io/THREE.js-PathTracing-Renderer/
  33. 1 point
    Wingnut

    Lamps on Babylon / Open Contest!

    Heya @V!nc3r. Do you ever "grapple with" the baked shadow map drawbacks? (PG #71) - players cannot change position or rotation of shadow-casters (or baked shadow will be mis-positioned) - textures cannot be re-used in other parts of the scene - textures are needed, instead of colors-only (side walls) These things can cause scene bloat and handcuffs user-interaction (rot/pos/scale/mesh-add/mesh-remove) with the mesh in the scene. Plus, there's added game-making time... to produce the bakery goods, right? Do you ever ponder these things... which are the "costs" of using baked shadowmaps? Just curious. I have never used baked shadowmaps in a scene. I'm not sure how they're created or if they come back to haunt you... if you ever need to re-position a mesh. I would assume that they make the programmer avoid changing a mesh pos/rot/scale/existence... "late in the game", huh? It's almost like... photo-realism costs dynamics money. Can you tell us some of the thoughts that you think about... regarding these restrictions? (if not, it's fine... thx, either way.) Comments welcome from everyone, of course (especially other bakers). Maybe I should put this question in Wingnut Chronicles... to avoid sending Rodrix's thread on a tangent.
  34. 1 point
    V!nc3r

    Lamps on Babylon / Open Contest!

    I always use lightmaps. This allow to have precalculted rendering quality to realtime scene. Here a little scene where all shadows are lightmaps (except of course the dynamic one under the flying logo).
  35. 1 point
    Please ignore this stupid question of mine, because it works well in the latest version. Thank you for your advice.
  36. 1 point
    Added constellation lines (H A Reys scheme), better star texture and other tweaks. WIP link: Celestial sphere
  37. 1 point
    Antriel

    HexSweep.io

    Multiplayer online hexagonal minesweeper. Fight against other players, claim your area and steal theirs in a massive world. Reach the top of the leaderboard by having big score. Claim as much of the world as you can for yourself in this puzzle iogame. Play the game here: http://hexsweep.io Developed entirely in Haxe, using pixi.js for rendering, nodeJS with uws for server. Feel free to ask me anything