• Content count

  • Joined

  • Last visited

  • Days Won


Everything posted by Pryme8

  1. Yea I want to solve this let me make a PG that can demonstrate it l and we'll start from there? I'm super busy today, but if I get a moment I'm on it.
  2. Not complaining just saying I'd love to see how someone solved it. And losing the client was nothing to worry about I have more . I would actually like to message you @RaananW if you think it's a fixable bug. It was really hard to troubleshoot because not all browsers would produce the error. and yes it is on topic seeing how I responded directly to a quote from this thread....
  3. God yes, I lost a paying client over this bug....
  4. i personally think TS is a flash In a pan and will never become standard... but if others feel different that's on them. If it works for you it works for you, but maybe y'all should consider calling this babylonTS now as to not falsely advertise. I am a huge fan boy of vanillaJS though so my opinion has some bias.
  5. cloth

    Sps system might be able to pull off cloth. One of my projects I wanted to do was soft body simulations in real time but have had like no time to work any any "want" projects... let me know what you dig up in this area there would be a few ways to accomplish this.
  6. I have beat this document and others into the ground trying to get fog to work on a custom shader... Does anyone have a working GLSL example not in typescript but like a actual BABYLON.Effect.ShadersStore version. I have been hitting my head against a wall trying to get this to work and the more I dig the more confused I am getting because it seems like everyone variables and uniforms are called different things and do not follow any sort of convention from example to example...
  7. @JCPalmer What browsers can handle webCL at the moment though? I've seen some bench mark reports for speed testing webCL vs just webGL and even though CL uses GL to render the 3D context the more intense calculations seem to work way faster. I only recently discovered it from reading up on some cutting edge college lectures that I dug up one day by luck. I want to be ahead of the ball and start learning it as much as possible because I have a feeling it's going to be the main language in the future do to your ability to tell it what pipeline it's using and I believe it makes real multithreading a possibility in browser.
  8. Yeah, as long as I don't get too drowsy from the medication I'll be on this today.
  9. Who wants it... If I have enough time to get at it today after my work Ill get at this... I already am parsing fbx's into my own file type so to get it over into BJS will be no problem. how do you guys want it? I can make it work right in BJS as an extension or I can do a secondary tool that you could just convert FBX's to .babylon files. Yall's choice, Im over OBJ format. Its not going to have everything at first (tags and bones you will have to wait for) but materials and mesh data no problem.
  10. @Flomotion My girlfriend orderd that I stay in bed all day and try to heal a little bit.... soooo I'm thinking of hooking up the laptop and getting back to this, maybe an update today. Let me see if I can focus enough for this today.
  11. @ozRocker Yeah we're gonna build the best 3D web gl engine ever, it's going to win biggly.... and we will make playcanvas pay for it.
  12. Man I can not believe the rapid pace you guys are pushing changes to the engine, it's pretty impressive. Im starting to feel like things are falling between the gaps now though, like if your not constantly just reading posts it seems a lot of things get missed. I know the guys are constantly working on the documentation and things are always going to be changes, but I guess my point is BJS is starting to look scary from a outside perspective. i tried to get my buddy set up over the phone and he's decent at computers but gave up really fast because it was just too much he felt like, and that was not the only person. I'm not saying too much as in the learning curve actually I'm not too sure what put him off from it I'll have to ask. but it made me think that if outsiders are thinking it's scary, and guys who are in the loop like myself are having trouble keeping up with what's really good or not with convention and logic structure that's best suited for the most recent version of Babylon. Then maybe we as a community need to discuss how to present things differently or figure where the disconnect is happening? Or maybe I'm just out of the loop now? But really I honestly feel like we are losing continuity.
  13. Delta totally came through and helped us out!!! If your having problems with doing the shaders you can hit me up in private messages dad, Ill help you out as much as I can I have a good understanding of them, but have to tinker to get them to work. I really think you could use my pseudo random zone calculations for your generator, and if your interested I can do a port of DasNoise for you as well.
  14. You sir are a gentleman and a scholar. Ohh man I was sooo close.... thanks @Deltakosh I was getting pretty frustrated with this! "vec4 worldPosition = world * vec4(position, 1.0);" "fFogDistance = (view * worldPosition).z;" this is what fixed it for me thank you!
  15. whats stupming me up is when I try to figure out what the glsl really looks like for the standard material, I end up with this just going through the vertex shader "gl_Position = viewProjection * finalWorld * vec4(position, 1.0);" and I have never seen finalWorld anywhere, and am not sure wtf it is... I had it running I thought on an example, but any time I try to do it my object ends up disappearing). I know this is for your Terrain Editor, but If we can figure this out, Im sure it will help you as well. This is as close as I can get without really having consistent references... and it compiles... but does not work. Any ideas? this.header.scene.ambientColor = new BABYLON.Color3(0.6, 0.6, 1.0); this.header.scene.fogMode = BABYLON.Scene.FOGMODE_EXP; this.header.scene.distance = 0.01; this.header.scene.fogColor = new BABYLON.Color3(0.9, 0.9, 0.85); /*--- BUILD SHADERS ---*/ BABYLON.Effect.ShadersStore["oceanVertexShader"]= `precision highp float; // Attributes attribute vec3 position; attribute vec3 normal; attribute vec2 uv; // Uniforms uniform mat4 worldView,worldViewProjection; uniform mat3 view; uniform mat3 worldPosition; uniform float time; uniform vec3 cameraPosition; // Varying varying vec3 vPosition; varying vec3 vNormal; varying vec2 vUV; varying float vFogDistance; // Simplex 2D noise vec3 permute(vec3 x) { return mod(((x*34.0)+1.0)*x, 289.0); } float snoise(vec2 v){ const vec4 C = vec4(0.211324865405187, 0.366025403784439,-0.577350269189626, 0.024390243902439); vec2 i = floor(v + dot(v, C.yy)); vec2 x0 = v - i + dot(i, C.xx); vec2 i1; i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0); vec4 x12 = x0.xyxy + C.xxzz; x12.xy -= i1; i = mod(i, 289.0); vec3 p = permute( permute( i.y + vec3(0.0, i1.y, 1.0 ))+ i.x + vec3(0.0, i1.x, 1.0 )); vec3 m = max(0.5 - vec3(dot(x0,x0), dot(x12.xy,x12.xy),dot(,, 0.0); m = m*m ; m = m*m ; vec3 x = 2.0 * fract(p * C.www) - 1.0; vec3 h = abs(x) - 0.5; vec3 ox = floor(x + 0.5); vec3 a0 = x - ox; m *= 1.79284291400159 - 0.85373472095314 * ( a0*a0 + h*h ); vec3 g; g.x = a0.x * x0.x + h.x * x0.y; g.yz = a0.yz * x12.xz + h.yz * x12.yw; return 130.0 * dot(m, g); } float wave(vec3 pos){ vec2 xy = vec2(pos.x, pos.z + (time / 1.))/vec2(1.0, 1.5); float h = snoise(xy); return h; } void main(void) { vec3 v = position; v.y = wave(v)*2.0; gl_Position = worldViewProjection * vec4(v, 1.0); vPosition = v; vNormal = normal; vUV = uv; vFogDistance = (view * position).z; }`; BABYLON.Effect.ShadersStore["oceanFragmentShader"]= `precision highp float; // Varying varying vec3 vPosition; varying vec3 vNormal; varying vec2 vUV; // Uniforms uniform mat4 world; uniform mat3 view; // Refs uniform vec3 cameraPosition; uniform sampler2D textureSampler; #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 float vFogDistance; float CalcFogFactor() { float fogCoeff = 1.0; float fogStart = vFogInfos.y; float fogEnd = vFogInfos.z; float fogDensity = vFogInfos.w; if (FOGMODE_LINEAR == vFogInfos.x) { fogCoeff = (fogEnd - vFogDistance) / (fogEnd - fogStart); } else if (FOGMODE_EXP == vFogInfos.x) { fogCoeff = 1.0 / pow(E, vFogDistance * fogDensity); } else if (FOGMODE_EXP2 == vFogInfos.x) { fogCoeff = 1.0 / pow(E, vFogDistance * vFogDistance * fogDensity * fogDensity); } return clamp(fogCoeff, 0.0, 1.0); } void main(void) { vec4 color = vec4(0.5, 0.5, 0.8, 1.0); float fog = CalcFogFactor(); color.rgb = fog * color.rgb + (1.0 - fog) * vFogColor; gl_FragColor = color; } ` // Compile var oceanMaterial = new BABYLON.ShaderMaterial("oceanShader", this.header.scene, { vertex: "ocean", fragment: "ocean", }, { attributes: ["position", "normal", "uv"], uniforms: ["world", "worldPosition", "worldView", "worldViewProjection", "view", "projection", "cameraPosition"] }); = 0; oceanMaterial.setFloat("time", 0); oceanMaterial.setVector3("cameraPosition", camera.position); oceanMaterial.backFaceCulling = false; //oceanMaterial.setMatrix("view", this.header.scene.getViewMatrix()); oceanMaterial.setVector3("vFogColor", this.header.scene.fogColor); /*--- BUILD SCENE SECTION ---*/ var water_top = BABYLON.MeshBuilder.CreateGround("water_top", {width: 200, height: 100, subdivsions: 10}, this.header.scene); water_top.material = oceanMaterial; /*--- BEFORE RENDER ---*/ this.header.scene.registerBeforeRender(function(){ += (self.header.scene.getAnimationRatio()/100.0); oceanMaterial.setFloat("time",; }); and I do get this error though Error: WebGL: uniformMatrix4fv: Function used differs from uniform size: 9 Sorry not trying to hyjack your thread, just noticed we are both fighting the same problem!
  16. I followed the dirrections on but I can not get it to work... o_O.
  17. @Dad72 how did you merge the StandardMaterial? I am clueless on how to build my on glsl file out of the standard shader for some reason. I tried doing it from scratch but it was a no go...
  18. Did you implement your custom shader that has the fog mode transferred from the basic shader in this version? I was looking to reference that. @Dad72
  19. Dude, thank you for this! I dont know why none one else has hopped on this, you have soem good textures on there!
  20. aww dang, I am passing through San Fran on those dates, but have prior arrangements... that would of been fun!
  21. o_O, I should have kept my mouth shut maybe...
  22. I was not asking about webgl. i was asking about webCL @letsbrostudio
  23. I am just now getting over a major injury and will be resuming my work on this and my legends game as soon as I catch up with paid work.
  24. Anyone know if webCL is working on any browsers yet?