Comments (3)
As Mugen mentioned - users can already do this by creating geometry with a color channel which is effectively how InstancedMesh worked. In order to do this in a more memory-efficient way you'd need to pack the per-geometry colors into a texture and sample them in the shader. I've provided a demo of this idea in #27170 (comment).
In short, though, I think this can be closed as a duplicate of #27203 which is really just about being able to have more granular, high performance control over the material of individual geometries.
from three.js.
Instancing and batching work different meaning you don't have instanced attributes when rendering a batched mesh. Having instanced attributes made it easy to implement instanced colors for InstancedMesh
.
It's important to highlight that setColorAt()
was added so different colors per instance was possible at all. When using BatchedMesh
, you can already have different colored geometries via vertex colors.
Meaning if you use addGeometry()
with geometries that hold a color
attribute, you can author different colors per geometry by simply altering vertex color values.
from three.js.
@gkjohnson Have your ever needed this?
from three.js.
Related Issues (20)
- BatchedMesh: `deleteGeometry` - how to re-activate? HOT 7
- GLTFLoader outputs an empty Group when multiple scenes refer to the same root node HOT 1
- Playground: Timernode not working
- Support for KHR_materials_dispersion HOT 3
- unpkg is slow when we're using NodeMaterials HOT 2
- Property 'viewport' does not exist on type 'PerspectiveCamera' HOT 3
- `flatten` function in WebGLUniforms is not properly catching NaN HOT 3
- Editor adds undo recovery option for non indexDB HOT 3
- Support non-integer loop start and ends when using pragma unroll_loop_* HOT 8
- Add transform origin (or "pivot point") support to the editor HOT 7
- Raycaster.setFromCamera: Position the ray origin at near plane rather than camera origin HOT 10
- When using tween for animation with yoyo(true) set, the element flickers briefly upon returning HOT 1
- Texture Error loading in WebGPU loader gltf compressed example HOT 9
- 4321.vn: Tìm kiếm thông tin một cách thuận tiện trên Internet
- 4321.vn: Khám phá thế giới Internet thông qua cổng thông tin đa nền tảng
- colorspace issue in WebXR in Apple VisionOS 1.1 HOT 6
- Using built-in environment, reporting errors HOT 1
- USDZExporter naming consistency
- Add generator-based Object3D traversal methods
- Error EXR: `deepscanline`. warning: `deepImageState`, `idmanifest`. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from three.js.