dbawel

Members
  • Content Count

    1,315
  • Joined

  • Last visited

  • Days Won

    23

Everything posted by dbawel

  1. Hello, This post is not a question, but is information that I would have found invaluable prior to my having problems playing video on mobile devices - practically all mobile devices. I wanted to create a seperate post for everyone to read, as the post where this dialogue has taken place is labled "console errors." I have been working on an app which relies heavily on playing video files and specifically video textures. I found that almost 2 months ago, I had no problem playing video files and the associated audio on desktops and laptops no problem; but I could not get my video files to playback on most all mobile devices - both Android and Apple phones and tablets. Although at the time, I wasn't focused on inding a solution, as I had other features to build into the application to finish it, and believed that solving video playback on mobile devices wouldn't be much of a problem. So over the past 2 months I spent time each week to try and solve the fact that I couldn't get any video files to play back on my Android tablet, without finding a solution. But now that I have most all features built in the app, I needed to find a solution to be able to take the app into beta testing now as the app is designed to be a mobile app and wouldn't run on most tablets and phones - practically none. As I had used most all available applications to encode and convert video files to .webm and .ogv files for playback on mobile, I began to believe that it was either a bug in babylon.js, or a conflict in my lengthy scripts. So I worked for days trying to find the cause of the problem, and certainly went to the BJS forum where many highly experienced users attempted to help me troubleshoot and solve the video playback problem. However, neither the balon.js community or I could get any video file or format to play on most mobile devices - with the exception of audio playback on some files. So when I was completely lost a couple of days ago, I thought I would focus on analyzing the video files and formats themselves, to make certain that I could rule out video encoding and file conversion. After spending more than 2 days, I finally found that the problem had nothing to do with my scripting or with babylon.js, but that it was an encoding and file format issue. Now I have video and audio playback working on every device I and my friends are able to test, as well as every browser and OS version. Again, I wanted to post this as a new thread, since many users will most likely overlook this discovery and information, since the post where this occured says nothing about video in the title and tags. And I hope that no one else will ever need to face the problems of having no solution or available resources to solve the problem of video palyback on mobile devices. The following is the solution as a quote directly from the post where I and several other users spent considerable time and dialogue over several days with no solution we could find: I hope that this is valuable info for users now and in the future, and that no one else needs to spent any time troubleshooting video playback on any device or display. Cheers, DB
  2. dbawel

    Error on loading .OBJ files

    @Madclaws- Take a look at the following PG scene. I quickly modified a scene @Wingnut posted last year - which I believe now accomplishes what you're trying to do. It's as simple as it gets. Look at your console to read the loaded mesh in the meshes array for the scene. Also, change the value on line 24 to see that you're able to affect the mesh in the array; and or modify the mesh any way you like. https://www.babylonjs-playground.com/#3FV2X#28 DB
  3. dbawel

    Error on loading .OBJ files

    @Madclaws - I would have to look at your code and how you're using the loader and the Babylon Assets Manager in order to understand where you're having problems. However, do you need to access the loadedMeshes array? What about using the Babylon Assets Manager as follows: let assetsManager = new BABYLON.AssetsManager(scene); let meshTask = assetsManager.addMeshTask("loading", "", "path to files", mesh_name.obj); meshTask.onSuccess = function(task) { 'Do stuff here, if necessary' }; assetsManager.load(); You'll find several methods on the forum and PG to load a mesh. But if you're simply loading an OBJ file as a test; and no bones, children, etc. then you shouldn't need to access the meshes array. DB
  4. dbawel

    Error on loading .OBJ files

    @Madclaws - Firstly, your file names don't match, so unless you have edited the OBJ and MTL files yourself, the loader is looking for the same name MTL file. Start by opening your OBJ file in any text editor, and verify the name of the .mtl file the .obj file is looking for. This will be in one of the first few lines of the OBJ file. As it appears the OBJ file is looking for a different MTL file name, this is not normal. It;s always best to keep your OBJ, MTL, and JPG (texture file) the same name as every exporter I've ever used writes these as the same name; and looks for the same name files on import - definitely the Babylon OBJ file importer. And your OBJ manifest file and MTL file are of different names. So I might assume your other files are not matching the names precisely. Upper case and lower case must match also. You don't need a manifest file... however, if you want to get rid of the 404 error for the manifest file, simply create an empty file with the same name as your OBJ file, and give it the extension .manifest. Example 'obj_name.babylon.manifest'. However, this is not important as others have already stated. If you're loading multiple OBJ files, then I recommend editing your OBJ file and remove the reference to the .manifest file. Then it won't look for the file. As for the .mtl file, this must also have the same name as the obj file. Example 'obj_name.mtl'. This is your material file with all your material attributes (settings.) This will work the same way if your mesh has a texture which will also have the same name as your obj file with an extension for the texture such as 'obj_name,jpg'. I work with OBJ files every day, and almost always edit the OBJ and MTL files as they are self explanatory once you open in a text editor. If you don't want a MTL file on your mesh, then simply remove the reference to the MTL file in your OBJ file. Then it will simply use a default material or none at all depending on your OBJ file edit. However, I find that different applications such as Blender often write odd values to the MTL file which is completely dependent on the user who has set up the material and texture. So I almost always edit my OBJ and MTL files as I can get the desired material editing the ambient, diffuse, specular values, etc. directly in the ascii files themselves. It's so very easy to read and edit. 2 minutes experimenting with no prior knowledge is more time than anyone needs to learn everything there is to know about the OBJ format - including editing normals, vertices, etc. It's simple for a single OBJ file, but if you work with real time scans producing hundreds of unique OBJ files to load in real time, then I write simple scripts to edit each OBJ file as needed. The .babylon format has many attributes which is far more advanced if you want to export scenes. However, if you are only importing meshes, the the OBJ format is by far the most reliable format and provides a level of flexibility in being able to edit the ascii files directly. Once you open the OBJ and MTL files and spend a couple minutes editing these and learning what values represent the different attributes, this will become your format of choice for meshes. I can't imagine otherwise, as there is little to nothing which will cause you problems once you understand the format. Remember that you can always apply Babylon materials and textures (and other attributes such as shaders) after import - which I do often. I hope this info helps, as you're definitely on the right path to the ease of importing OBJ files. If you read this and follow the advice to test a few edits to the files, I can't imagine you won't have a firm grasp of the OBJ format. However, if you still have issues, then post an OBJ, MTL, and JPG file all with the same name before the extension, and I'll be happy to walk you through the key lines to edit to gain full control over the resulting mesh(s) import. FYI - I introduced the other software engineers at Sony Electronics to the OBJ format, and it is now the format of choice for practically all mesh content due to it's simplicity and flexibility. This is after they spent several months working will every other format and exporter. No need to over complicate simple tasks - which often happens due to the OBJ format being decades old now; so people assume newer formats are better. But there's a reason why the OBJ format continues to be the most widely used in export/import between most applications. Cheers, DB
  5. Hi @Tomek My apologies - I haven't been on the forum much these past few weeks. If you would still like an example of this, then I expect to be able to set up a simple scene which accomplishes this.I have an insurmountable amount of work backlogged, but need to move back into the community. I'll try and let you know if I'm not able to get to this tomorrow; as it won't take long to build. DB
  6. I don't know if this might apply, however for a recent app, I used the (X,Y) canvas pick point to pass through, and set a separate control (mouse wheel, keypad) to set a dynamic Z distance from the camera in world space. This simple function allowed me to draw vertices and create meshes in three dimensions quickly and easily. I also drew a line from my camera to the (X,Y,Z) world space coordinate as a visual reference with a simple icon attached to the end point on the selected position to allow easier navigation. And for my app's specific needs, I provided a numeric Z depth reading in the UI with limits so that the user could set restrictions on Z depth (as well as X,Y world space, to provide a useful, selectable, and accurate determination of where to select to place mesh attributes. DB
  7. dbawel

    I Love This Forum

    Hey Devs and All, I'm just feeling a bit sentimental about how far this forum has come the past 4 years. @Deltakosh and @davrous ( + others) have given us a creative outlet that has turned into a new frontier. I just wanted to say how much I appreciate that I am able to come to a place that provides me not only technical advice, but I've made many new friends as well. Much love to you all. DB
  8. dbawel

    I Love This Forum

    Ah.. @Wingnut - You're always good for a laugh!😆 He has a re-shoot next week, and I'm going to try and make the shoot if I can work out the logistics. The only thing that might keep me away is that I'm scheduled for the G2E show in Vegas next week; so we'll see how it goes. Anyway, if I get a picture with the Captain, you know the first place I'm going to post it. On a different note (no pun intended), I'm waiting on FedEx to deliver my new keyboard this morning. It truly looks like a science station right off the bridge of the Enterprise. I mention this as it's the perfect workstation to compose and record music for online content. Here's a You Tube video: For those of you who write and record their own music for their games, there is no better keyboard out there. It runs Cubase natively, and has features that have never been seen before. I usually run Pro Tools, but I can run either on this board without the need for my laptop - or any MIDI or analog interface for all the channels of audio I choose. There's even a driver which converts all applicable performances and sounds to Web Audio, so that I can use a tone generator without the need for downloading audio files. I'm truly psyched! DB
  9. @jdavid - So are you good? Able to move forward? DB
  10. dbawel

    I Love This Forum

    Hello all... Unfortunately due to traffic, I didn't arrive on the lot in time to make my lunch appointment. I was totally bummed, however my new Producer for 3rd Brain Technologies Janet Arlotta has a re-shoot with him in about a week. And this time, I'll be there with bells on.🔔 Not going to stand up Captain Kirk twice. @Deltakosh - good question! I've got to ask if he's using Babylon.js. I can't believe I didn't think of this one! Cheers, DB
  11. Hello, I thought to place this on the demos and projects thread, however I decided to post this here as it is more a topic for which framework to use and why. I was hired by an elite software development group at Sony Electronics to help them navigate through WebGL to build a pipeline to deliver content for the South By Southwest convention and to create a foundation to quickly develop games and online media for future projects. In short, I was tasked to escape the limitations of 2D media and help Sony move forward into 3D content taking advantage of the WebGL rendering standards. This was no esay task, as I was hired Dec. 11th, and was given a hard deadline of March 5 to deliver 2 multiplayer games which were to be the focus of Sony's booth at SXSW in Austin Texas. But first I had to run a quick evaluation and convince a very proficient team of Engineers which framework was the best fit for Sony to invest considerable resources into for SXSW and which was the right coice to take them into future projects. Yhis wa a huge consideration as the WebGL framework which was to be chosen was to play a much greater role at Sony Electronics considering the group I was assigned to works well ahead of the rest of the industry... developing what most likely will be native intelligent applications on Sony devices (especially smartphones) in the near future. These are applications which benefit the consumer in making their day to day interactions simple and informative. Thus the WebGL framework to be chosen needed to be an element in displaying information as well as entertainment for a greater core technology which is developing daily in a unique tool set used by the software engineers to build applications which allows Sony to remain the leader not only in hardware technology, but in the applications which consumers want to use on Sony devices. But as I was working for Sony, I also had a greater task as there were existing expectations in developing a game on Sony devices which needed to be on par with what consumers already were experiencing with their Playstation consoles. As unrealistic as this might initially appear, that had to be the target as we couldn't take a step back from the quality and playability the consumer was already accustomed to. So back to the first task... selecting the WebGL framework for Sony Electronics to use moving forward. Rather than telling a story, I'll simply outline why there was little discussion as to which framework to choose. Initially Sony requested someone with Three.js experience as is more than often the case. So when they approached me for the position, I told them I would only consider the position if they were open to other frameworks as well. They were very forthcoming to open their minds to any framework as their goal was not political in any way - as they only cared about which framework was going to provide them with the best set of tools and features to meet their needs. And one might certainly assume that since Sony Playstation is in direct competition with Microsoft Xbox, and Microsoft is now providing the resources in house to develop babylon.js, that Sony Electronics might see a PR conflict in selecting babylon.js as their WebGL development framework. However, I'm proud to say that there was never a question from anyone at Sony. I was very impressed that their only goal was to select the very best tools for the development work, and to look beyond the perceived politics and to develop the very best applications for the consumer and to fulfill their obligations to their shareholders in building tools that consumers want on their smartphones and other electronic devices. So once again... Three.js vs. Babylon.js. This was a very short evaluation. What it came down to was that three.js had far more libraries and extensions - however, this was not the strength of three.js since there is no cohesive development cycles with three.js and although many libraries, tools, and extensions exist, more than often they are not maintained. So it was easy to demonstrate that practically any tool or extension we would require for the SXSW production would require myself or the team updating the extension or tool to be compatible with the other tools we might use on the project. This was due to the failings of the framework since each developer who writes an extension for three.js is writing for a specific compatibility for their own project needs... and not for the overall framework... as this is not within the scope of any developer or group of developers. Thus I find that it requires weeks if not months of of maintenance in three.js prior to building content, just to ensure compatibility between all of the tools and extensions needed to use for most projects. As for babylon.js, the wheel is not generally re-invented as it is with three.js, as most extensions are quickly absorbed into a cohesive framework quickly - provided they have universal appeal - and this integration ensures compatibility as there are fewer and fewer extensions to use, but instead an integrated set of tools which are thoroughly tested and used in production revealing any incompatibilities quickly. The bottom line is that there are no alpha, beta, and development cycles in three.js, thus no stable releases. Whereas the opposite exists with babylon.js. There is a cohesive development of the tools, and Sony is smart enough to see beyond the politics and to realize that having Microsoft support the development of babylon.js is a huge bonus for an open source framework. And if anyone had to choose a company to support the development of a WebGL or any framework, who better than Microsoft? With practically every other useful WebGL framework in existence spawned by MIT, most all are barely useful at best. And why would anyone pay to use a limited WebGL framework such as PlayCanvas when Babylon.js is far more functional, stable, and free? This baffles me and most anyone who chooses one project using babylon.js. The only argument against babylon.js is that the development of the framework is now supported in house by Microsoft. But for myself and others, this is a positive, not a negative. I've been assured by the creators and lead developers of babylon.js that they have secured an agreement with Microsoft ensuring the framework remain open source and free. This ensures that anyone is able to contribute and review all code in the framework, and that it remains in the public domain. Sony gets this and we quickly moved forward adopting babylon.js as the WebGL framework within at least one division of Sony Electronics. At the end of this post I'll provide a link on youtube to a news report of not only the games we built for SXSW, but the exciting new technology on built on Sony phones which uses the phones camera to capture a hight resolution (yet optimized) 3D scan of a person's head. This is only a prototype today, but will be a native app on Sony phones in the future. So our task was not only to develop multiplayer games of 15+ players simultaneous in real-time, but to have a continuous game which adds a new player as people come through the booth and using a Sony phone, has their head scanned. This was an additional challenge, and I must say that I was very fortunate to work with a group of extremely talented software engineers. The team at Sony is the best of the best, I must say. All in all, it was an easy choice in choosing babylon.js for the WebGL framework at Sony Electronics in San Diego. Below is a news report from SXSW which shows the new scanning technoogy in use, as well as a brief example of one of the games on the large booth screen. And using Electron (a stand-alone version of Chromium), I was able to render 15 high resolution scanned heads, vehicles for each head, animation on each vehicle, particles on each vehicle, and many more animations, collisions, and effects without any limitations on the game - all running at approx. 40 fps. The highlight of the show was when the officers from Sony Japan came through the booth... which are the real people we work for... gave their thumbs up, as they were very happy with hat we achieved in such a short time. And these were the people who wanted to see graphics and playability comparable to what the Playstation delivered. And they approved. Link: Thanks to babylon.js. DB
  12. dbawel

    I Love This Forum

    I get to meet and hang out with William Shatner this Wednesday... just me and him... WhoooHoooo! I've lived quite a life... the original Starship captain... Anyone have any questions I should ask? DB
  13. dbawel

    Motion capture & root rotation

    I had serious issues capturing into Blender. I ran my Kinect(s) into MotionBuilder and then exported FBX to Blender without any problems. In working with motion capture for 20+ years, I see too many problems with capturing into Blender right now; until someone writes a proper plugin which is simple to use. DB
  14. As @jerome mentions, a PG scene will provide you with many responses and hopefully a solution for your specific issue. However, if you aren't familiar with the Optimization of LOD, then here are the docs: https://doc.babylonjs.com/how_to/in-browser_mesh_simplification DB
  15. dbawel

    Updating text on dynamic texture

    @Varsha Kamble Your math is incorrect. The font that you use is not able to fit in the math you set for the length of your plane and dynamic texture. If you still have issues, then I can easily build a PG scene which accommodates any text. But I hope you can identify your errors in expecting the font to fit within the mesh. DB
  16. Hey @jdavid It's all in the math. Look at the least common hardware you want to support, and do an evaluation of vertices, materials, and textures. Always use a power 2 texture until we enter full support of WebGL 2.0. I always look at my code as a water pipe and a bathtub... how much water can I push through the pipe and how much water can the bathtub hold? DB
  17. dbawel

    About creating dynamic avatars

    You can dispose of meshes, materials, and textures at anytime. And I often use the RunAfterRender() function to apply different attributes to the scene. However, there are may ways to do this... so RunAfterRender() may not work for your scene. However, if you have a command of JavaScript, then this should be simple... as the babylon.js framework has all the functions in place. If you need more assistance, then post a playground scene. DB
  18. I hold at a solid 60 fps. what device are you testing and what browser? DB
  19. Hello BJS community, I wrote and submitted the first Wikipedia article for babylon.js late last year. I've submitted it to Wikipedia twice now, and the last time they had reviewed it and I was told it should only be a week or two and it would be approved and posted. Even today, when I look at my submission online, it is still pending. I've communicated with several advisors for Wikipedia the past 3 months since they changed their submission tools, but no one has been able to truly assist as of yet. I believe I got caught in the middle of their switching the submission methods - which is why I've submitted twice now. But I don't believe I should submit again as I'm sure this would certainly cause problems, as Wikipedia is the most understaffed and difficult website to deal with - although we all respect what they do only through limited donations and funds. It has been over 4 months now, and advisors have notified me that the waiting list is not more than 4 to 6 weeks. If there is anyone in this community who has sucessfully posted a Wikipedia page and might be able to assist me in submitting and following up, it would be greatly appriciated by the whole community - since it then opens the door to others to add to my first article, and to also post their own articles about babylon.js in their native languages. As you might know, the first page on any topic is the most difficult to have reviewed and approved. DK is the only one yet to read the article, and I believe we need the world to be able to research and understand what babylon.js is, the people who created it, and the history of it's genesis. Thanks, DB
  20. dbawel

    Optimize scene

    As you can convert React/Redux scenes to Vue, I suggest you look at what @brianzinn has posted on GitHub. DB
  21. dbawel

    video texture Sync issue, plz help~~~

    Hi @jadeshohy What you're trying to achieve is INCREDIBLY HARD and is a holy grail in my opinion. However, my company has an app that's going into beta which perfectly syncs all media precisely in all HTML5 browsers in real time for an unlimited number of users collaborating together with generally less than 5ms delay in interaction... internationally... on average, of course, depending on your connection.. We're still working on the API to the server (Brains) - don't know when we'll release the API for the server... however if you want to test what we've done, let me know if you want to apply for the beta release. You won't find anything that a good JS Dev can build as it's mostly written in PHP ( a royal challenge), and we also use two servers. One is the brains and the other holds the media and database... so it's completely secure for the media and the brains of it all - which was our challenge for the film and broadcast industry. It's like Photoshop online in real time for any media and unlimited users. A reply to this message won't trigger my memory to add you to the beta list, however we deploy in two weeks to Weta in NZ, Blue Man Productions, and a division of Lockheed Martin, as we also sync collaborative 3D media in real time. So I've got my hands full right now. But I'll try and post a topic to those who might be the best to test the app. It's not all WebGL... only when you launch collaborative 3D media, but we've spent more than 5+ years building the server and more than 2 years building the application. However we're only 2 developers, with a little help from our friend to get us into PHP ( @Pryme8 ... reclusive bastard, you made my life hell - but I now know PHP, so I guess I owe you)... and I will call you (Andy) this week. If not, call me and I'll show a REAL interface. Cheers, DB
  22. dbawel

    Multiple Scenes Approach

    @freetoplay Similar perhaps... But instances or clones, absolutely. DB
  23. dbawel

    Render an OBJ string with Babylon JS?

    @Bladetrick I hope you have good luck with trying to implement the asset manager to do the work. However, the .OBJ, MTL, and texture file all have to be available at the time of import. I'm trying to implement this into a server database myself right now. We'll have something soon, but no code to share. However, I'll do my best to keep you posted on how we accomplished this for multiple real time users. Just message me in a week or two if you aren't able to solve yourself. I don't use Json files, so I can't add to any discussion on Json. DB
  24. dbawel

    Mesh.dispose() Clarity

    @Deltakosh It's old habit from a few versions back. Are you saying that disposing of a single mesh also disposes of all attributes of the mesh including materials, textures, shaders, etc? We're not talking scene dispose. But if mesh dispose works this way, then what about shared attributes? Thanks, DB
  25. dbawel

    registerOnPhysicsCollide With Any

    There's no current access, but I can zip and send the app to you. Message me your email, as I have a new computer and haven't updated my contacts. DB