Jump to content

Origami

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by Origami

  1. @Nabroski, you don't know how very right you are. In my jumping around from git branch to branch like the nascent code monkey I am, the ObjLoader script inclusion was dropped from my index.html. After spotting that this afternoon, I've been able to make great progress. Your help with creating progress/failure functions was key in my narrowing the lurking variables here. Thank you guys for such a great community (and library!)
  2. @Nabroski I'm using your example and it looks like I missed a comma in the filename in my jumping back and forth between git branches. I feel embarrassed, but there's nothing for it but to move on. So now it clears the initial o._addPendingData error, but it still kicks into the onFailure callback after loading the first mesh (my OBJ only has one mesh). My code looks like: BABYLON.SceneLoader.ImportMesh( "", serverPath, filename, scene, function(meshes) { console.log("success!"); /*...followed by doing stuff with the meshes... */ }, function(evt) { console.log(evt, "is loaded") }, function(errorEvt) { console.log("error:", errorEvt) } ) And I don't get to "success!". All I see is the log for "is loaded" for the only mesh of the object and then the errorEvt is logged. And the errorEvt looks to just be the scene object itself. Is there a particular attribute in here I should be looking for to debug through this?
  3. So I can load my obj in your site, that works fine. So I guess Nabroski is correct that the code is incorrect somehow? I'm just confused, because it loads .babylon files just fine and the syntax of sceneLoader.ImportMesh() is the same for both of them. As far as I can guess, I think the prototype chain for whatever 'o' isn't connected to the babylon prototype chain properly to get that method. Is it something about how the initialization for the mesh in the .obj file starts with 'o'? Hmmph. More digging & testing. I'm using babylon 2.4.0 & babylon.objFileLoader I picked up from the github repo. Is there still something I'm missing? Also, in case any of you guys are curious, I'm looking to use this method for auto-generating the UV mapping from the face normals to avoid blender's seam creation mini-game for what will likely be dozens (and growing) OBJs/.babylon files.
  4. And as an update! In testing with the .babylon files that DO load, I added some UV mapping in Blender and the textures took right away. So @Wingnut's intuition (and likely many others on here) was correct. Now, to load these OBJs...
  5. Hey Babyl-allstars! So I've quashed some other bugs in the app and I've started trying to work through this issue, but I can't even seem to load any OBJ files into the scene at all. I keep getting the error: "o._addPendingData is not a function", which is being thrown in: "t.ImportMesh@babylon.2.4.js:15". I've tried using both methods that look applicable: var loader = new BABYLON.AssetsManager(scene); var batman = loader.addMeshTask("batman", "", "assets/", "batman.obj"); and BABYLON.SceneLoader.ImportMesh("batmanface", "batman.obj", scene, function (meshes) { // ... }); Hell, I'm even trying to load the batman models, but I still get this error. And the only thread I've found on this gives creating a scene as a fix. But I definitely already have a scene, since the obj loading occurs on a click, while the rest of the scene is loaded before the click occurs. The syntax is identical to the playground, but it's not throwing the error. So I'm stuck with not being able to even test all these great suggestions for applying a texture to an OBJ, since I can't even get an OBJ to load. I guess I'll try tweaking the .babylon files and working on it from there, but I really would prefer to be able to use OBJs. Hmmmm...
  6. Oh man, these are all great suggestions! Ahhh, I love this forum! I'll keep digging and see which one solves this
  7. Right on, right on! I'll see what i can do about applying a vanilla texture in Blender and exporting that, then overwriting it in my JS with the bumpTexture. If that ends up working, and it really is just the existence/lack of this attr within the .babylon's JSON structure, I'll probably end up writing a script that trawls through a folder of OBJs and inserts dummy texture floats. My team is getting a crapton of OBJs from modelers and it would be a tedious process to open each and every model, apply textures, and then export, to say the least. Thanks for the quick reply here, I'll get cracking and report back!
  8. Hey Wingnut! After reading through so many of your forum posts, I feel like I'm speaking with a celebrity! Niccccce. Do you have a sample .babylon file with the UVS in it (I see that it's 'just' float-formatted data for the vertexes)? I'd love to throw it into my app and see if that fixes the issue.
  9. Hey all! I'm fairly new to the babylon framework (and this is my first forum post--hey again!), but after coding in it nonstop for a few weeks, I have a decent handle on it. Or so I thought. I'm trying to give my objects textures, and while it works on babylon-created meshes, I get no love from my own imported OBJs or .Babylon files. I'm sure I'm just doing something incorrectly/missing a setting, but for the life of me, I can't figure it out. And of course, obligatory playground demonstrating this issue: http://www.babylonjs-playground.com/#XTJQS#1 //EDIT: And now I can't get my .babylon or .obj files to load from my server. I swear they were working before. Does anyone have any samples so we can replicate the issue? Thanks! testDog.babylon teddy.obj
×
×
  • Create New...