DylanD

Members
  • Content Count

    416
  • Joined

  • Last visited

Everything posted by DylanD

  1. Hey @Deltakosh, I just started trying to edit the fog, I thought it would be the same as making a shader for shaderStore, but I can't seem to even figure out how to declare it... Here is what I tried: https://playground.babylonjs.com/#5WJ0FD but that didn't seem to work at all, the console doesn't say anything. How should I go about starting the declaration?
  2. Hahahaha as I wait for this page to load (my Internets super slow today ) I thought to clear the cache haha. The game looks great!
  3. when I hit start nothing happens or when I hit about too
  4. When you open it in chrome Facebook you have it running off of your computer. When you open it on the messenger app it runs off of your phone. Most phones have worse specs than computers(by a lot). You most likely need to clean up your code and make it very optimized or it will not run well on phones. I suggest: -using clones or instances if you can, for meshes, textures, materials, and pretty much anything that might need to be duplicated. Or just try and re-use the same on from the start. -if you can dont use particle systems, if you must use them use as few as possible they really slow the game down - read through these and try some of them:
  5. Reminder to everyone that if they solve their post, add the solved tag with the solved prefix!
  6. you could try, making something like, Make two identical animations, use arrays to hold all the keys, then when you get that live data add it to the array of the extra animation then go to the current frame of the old animation in the new one. Then make the original animation the extra one for the next time data is inputed. This probably won't work very well if you have a lot of live data coming in a lot. Just an idea.
  7. a lot changes in a month? tested it, when I click the start button it says TEST
  8. hmm just to make sure I understand, if I put this in my code: BABYLON.Effect.IncludesShadersStore["fogFragmentDeclaration"]='#ifdef FOG #define FOGMODE_NONE 0. #define FOGMODE_EXP 1. #define FOGMODE_EXP2 2. #define FOGMODE_LINEAR 3. #define E 2.71828 uniform vec4 vFogInfos; uniform vec3 vFogColor; varying vec3 vFogDistance; float CalcFogFactor() { return 0; } #endif'; then it will over ride it, if I load my page, I will look like the shader above describes. But if I take that declaration out of the code, then reload the page it will be back to normal as if I changed nothing?
  9. I did not think it would be that easy. Would this overwrite the fogFragmentDeclaration permanently or only while the new declaration would be in my code? I dont want to start changing this if its going to cause a large problem.
  10. is there a way I could override the fragment portion of that shader, without impacting anything else? In just my game.
  11. p.s if this did solve the problem add the solved tag
  12. have you tried var pauseVar = true; chooseAsync().then(()=>{ pasueVar = false; }); that way it is paused until chooseAsync is done? just an idea
  13. to add on this, my understanding of fog in BABYLONjs, I am under the impression that with fog linear, the fog starts from the camera position plus the fogStart, in a sphere around the entire camera, then another sphere that is fogEnd, which is where the fog stops. Inbetween the two spheres is fog that gets thicker the farther away it is from fogStart sphere. I would like this similarly with fog density but I would like to be able to start it offset from the camera so that the player can see better.
  14. Hello everyone, I was wondering is there a way I could use scene.fogStart and scene.fogEnd, but with the scene.fogMode = BABYLON.Scene.FOGMODE_EXP, or EXP2, where fogStart and fogEnd just changed where the fog starts to show, that way there is not hard maths involved(just a simple if(fogPos>fogstart){fog.alpha = alpha}else{fog.alpha = 0}. something like this). Im not sure how to go about this because from what I understand fog is a function in the BABYLON.Scene, which I dont think I should edit, and dont know how I could edit and still keep it in my game. So what I would like to know is, can it be done, changing the fog to the above ideas, and if it can be done how should I go about it, is changing how scenes work really the only way, would it even be as difficult as I think?
  15. I saw that. I meant I wouldn't have been able to figure out all of the errors meant I was missing the .rgb Also your fix only got the colour of the texture, pryme8's got the whole texture(but doesn't load properly ??? not sure whats up with that playground) 😕 ,thanks though. the correct fix was this playground: https://playground.babylonjs.com/#411D8A#8 a mix of both
  16. oh maybe you meant, where its positioned on the screen, not if it will follow... lol whoops hope it helps anyway! maybe just switch to a regular panel not a cylinder one...
  17. did it? https://www.babylonjs-playground.com/#8Y780Y#32 set anchor.parent = camera; or the player or whatever.
  18. it is interesting that when you try to set the position of the panel to the camera it forces the camera to the position of the panel. See here: https://www.babylonjs-playground.com/#8Y780Y#28 it also does the same with the opposite, setting the cameras position to the panel which was expected. https://www.babylonjs-playground.com/#8Y780Y%2329 In this one they move a bit they move back, so interesting
  19. Sorry, I often forget that the console even exist when using the playground. 😓 However looking at it now Im not sure I would have solved it. Still should have looked...😰
  20. the texture still is not showing up in that one , this shader is separate from the other shaders you helped me with. It only needs the alpha, the texture, and vuv.x look at this one I think its the closest to working: https://playground.babylonjs.com/#411D8A#3 I already have the fade working as intended the texture just doesn't seem to work yet. I'm trying to add the texture like its done in this playground: https://www.babylonjs-playground.com/#0854IT#6 but flat, no 3d
  21. and it didn't work... not sure why, here is my go at it. https://playground.babylonjs.com/#411D8A#1 so I load up the texture, into the variable bean, then I put bean in the shader and then the shader onto the plane. any ideas? oh I didnt declare it correctly, still doesn't work... yet https://playground.babylonjs.com/#411D8A#2 didn't add it to the colour, duhhhh, still doesn't work yet: https://playground.babylonjs.com/#411D8A#3
  22. this seems to be the shader half, now just to add it in very carefully. https://playground.babylonjs.com/#411D8A
  23. sweet thanks! I believe you mean needAlphaBlending: true