Recolor specific parts on a buffergeomety

Hello! Apologies if this is an obvious question, I’m very new to three js and having some trouble wading through all the resources out there.

I’ve loaded an OBJ in with a loader, and had no trouble recolouring faces on a basic box - however now i have a much more complex object based on buffer geometry. So far my understanding was that to recolour specific parts of the geometry I would have to add a colour attribute which contained an array, with each colour index matching that of the attributes position index? However, given that my object attributes position array is 70,000 items long, it seems unrealistic to pass through another 70000 length color array just to change a small section of it. Is this the only way to do it?
Similarly, is there a reasonable way to select the specific areas I want to recolor without having to trawl through the array trial and error?
If you could point me in the direction of any resources that address these issues id greatly appreciate it - again, sorry if this is an obvious question!

Hi!
Why do you want to do it? And how?
Could you provide more detailed explanation with pictures?

Related topics:
Topic 1
Topic 2
Topic 3

Thank you for the links, they were really helpful!

Essentially, I’m looking to heatmap muscles in a human body. However given that the muscle group won’t change from user to user, I realised it’s probably much easier to just chop up the model in blender and import it as several different sections.

Thanks again for the links!

1 Like