• Content Count

  • Joined

  • Last visited

Everything posted by DylanD

  1. aw i was hoping there was going to be an easier way o well i thought these might be the only ways, thanks!
  2. Hey i just finished up trying to put all of the textures in my sceneManager class but i still get the problem of i cant switch the scene of the texture. You say it should work though eh? Maybe im doing something else wrong. Could it be that they are both trying to access the files at the same time and the second one cannot access it becuase the first one is currently accessing it(therefor it just doesnt load it at all)? Also i can try to make a PG but im not sure i have the time to create it. Gotta go to school soon
  3. Hey everyone, I have a really weird/strange problem, i recently switch from a mac computer to a windows computer and when i play my game all of my boxes (which have my own shadermaterials on them) have lots of black dots all over them, like the static on old tvs,(or ants on the screen as i used to think they were 😂 ), this only happens on my windows machine, when i open it on my phone everything is fine. Here are some of the specs for what i am using if it helps: chrome: Version 69.0.3497.81 (Official Build) (64-bit) windows: windows 10 home edition (version 1803(OS Build 17134.228)) Heres a playground where i get the same problem https://www.babylonjs-playground.com/#2IFRKC#53 Here is what it looks like on my windows machine: Here is what it looks like on my phone(how it should look) : Any ideas how i could fix this or why it is happening?
  4. Is there a way i could just not have the errors pop up?
  5. hmm if i remember correctly PBR is like the super class of standardMaterial... or something like that... so i guess the albedo would make a difference? How would PBR pass albedo, with a png? or would that just automatically be imported when i import the scene that has the model in it, when the model already has the albedo on it... not sure... good idea i will check. Ok so the log file also says i cannot find them however a little bit more insight WARNING: Error encountered processing image file: , Error: [Errno 2] No such file or directory: '/Users/dylan/Workspace/unity/game/Assets/Resources/Models/TEXTURES/Green/Big_AlbedoTransparency.png' That directory doesnt exist that i know of... maybe it wasnt uploaded to the repository or something, could it be hidden even in the repository? such a mystery. I guess this is just some file im missing thanks for the help everyone!
  6. Alright so i still have the dependencies problem but it was as simple as updating vscode... it was on version 1.14, current version is 1.27 so that helped a lot. Not sure how much those dependencies are really impacting my game since i can build and run and it seems fine, except for a really weird change to how one of my shaders looks, which i need to look into and make another post for, could be my machine specific. For now its solved i guess, however i would still like to hear what you all think about just leaving the "missing" dependencies missing. (it says i need babylonjs3.2.0-alpha when i am using babylonjs3.3.0-alpha.13). Anyway thanks again for being my echo chamber i guess
  7. its seems i have a lot more problems than this too. like vscode just not accepting my tsconfig.json looks like i have to figure most of this out myself
  8. just noticed in my git changes that somewhere when downloading and npm install ing it switch some stuff around in my package.json, thats gotta be the problem it switch my package.json from "babylonjs": "^3.3.0-alpha.13", "babylonjs-gui": "^3.2.0", "babylonjs-materials": "^3.3.0-alpha.13", to: "babylonjs": "^3.3.0-beta.5", "babylonjs-gui": "^3.2.0", "babylonjs-materials": "^3.3.0-beta.5", very strange, also im not sure how to change it back yet... edit: proboably just how to uninstall and install the correct packages edit2: that didnt work either, still get missing dependencies problem
  9. Hey everyone, I have recently switched machines, from a mac to a windows machine. I am trying to set up my vscode enviroment and am having trouble with npm and its dependencies. I am still new to npm and am not sure how to go about this problem. Specifially i am using babylonjs:"^3.30-beta.5", babylonjs-gui:"^3.2.0", and babylonjs-materials:"3.3.0-beta.5". These are all in my package.json, when i was on my mac they all worked great together, although i had slowly upgraded from using babylonjs version 3.2.0, to all three of those dependencies. Now when i try to do npm install to get all of the packages i need on my new machine i get this error: npm WARN babylonjs-gui@3.2.0 requires a peer of babylonjs@>=3.2.0-alpha but none is installed. You must install peer dependencies yourself. npm WARN babylonjs-materials@3.3.0-beta.5 requires a peer of babylonjs@>=3.2.0-alpha but none is installed. You must install peer dependencies yourself. Any ideas what im doing wrong? I tried installing both babylonjs-gui and babylonjs-materials with: npm install --save babylonjs babylonjs-gui npm install --save babylonjs babylonjs-materials But that didnt seem to help
  10. Hey DK, sorry for the late response. well i use the same class in both scenes for the code, i just use: this.Textures = []; this.Textures.push(new BABYLON.Texture("Textures/yellow.png",this.scene)); this.Textures.push(new BABYLON.Texture("Textures/red.png",this.scene)); this.Textures.push(new BABYLON.Texture("Textures/orange.png",this.scene)); maybe a few more into that array but that is the general idea. To explain more, this is in the constructor of a class which i call at the start of each scenes creation function. Scene 1 is created and shown then in the background i have scene two being created, which includes having this class be instantiated. So when i have these textures already instantiated i try to access them again to load into a different scene. But they don't seem to load in that scene at all. The only work around i can think of is putting these textures in my sceneManager class then just changing the scene variable in them, then passing them through the class constructor, but i'm not sure that will work, i am going to try that now. Any other ideas? Thanks, DD edit: age old problem of many scripts and it confidential
  11. also school, this will be on the back burner but SURE!!
  12. Hey DK, I seem to be running into this problem. In one scene my player must choose a texture then it needs to be present in the next scene. So what I want to happen is: I load the first scene with the textures, then my player chooses, then I load the textures in the second scene where It shows the texture again. But what actually happens is: I load the first scene with the textures, then my player chooses, then I load the textures in the second scene but the textures do not show. I believe that Babylon.js is not loading the textures for the second scene however I need the textures in that scene. Is there a way I could get around this? Note: neither of my scenes are up permanently so I cannot just leave the textures in one scene then reference them from the other scenes, since when I dispose of the scene it should dispose of the texture. Im stumped 😕 Maybe assetManager is what I need, I will look into that in the mean time
  13. so I have pretty much the whole things working, but I still have the errors, which cause a large lag spike on start, any idea how I could fix that? **im actually not sure if I need the albedo stuff but I dont think BABYLONjs uses albedo anyway...? It seems to work just fine without it, except the errors ruining startup time **
  14. this might be a silly question, but would we still be able to ask forum questions during the competition? Also if I hand in a school project thats cool too right? Could I have multiple people on my team or is it solo? Hahahaha so many questions that probably will be answered when the competition starts
  15. I just noticed that all of the missing materials end with _AlbedoTransparency I dont think I even need the albedo stuff not sure if that helps, I still need to try the sub directory thing.
  16. So I have the update, I'm not sure it changed anything. I did however notice that in the network tab that the materials that are not loading properly, are of type "text/html". which is strange to me. The status for all of the materials is 404 (doesn't find the file). I believe when I export to .babylon file its not saving the materials with it. Just the model, but I'm not really sure.
  17. by network profiler you mean developer tools right? Under the network tab of the developer tools there is 7 missing .png's which are meant for the blender model. When I go to the URL they show it doesn't exist. I tried looking for the .png's from blenders perspective to see if I could find them anywhere and I can't, maybe theres a trick to it that I dont know? Yea I'm on version 4.6.1, I will try to update it just in case! I also switched to append since it works better. getMeshByName sounds wonderful! how would I specify the sub directory? er its seems I just need to add it to the name... Thanks guys!
  18. When I import it with this: BABYLON.SceneLoader.Append("models/","Test3.babylon",this.scene,(meshes)=>{}); The model seems to stay in the correct position and rotation. However then I'm not sure how I can access the model to actually use it. Also I still have all the errors with the materials. Edit:{ I think I can access by using, BABYLON.SceneLoader.Append("models/","Test3.babylon",this.scene,(meshes)=>{ console.log(meshes.meshes); }); This console.log however shows me all of the meshes in my whole scene and not the ones I just added. How could I access the ones I just added? } Edit2:{ So I can use the model with the above function if I do this: meshes[meshes.length-6].scaling = new BABYLON.Vector3(0.4,0.4,0.4); Basically this means that I can access it by going to the end of the array and looking for it. So that part is kind of solved. } Still need help with the materials problem
  19. Hello everyone , I'm looking for help with getting a .FBX into my Babylon scene and applying textures to it. The original model was made by someone else, I am just tasked with putting it into the Babylon scene. I can not show the actual file either as it is not my property which I am very sorry about, I understand it would help a lot to post it here, that way you could all help me better, but I am not able to. Again sorry . Hopefully my description will be enough . I dont know very much about blender, so I'm not sure exactly what I am doing wrong. I have a model in blender, specifically a .FBX, which uses many different materials and pieces. When I try to export it to a .babylon and then import it into my scene it becomes mis aligned. As in, instead if all of the pieces being one on top the other and positioned correctly, they seem to be rotated or repositioned. Not only that but I get many errors that tell me I am missing materials, but when I look at the files directory for those missing materials I cannot find them. I am using blender version: Version 2.79b (2.79b 2018-03-22, Blender The Babylon exporter I am using is version: 4.6.1 The code I use to to import the model is: BABYLON.SceneLoader.ImportMesh("","models/","Test3.babylon",this.scene,(meshes)=>{ importFunc(meshes); }); The errors I get are: BJS - [11:10:38]: Error while trying to load image: models/AlbedoTransparency.png But 8 of these errors, all with different materials Any ideas what I am doing wrong? Thanks for reading
  20. I will be in school, but I'm sure I could give it a try!
  21. This worked great!! https://playground.babylonjs.com/#5WJ0FD#3
  22. Oh my gosh, how did I miss that 😠 , that is frustrating Thanks DK!
  23. I got 25, its super tough at first, but I think the progression is really good, since you need to learn all the new distances. I like it though