• Content Count

  • Joined

  • Last visited

Posts posted by DylanD

  1. 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)

  2. On 12/28/2018 at 10:31 PM, JackFalcon said:

    looking into this...

    babylonjs is no longer at this location on Ar.js:


    @jeromeetienne, friend, any info on AR.js + Babylon status?

    Also @brianzinn is right - original solution cross-matrix calculations (because I don't understand matrix inversions..), but then jerome etienne figured out how to make them babylon specific (details above).

    Old, but still have a backup if needed...

    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


  3. 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.

  4. 19 hours ago, Deltakosh said:


    Is any of this stretch value working for you: https://doc.babylonjs.com/how_to/gui#image ?


    No they do not seem to get me what i want.

    19 hours ago, Wingnut said:

    Hi guys.  Here is ONE method... https://www.babylonjs-playground.com/#7EPK2H#1

    It moves an image up/down within a container... using the image .top property.

    The orange fill isn't "covering" half of the image, as DylanD prefers.  In the above PG,  orange fill is pushing image up/down.  (a simulation there-of).

    *shrug*  Are substitutions allowed?  :)  What if TWO images were put into the container, but the "fill" image (a solid color)... had its .top set large... so that is was hiding behind the container's bottom.  Now start raising it... reducing its .top.  Then, if it had a lower z-order then the first image... it would start covering it... from bottom->up.  That would be fancy, eh?

    I wonder if two image controls... crammed into the same container... are allowed to overlap.  hmm.  I guess the bottom "fill control" could be a thickenss=0 rectangle with a background color set.  Just reduce ITS large .top until it rises, and smothers the image.  It still must be rendered in-front-of the image/texture... depth-wise.  hmm.

    Side note:  The GUI Rectangle has a little issue with its borders... when content is overflowed, eh?  https://www.babylonjs-playground.com/#7EPK2H#2

    Maybe normal.

    Ok, just Wingnut yammering aimlessly... party on.

    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)

  5. 45 minutes ago, Sebavan said:

    You could probably rely on TextFileAssetTask and once the task is done fill the ShaderStore with your custom shaders ?

    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)

  6. 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? :D 

  7. 19 hours ago, Deltakosh said:

    Doc is wrong :) (I'll fix it)

    Please use BABYLON.Database.IDBStorageEnabled = true;

    Regarding the caching of your files, this should not be a problem (you can also just use engine.disableManifestCheck = true to avoid the manifest check)


    with the engine.disableManifestCheck = true i dont need to make manifest files for all my files?

    Or is that just for the scene one ?

  8. 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.  

  9. 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;

  10. 21 minutes ago, Dad72 said:

    Thank you Dylan. But the metadata now exists.

    I will try to explain better for you

    You have an inventory in which you storing objects in MMORPGs. The object is represented by an image.If we click on this image, I want to retrieve a 3D object, so my metadata is used to store more info corresponding to the image.

    In short, this subject is solved, the metadata have been added. I will not create a class by object because objects can be made.

    Have you ever played MMORPGs, you may understand better what I mean.

    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!


    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?

  11. 22 hours ago, Dad72 said:

    Imagine that in your game you have a sword to put in an inventory. In the inventory you display an image representing the sword. but if your player wants to use the sword in his inventory, we will not add him a picture in the hand, but a corresponding 3D object.

    In my case I will just record the name of the 3D object corresponding to the sword icon in its inventory so that when I select the icon in the inventory, a 3D object is displayed in the hand of the character.

    I can also add other info like the level, the damage that received the object and others ... Everything is contained in a GUI images.

    Do you understand Wingnut better ?

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

  12. 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.



    I followed this doc for the tiling: https://doc.babylonjs.com/how_to/more_materials

  13. 6 minutes ago, JCPalmer said:

    A .fbx is a data & directions file, just like a .babylon or .gltf.  The directions of the .fbx must have said that the texture is in a file named AlbedoTransparency.png.  So, the fbx importer made the appropriate setting in the blender scene / unsaved .blend.  I do not know if a fbx can even have embedded textures inside them.

    Go to where or whom you got the .fbx, and get or ask for the file. If they or it do not have it, then this question is probably solved with the answer that you are screwed.

    Yeah that was my next step.  Thanks for the help!


    P.S i will update this topic once i ask around the office.

  14. On 10/30/2018 at 12:53 PM, JCPalmer said:

    Find where on the hard drive is a file named AlbedoTransparency.png.  If you do not have one, why do you expect to export it?  If it is not in the models directory, then put it there.

    yea i cannot find them on my system. The file i am importing into blender is a .fbx, could it be possible that the albedoTransparency.png's are somehow intrinsic to the .fbx(maybe theyre built in to the fbx and not some external transparency png)?

    If so then i would be out of options for a bit...