DylanD

Members
  • Content Count

    416
  • Joined

  • Last visited

Everything posted by DylanD

  1. Hey this is the old forums... Try reposting to the new one https://forum.babylonjs.com/
  2. Hey this is the old forums... Try reposting to the new onehttps://forum.babylonjs.com/
  3. 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
  4. So, i had this problem for another mesh, my way around it, was in blender going to the hierarchy to the actual file that was trying to be loaded, then deleting it. Which now that i understand that it seems a million times easier. then i just add any textures through babylons/javascript. At least i think this should work perfectly/has not shown problem yet. (i know there is a new forum, i'm on it already, just wanted to update this topic for future reference)
  5. DylanD

    BABYLON.Augmented Reality ...

    Hey uh, theres a new forum, not sure if you knew that. Maybe create a new post with this linked to it so we dont loose all this KNOWLEDGE https://forum.babylonjs.com/
  6. Hey this is the old forums... Try reposting to the new ones https://forum.babylonjs.com/
  7. DylanD

    GUI Fill

    Hey everyone, I was wondering is there a way to fill a gui image? What i mean by fill is if i set fill horizontal and 50% half of the image would be gone. something like this playground however gui and not textures/shaders: https://playground.babylonjs.com/#411D8A#8 edit: it does not need to have the fade effect like this shaders.
  8. DylanD

    GUI Fill

    So i got the stuttering under control. I believe it was happening because i tried to use 0.01 pixels which doesnt work... New Test: https://www.babylonjs-playground.com/#7EPK2H#6 Not exactly what i want yet but almost there. Here is another test: https://www.babylonjs-playground.com/#7EPK2H#7
  9. DylanD

    GUI Fill

    Here we go: https://www.babylonjs-playground.com/#7EPK2H#5 This is a very basic fill test! Edit: Any ideas how to get the image to stop stuttering/shaking?
  10. DylanD

    GUI Fill

    Actually maybe i could accomplish this with moving a container and having the image slowly move the opposite way. Then it would be above the containers rendering area. I think this would be what i want. Im going to try and make a playground now.
  11. DylanD

    GUI Fill

    No they do not seem to get me what i want. Nice stuff, however im looking for something that is one image (preferably) where one attribute (or two, defines how much of it is rendered om the screen) so as the attribute becomes smaller so does the image. Like in unity gui.image.fillamount (something like this)
  12. DylanD

    Preloading Help

    Hey everyone, I am trying to use assetManager to preload as much as I can. I already have it preloading all of my sounds. However when trying to preload gui elements (specifically gui images) i get stuck. I can use addImageTask to get a HTMLImageElement, however i dont know how to make that into a gui element. Any ideas?
  13. DylanD

    Preloading Help

    hmm, im not sure i understand what you mean. To clarify(as i am a novice and want to make sure we are on the same page), i have shaders saved as shaderName.vertex.fx and shaderName.fragment.fx, i want to load them with other preloaded assets, just to make the game a bit smoother on initial load in. I plan on saving them to a global object/global variable in my project. How i have the shaders implemented already is (with having the shaders save like above) i use new BABYLON.ShaderMaterial("",scene, shaderPath, {attributes:[], uniforms:[]}); That works great, however i dont use shader store. So what you are saying is i could use textFileAsset task then use that as the fragment and vertex files or use that text to write to shaderstore? Im not sure i would do that as it seems somewhat complicated for little gain (i have 4 shaders so loaded files)
  14. DylanD

    Preloading Help

    my shaders
  15. DylanD

    Preloading Help

    Hey another question about preloading. What should i use to preload shaders? https://doc.babylonjs.com/how_to/how_to_use_assetsmanager#meshassettask The doc doesnt seem to go over it.
  16. DylanD

    Caching Resources

    Hey everyone, I was curious if my understanding of how babylonjs and resources work with caching. The way i understand it works is that if I load a resource it becomes cached until that page is reloaded/cache is emptied. I think that it works this way for all of the resource types I am using (sound files, scene files/models, textures, and images). However I looked into it a bit and read this doc https://doc.babylonjs.com/how_to/caching_resources_in_indexeddb Which makes me think that the resources are only cached if I declare it so in the manifest files. However this is an older version of babylonjs so maybe it is outdated? I also read this Which makes me a bit more confused, however it seems that the manifest is for .babylons only, or could i put that on all the files? So I was wondering is my understanding of how babylonjs caches, incorrect? How does babylonjs cache things (sound files, scene files/models, textures, and images)? If so do i just need to add a .manifest file to each resource I want cache? Any Ideas?
  17. DylanD

    Caching Resources

    Great! This will save a lot of hassle. (and loading time hahahaha)
  18. DylanD

    Preloading Help

    Thanks DK that works great!! Just for future reference (as im sure i will forget sooner or later) here is how i ended up doing it with assetsManager https://www.babylonjs-playground.com/#XCPP9Y#719 Thanks again!
  19. DylanD

    Caching Resources

    Thanks! with the engine.disableManifestCheck = true i dont need to make manifest files for all my files? Or is that just for the scene one ?
  20. DylanD

    Caching Resources

    I was also wondering that doc mentions that I need to add a .manifest to my scene ("To enable offline support, the first thing you need to do is create a .manifest file associated with your scene. It should be named NameOfYourScene.babylon.manifest." ), however my main scenes are not saved as .babylon's(or saved at all for that matter), they are initialized in code as they are basic/procedurally generated. How will this impact my ability to to cache other things such as sound files? From my understanding i should be able to cache them still.
  21. DylanD

    Caching Resources

    Hey guys, looking into caching again, i was wondering https://doc.babylonjs.com/how_to/caching_resources_in_indexeddb this doc says as of Babylonjs V4.0 we use BABYLON.IDBStorageEnabled = true; I was wondering if this is in 4.0.0-alpha.8 or if it was meant for when V4.0 is in a release build, as it does not seem to be in 4.0.0-alpha.8 If it is what am i doing wrong? I put that line of code at the very start of my code and it says it doesnt exist on type babylonjs. I have also tried other areas of my code and it doesnt work there either. How am i supposed to use BABYLON.IDBStorageEnabled = true;
  22. DylanD

    Typo on Doc

    hasObservers would be at least 2 observers where as hasObserver is singular which means it has at least one. Or did you mean it does not line up with the code?
  23. DylanD

    Finish Line Block

    Hey everyone, hope you are all having a good morning. I am trying to make a finish line block for my game. However when i apply a finish line texture to it and then tile it, it creates an undesired product. Check out this playground i made to illistrate my problem: https://www.babylonjs-playground.com/#20OAV9#370 What works is the front and back face, having a nice tiled finish line look. What doesnt work is the top, bottom and the sides. They become blurred because of my tiling option. Any ideas how I could fix this? I have had this problem before with a shader which i fixed by using normals to find out with side of the box and then apply a slight change to my shader. However I do not know how i could go about fixing this with a texture/material. Edit: I followed this doc for the tiling: https://doc.babylonjs.com/how_to/more_materials
  24. DylanD

    Add metadata in GUI elements

    Yes i have played an MMORPG, (runescape, elder scrolls online...) Im not sure i understand why we would use metadata instead of making a logical object or class. 😕 Is it just simpler? Is it more efficient? Good to hear its added already! edit: Oh actually i think i get it now. You want to click and retrieve the data from the gui.metadata which just has the location of the 3d model. So it just much more simple, and there is no need for the logical object or class... Right?
  25. DylanD

    Add metadata in GUI elements

    Not sure i fully understand , however it sounds like you should just make a sword class/object, that has a sprite, a 3d model, and sword data.