Search the Community
Showing results for tags 'noise'.
-
I'm using a compressed PNG for refraction postprocess, but it's just black and white noise, so I'd like to generate the texture instead. Is it possible though? I tried procedural textures from the library, but it only resulted in default checkerboard texture appearing. What am I doing wrong? And if procedural textures can't be used this way can I use my texture as a tile, so it wouldn't stretch across the screen changing the scale of the noise? var roadmaterialpt = new BABYLON.RoadProceduralTexture("customtext", 512, scene); var postProcess2 = new BABYLON.RefractionPostProcess("Refraction", roadmaterialpt, new BABYLON.Color3(1.0, 1.0, 1.0), 0.3, 2.0, 1.0, camera);
- 4 replies
-
- postprocess
- noise
-
(and 2 more)
Tagged with:
-
Hi all ! Here's a little tweaked version of the LensRenderingPipeline demo : http://www.babylonjs-playground.com/#DX6AV#43 I've raised the grain amount, I really like what it does ! But the noise/grain is static : how would you make the noise more dynamic/moving ? I'd like the result to be more "video" than "photo". Anyone knows how to do this while keeping it simple ? Thanks !
- 4 replies
-
- babylon.js
- lensrenderingpipeline
-
(and 2 more)
Tagged with:
-
https://www.babylonjs-playground.com/#EC6R4F#20 So it "works" but it crashes once it propagates out a little. I need an idea of how to establish which zones to build. Maybe like a max ring size instead of what I am doing now and have it only render out say 4 steps from the current zone the player is on? Just hoping for some alternative ideas. http://www.babylonjs-playground.com/#EC6R4F#19 ^^ for a non crashing version without neighborhood checks. #EDIT# Also any math buffs wanna help me with how to do an equation to calculate the distance from the the outer closest edge point or center, which ever is closest. Not just the Center, or at least point me in the right direction?
- 17 replies
-
- lod
- better terrain
-
(and 1 more)
Tagged with:
-
Has anyone done this yet in babylon JS I see a couple of examples but none of the projects I can reference have worked out the camera height in the process or the blending between LOD layers. I am going to start trying to make a working example from the paper http://www.vertexasylum.com/downloads/cdlod/cdlod_latest.pdf but would like to see how others have handled it. I have looked at github.com/darrylryan/BabylonTerrain and github.com/felixpalmer/lod-terrain but both of these are limited to 2d measurements and because I am going to be doing this on a planetary level with Spherical displacement I need to go a step farther. Also I am wondering how I should handle the frustum calculations because in theory nothing on the backside of the planet will need to be rendered but how do I establish the "zone" is hidden on the other side of the planet?
- 19 replies
-
- noise
- procedural
-
(and 4 more)
Tagged with:
-
The following functionality applies the current vertices' positions to the same vertices(No change to the mesh). var arr = mesh.getVerticesData(BABYLON.VertexBuffer.PositionKind); for (var i = 0; i <mesh.getTotalVertices(); i = i++){ var fx = arr[i * 3 + 0]; var fy = arr[i * 3 + 1]; var fz = arr[i * 3 + 2]; arr[i * 3 + 0] = fx; arr[i * 3 + 1] = fy; arr[i * 3 + 2] = fz; } mesh.setVerticesData(BABYLON.VertexBuffer.PositionKind, arr); I'm unsure as to how to apply a random noise, that still takes into account the vertices that are on the same position? If I use something like fx/fy/fz + a random value, the faces split up, and creates holes in the mesh.
- 4 replies
-
- noise
- positionkind
-
(and 2 more)
Tagged with:
-
So yea, my internet was out yesterday and today... soooo I decided to go ahead and create my first written tutorial. Um I hope you like it? https://pryme8.github.io/Das_Noise/Tutorial_1/ Comments, Concerns, Criticism?
- 3 replies
-
- worley noise
- tutorial
-
(and 3 more)
Tagged with:
-
Ok So I have a question, I have been trying desperately to find someone that implemented a JavaScript library for producing different noise algorithms. I have Perlin2D covered but would like to support more. I need to be able to call the generator like noise.worley2D(x/xdiv, y/ydiv, seed); and have a response that will give me an reproducible response depending on the seed. Every bit of documentation I can find does not help me with actually achieving this.
-
Hi everyone. I've been toying around with using perlin and simplex noise to generate height values for a terrain mesh with threejs. My aim is to create something visually similar to Populous. So far I have something that looks like this. At the moment I have custom plane mesh subdivided horizontally and vertically by 10. Each of the mesh's vertices y value is determined by using a noise function. This all works fine enough it seems, though I am running into issues when trying to implement a scrolling effect, again similar to Populous. First I declare and init some variables. //globalvar mesh_width = 10, mesh_height = 10;var tile_width = 1;var xpos = 0, zpos = 0;var x = xpos, z = zpos;//initialize terrain data arrayvar terrain_data = new Array(mesh_height);for(var i = 0; i < terrain_data.length; i++){ terrain_data[i] = new Array(mesh_width);}noise.seed(Math.random());I then define the terrain_data object using the noise functions. for(var j = 0; j < 10; j++){ for(var i = 0; i < 10; i++){ var value = noise.simplex3(x, z, 0); value *= quality; //console.log(Math.abs(noise.simplex2(x, z))); terrain[i][j] = Math.abs(value); x += 1; }z += 1;}EDIT: This was a mis-post. I'm sorry. It can be deleted.