dbawel

Members
  • Content Count

    1315
  • Joined

  • Last visited

  • Days Won

    23

Everything posted by dbawel

  1. @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
  2. @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
  3. @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
  4. 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
  5. 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
  6. 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
  7. 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
  8. 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
  9. 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
  10. 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
  11. @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
  12. 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
  13. 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
  14. 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
  15. As you can convert React/Redux scenes to Vue, I suggest you look at what @brianzinn has posted on GitHub. DB
  16. 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
  17. @freetoplay Similar perhaps... But instances or clones, absolutely. DB
  18. @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
  19. @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
  20. 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
  21. This needs to be accomplished using vanilla JavaScript. Here is a simple app to pick pixels on a canvas and message the (X, Y) values: Does this help? DB
  22. I have to say that if you need an immediate solution, then please look at the responses and resources from @Deltakosh on this post. There is definitely a solution to your issue now. I'm simply making this easy for anyone who is writing or has and existing app to multi-task... and we've been writing code for 5+ years to make everything happen in real-time for unlimited user collaboration. But I'm just talking crap until I produce. Which is why you'll always find me awake at 3am in the morning on any given night. This is Extremely hard stuff - which without a Dev Partner who has the backed experience, I would have never have accomplished. DK, I think you'll be proud of me one day...😉 DB
  23. @fdeng Here's a post I answered some time ago. If you require more help, I'm sure you'll post back. DB