Jump to content

dbawel

Members
  • Posts

    1,315
  • Joined

  • Last visited

  • Days Won

    23

dbawel last won the day on September 24 2018

dbawel had the most liked content!

Profile Information

  • Gender
    Male
  • Location
    California
  • Interests
    Film, Television, Animation, Technology

Recent Profile Visitors

7,306 profile views

dbawel's Achievements

  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
×
×
  • Create New...