Hello everyone,
another basic question, like adding 3d geometry to the scene, can you add 3d volume like animated smoke as either a sequence of images (sprites) or a volume
Thanks in adavance
Hello everyone,
another basic question, like adding 3d geometry to the scene, can you add 3d volume like animated smoke as either a sequence of images (sprites) or a volume
Thanks in adavance
Hi!
Fog: Fog, Basic Fog, and Better Fog (Three.js Tutorial) - YouTube
Soft particles: Points transparent textures depth artifacts (soft particles)
Hi Paul,
thanks for the links provided , have a few question
say if i have a sequence of images how do i import them as animation into the scene,
and in the code below , where do i specify the texture image
found this ,
const depthTexture = new THREE.DepthTexture();
depthTexture.type = THREE.UnsignedShortType;
depthTexture.minFilter = THREE.NearestFilter;
depthTexture.maxFilter = THREE.NearestFilter;
The respective render target:
const renderTarget = new THREE.WebGLRenderTarget( width, height, {
minFilter: THREE.LinearFilter,
magFilter: THREE.LinearFilter,
format: THREE.RGBAFormat,
depthTexture: depthTexture,
depthBuffer: true
} );
After rendering, you can then use the depth texture as an input for your soft particles shader. Maybe like so:
shader.uniforms[ 'tDepth' ].value = depthTexture;
You can then read the depth values in GLSL like so:
float depth = texture2D( tDepth, vUv ).x;
Thanks for the support