Questions tagged [buffer-geometry]

A geometry class used in the WebGL framework Three.js to increase performance.

A buffer geometry is a certain type of geometry in the Three.js library that will increase performance and decrease memory usage because it reduces the cost of passing all this data to the GPU.

The official documentation for THREE.BufferGeometry can be found here

139 questions
2
votes
1 answer

JavaScript/three.js: THREE.BufferGeometry not receiving any light or shadows

I'm experimenting with generating terrain with noise functions, but I'm having problems with getting the BufferGeometry mesh to receive any light from PointLight. When setting AmbientLight I can see the BufferGeometry but with only PointLight it…
tirithen
  • 3,219
  • 11
  • 41
  • 65
2
votes
1 answer

Display 25000 lines at 60FPS in THREEJS

I display 25000 lines in THREEJS and the performance is pretty poor. (<5FPS) I follow the "simplest" approach by creating 1 mesh per line and adding it to the scene: // trks is an array that contains 25000 geometries var trks = ...; var…
Nicolas
  • 2,191
  • 3
  • 29
  • 49
2
votes
1 answer

Transitioning vertices between 3D models with three.js

I am trying to achieve polygon blowing and reassembling effect similar to: http://na.leagueoflegends.com/en/featured/skins/project-2016 https://tkmh.me/ In both of these examples, you can see how they are morphing / transitioning the vertices from…
Georgi B. Nikolov
  • 976
  • 2
  • 13
  • 24
2
votes
1 answer

Extrude Buffer Geometry in Three.js?

I recently went back through a scene, replacing all the creations of new THREE.SphereGeometry() with buffer geometries: new THREE.SphereBufferGeometry() (cylinder, circle, box, etc.) down the line for all my geometries. Hit a snag creating new…
marqso
  • 61
  • 9
2
votes
0 answers

THREE.InstancedBufferGeometry, THREE.MultiMaterial and groups

I need some clarification regarding the use of addGroup method in THREE.InstancedBufferGeometry, when using it with THREE.MultiMaterial. This is r75, source looks like this: THREE.InstancedBufferGeometry.prototype.addGroup = function ( start,…
Arnaldof
  • 174
  • 11
2
votes
1 answer

Render Order of BufferGeometry in Thee.js

Following the previous question, I'm dealing with building models in BufferGeometry, and realize that the transparent flag affects the render order: objects with transparent materials will be rendered after non-transparent ones. Also, I read from…
Jason Yang
  • 43
  • 4
2
votes
0 answers

Insufficient buffer size, a buffer must be bound

I'm trying to add a lamp to my scene with an OBJLoader object. The object is exported from Blender. If I set its children[i].castShadow property to true the following errors show up but still it appears and its shadow can be seen on the wall: What…
masm64
  • 1,222
  • 3
  • 14
  • 31
2
votes
1 answer

Animated buffergeometry with morphattributes not updating shadow

I have converted the MD2 code from the library to use THREE.BufferGeometry instead of THREE.Geometry to vastly improve memory footprint. To do this I just convert the model to THREE.BufferGeometry after it is done loading. I also had to modify the…
fluffybunny
  • 496
  • 3
  • 8
2
votes
1 answer

three.js point clouds, BufferGeometry and incorrect transparency

The problem: I have a point cloud with quite a lot of data points (around one million). When I apply transparency to the rendered points, the transparency somehow does not show what is behind the rendered points As you can see in the example of the…
Dänu
  • 5,791
  • 9
  • 43
  • 56
2
votes
1 answer

BufferGeometry indices issue

I'm trying to port some code that I made in openFrameworks into THREE.JS. The code generates a landscape using perlin noise. I made it so that first a static index array is created, and then the positions of the vertices are placed out in a square…
jacknkandy
  • 21
  • 1
  • 2
2
votes
0 answers

ShaderMaterial on BufferGeometry

How can I apply ShaderMaterial on a BufferGeometry? All the threejs examples and everything I could find on BufferGeometry use default materials (MeshPhongMaterial for example). I have a working shader on Geometry, but when I convert it to…
asdf
  • 721
  • 2
  • 8
  • 24
2
votes
2 answers

How to draw simple square using BufferGeometry?

How can I draw simple square using BufferGeometry? For example BufferGeometry draws 120000 triangles and I want to knock it down to two that form a simple square. test app