Pryme8

Members
  • Content count

    2,204
  • Joined

  • Last visited

  • Days Won

    26

Pryme8 last won the day on April 12

Pryme8 had the most liked content!

2 Followers

About Pryme8

  • Rank
    Master Ninja
  • Birthday 04/29/1986

Contact Methods

  • Website URL
    Pryme8.com
  • Twitter
    none

Profile Information

  • Gender
    Male
  • Location
    Eureka, CA
  • Interests
    Crushing it

Recent Profile Visitors

4,401 profile views
  1. http://www.babylonjs-playground.com/#157CS9#7 Got a few questions. Starting at line 53, am I adding varying vars correctly? What about the uniform array? What about Attributes like UV? Also when setting the Uniform Array we have the method setColor3Array but no setVector3Array, so I am not sure if I am doing it correctly. I even tried setArray3, but still no change. Effectively I will see the colors move on the sphere in relation to the light[0] direction. I will have sub-surface scattering if it kills me. also noticed the uv is not carried over? I dont see it as an active attribute when I console.log(mat.getEffect()); and look at the report.
  2. Pryme8

    Lamps on Babylon / Open Contest!

    Last one : https://users.cg.tuwien.ac.at/zsolnai/gfx/separable-subsurface-scattering-with-activision-blizzard/ Im actually gonna reference this one for a shader I am working on.
  3. when doing something like this: var mat = new BABYLON.CustomMaterial("cMat",scene); mat.Fragment_Definitions( `uniform float time;` ) mat.Fragment_Before_FragColor( `color.r = sin(time);` ); how do I set the time float now? if it was a shaderMaterial it would be .setFloat but that is not an option here. I tried onBindObserverable.add(function(effect){ effect.setFloat... }) *EDIT* I found the answer. On one of @NasimiAsl's examples
  4. Pryme8

    Lamps on Babylon / Open Contest!

    You are talking about real time global illumination... once we have access to webGL 3.0 scope you could voxalize the scene http://simonstechblog.blogspot.com/2013/01/implementing-voxel-cone-tracing.html but till then: https://github.com/iryoku/separable-sss/blob/master/SeparableSSS.h <- might be able to reference this http://developer.download.nvidia.com/books/HTML/gpugems/gpugems_ch16.html http://codeflow.org/entries/2012/aug/25/webgl-deferred-irradiance-volumes/ https://threejs.org/examples/webgl_simple_gi.html http://realtimeradiosity.com/demos/ https://en.wikibooks.org/wiki/GLSL_Programming/Unity/Translucent_Surfaces https://en.wikibooks.org/wiki/GLSL_Programming/Unity/Translucent_Bodies http://people.compute.dtu.dk/jerf/papers/dirsss.pdf http://www.pixelnerve.com/webgl/sss/sss_multilight.html <-- Best bet.
  5. Pryme8

    Error trying to load from an OBJ file

    Sorry just saw the new stuff, been a busy day glad you figured it out!
  6. Pryme8

    Error trying to load from an OBJ file

    EDIT* my bad let me review 1 second. https://doc.babylonjs.com/how_to/load_from_any_file_type Check your console network report, is the file 404ing? https://doc.babylonjs.com/how_to/how_to_use_assetsmanager <- prehaps I like the asset manager personally.
  7. Pryme8

    Error trying to load from an OBJ file

    Make sure you have the obj importer included https://doc.babylonjs.com/how_to/obj
  8. You can simulate multi-threading with smart programming. Its not true multi-thread and there are caveats but as the webGL get closer to true OpenGL and as thigns like OpenCL gain support you are future proofing yourself. But then again its all situational and depends on what goal you are trying to accomplish.
  9. So I feel dumb... I have tried a bunch of different mixing methods and I still cant get the look I was expecting. I have a fixed light and a camera light: vec3 vLightPosition = vec3(0., 100., 2.); vec3 pLightPosition = cameraPosition; vec3 baseColor = texture2D(textureSampler, vUV).rgb; vec3 shadowColor = vec3(0.1, 0.1, 0.15); vec3 lightColor = vec3(0.3, 0.6, 0.8); vec3 vNormalW = normalize(vNormal); vec3 viewDirectionW = normalize(cameraPosition - vPositionW); vec3 lightVectorW = normalize(vLightPosition - vPositionW); vec3 plightVectorW = normalize(pLightPosition - vPositionW); float ndl = max(0., dot(vNormalW, lightVectorW)); float pndl = max(0., dot(vNormalW, plightVectorW)); vec3 angleW = normalize(viewDirectionW + lightVectorW); vec3 pangleW = normalize(viewDirectionW + plightVectorW); //float specComp = max(0., dot(vNormalW, pangleW)); //specComp = pow(specComp, max(1., 64.)) * 0.5; float lf = (pndl*PLIGHT_INTENS); vec3 color = mix(shadowColor, baseColor+(lightColor*lf), max(ndl, lf)); /* baseColor = mix(shadowColor, baseColor, ndl+lf); vec3 color = mix(baseColor, lightColor, lf); Effectively the vLight is a fixed point light or a hemi light, the pLight is the miners/camera light. I need to basically have the two lights effect each other, this math might actually by right and I am just being weird... Need any kind of input.
  10. Pryme8

    GeometryBuilder (core) Alpha Version

    😃. Cool deal, I think I know what this is for. Good job bud!
  11. set your ring out a little farther and have them start caching into a container object that has their keys as a location identifier. Then toggle active/inactive with a basic distance calc and maybe even turn the distance calc into an AABB to keep the ring as a box. Then keep the objects loaded even if they are out of site and obfuscated by fog, disable them if the bounding box is out of the frustum and dispose them only if they are double your distance threshold and then make sure you delete the key and value out of the container object for housekeeping. Also maybe have a variable that keeps track of how many tasks are being pulled at the moment, then maybe limit it and have a "stack" of loading task to parse through when ever the limit count variable is under the set value.
  12. This would be cool if you shifted it to an async process JohnK. "Perhaps not disposing of scenes at the 'back' could prevent re-loading if direction reversed." I would just disable them, until they are like double or triple distance from the inner ring.
  13. "Disabled Features: native_gpu_memory_buffers" what does that mean? Wish I knew more about the hardware stuff here... looks like its time to do some research. GpuMemoryBuffers Status ATC Software only ATCIA Software only DXT1 Software only DXT5 Software only ETC1 Software only R_8 Software only R_16 Software only RG_88 Software only BGR_565 Software only RGBA_4444 Software only RGBX_8888 GPU_READ, SCANOUT RGBA_8888 GPU_READ, SCANOUT BGRX_8888 Software only BGRX_1010102 Software only RGBX_1010102 Software only BGRA_8888 Software only RGBA_F16 Software only YVU_420 Software only YUV_420_BIPLANAR Software only UYVY_422 Software only Im pretty sure that is saying the GPU is not handling the buffers, but maybe I am mistaken.
  14. Do you have your hardware acceleration enabled in the browser options? If I were a betting man I wager its turned off..
  15. http://pryme8.com/infinite-terrain-with-lod/ http://www.babylonjs-playground.com/#f00M0U#39 A modified LOD function would prolly work, but instead of juggling mesh details have it load mesh chunks.