igitz

Members
  • Content count

    14
  • Joined

  • Last visited

  1. Hello, is there a way to advance a VideoTexture by just 1 frame per RenderLoop? As I understand it now it is time based. This creates the problem that if the frames need to be captured to create an animated sequence, the video keeps advancing in between 2 captured frames.
  2. HeightMap Video

    Nevermind, I did it using ShaderMaterial, sending a video sampler2D to the vertex shader and displacing the vertices there.
  3. HeightMap Video

    Any way to create an animated terrain using CreateGroundFromHeightMap with a VideoTexture instead of a static image?
  4. procedural textures question

    Update: i'm using the file based Procedural Texture method that is described in the documentation and i have the files "config.json" and "pt00.fragment.fx". the files are in the same folder (here i called that folder proceduralTextures) so my texture is: var customProcText = new BABYLON.CustomProceduralTexture("custom", "./proceduralTextures/pt00", 1024, scene); What i have seen, is that i get the following error: GET http://localhost:8888/../../../../BabylonProjectFolder/proceduralTextures/pt00/config.json 404 (Not Found) No config file found in ./proceduralTextures/pt00 trying to use ShadersStore or DOM element i was not sure why the config.json is expected to be in that directory, so i created the directory to test it. you can see my folder structure in the screenshot. using this new folder structure i got rid of the first error, but still get No config file found in ./proceduralTextures/pt00 trying to use ShadersStore or DOM element. Now the weird part: It seems like everything is working fine, i can use the texture and modify it in the .fx file, but the config.json is actually not doing anything. Having an empty config.json has the exact same result. plus, i found the same "No config file found" error in this playground example http://www.babylonjs-playground.com/#1XPCZC#5 by https://meulta.com/en/2015/02/22/procedural-textures-in-webgl-with-babylon-js/. ideas on what's going on...?
  5. Custom material with shadows

    sorry to dig this up, but is this issue solved? is there a working example? the provided link does not work https://github.com/BabylonJS/Babylon.js/blob/master/Babylon/Shaders/default.fragment.fx
  6. procedural textures question

    great, i will definitely test that, thanks for the clarification.
  7. Passing Video to a Shader?

    thanks! still need some time to get familiar with the babylon documentation + class constructors.
  8. Passing Video to a Shader?

    thanks for the replies, i might be doing something wrong, but passing the video texture instead of a texture is something i tried and got a red/black grid instead. so i thought that either my method or the videotexture constructor is not correct. example: var shaderMaterial = new BABYLON.ShaderMaterial("material", scene, "./shaders/s00", { attributes: ["position", "uv"], uniforms: ["worldViewProjection"] }); var texImage = new BABYLON.Texture("textures/img00.jpg"); shaderMaterial.setTexture("textureSampler", new BABYLON.Texture(texImage, scene)); works, but var texVideo = new BABYLON.VideoTexture("video", ["textures/video00.mp4"], scene); shaderMaterial.setTexture("textureSampler", new BABYLON.Texture(texVideo, scene)); doesn't.
  9. procedural textures question

    thanks, things are getting clearer now. the psychedelic t-shirt example is on point as well. what i'm still unsure of is, can these be combined? meaning.. can the psychedelic procedural texture be the texture of a ShaderMaterial so that the shader material also affects let's say the t-shirts vertices in its vertex shader?
  10. Passing Video to a Shader?

    hi @RaananW, thanks for the quick reply. would you have time for a short example of how this would work?
  11. Is there a way to pass a video texture to a shader using a similar way as the one used to pass an image texture? shaderMaterial.setTexture("textureSampler", new BABYLON.Texture(imgTexture, scene)); i'm wondering if there are more ways to use video textures in babylon, i have seen that i can set a BABYLON.VideoTexture as a diffuseTexture of a material, but that seems limiting. What if i want to manipulate an object which has a material with a video texture, in the vertex + fragment shaders?
  12. procedural textures question

    thanks @Sebavan, it does sound like a lot of steps but i'll try to figure it out. however, what is confusing still is, if i can achieve what i want with BABYLON.ShaderMaterial as @Pryme8 mentioned (which seems to be true from what i have tested, for example by creating an animated texture directly in my fragment shader and applying it using the uv coordinates i pass), then what is the need for CustomProceduralTexture?
  13. procedural textures question

    Thanks for the response, I'm a bit confused then, since BABYLON.CustomProceduralTexture does not mention BABYLON.ShaderMaterial at all. https://doc.babylonjs.com/how_to/how_to_use_procedural_textures glsl i am more familiar with, i have used it a few times when coding with webgl, it is Babylon that is completely new to me.
  14. Hi, I’m new in Babylon.js, and trying to use it to create geometry that has animated vertices and an animated procedural texture. I’m animating the vertices in the vertex shader. For the procedural texture, I tried to follow the instructions: https://doc.babylonjs.com/how_to/how_to_use_procedural_textures as well as checked the playground example. https://www.babylonjs-playground.com/#24C4KC#17 the problem with the example is that i can’t really find a complete implementation with the shader/config.json files. And i have a couple of basic questions as well. When creating a custom procedural texture with an external folder with the config.json and custom.fragment.fx files, is that the only fragment shader that can be used in the scene? Or can a BABYLON.ShaderMaterial be used additionally? I'm having a hard time grasping the concept of a ’fragment shader’ procedural texture VS a fragment shader as the last step of the webgl pipeline. Thanks.