Timeline for Change shadervalues for different Meshes in Three.js
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 29, 2017 at 20:30 | vote | accept | TheCell | ||
Dec 29, 2017 at 20:29 | answer | added | TheCell | timeline score: 1 | |
Dec 27, 2017 at 10:15 | comment | added | TheCell | ah nice thanks, I think I got that wrong from your previous answers! Will try that and answer my question for others to see. Thanks a lot. | |
Dec 27, 2017 at 10:04 | comment | added | gman | You would have one material per object you're drawing. In the page you linked the top screenshot shows 5 people in different colors so you'd have 5 materials, one for each person with that person's color settings. If you want to change the color of one person you just need to set that person's material colors. Each person would have a mesh. Each Mesh would use the same Geometry but that person's Material. 1 Geometry, 5 Materials, 5 Meshes | |
Dec 27, 2017 at 8:39 | comment | added | TheCell | hm maybe I'm just too new to the whole shaderprogramming. Would I have to create a new Material every drawcycle while I was dragging my mouse along the color wheel? Would I have to have 2^8, 2^16 or more different materials to cover every possible color? Thanks. | |
Dec 27, 2017 at 8:31 | comment | added | gman | Not sure what you mean. You can do that exact thing from the page you linked to by using different materials. | |
Dec 27, 2017 at 8:25 | comment | added | TheCell | well that defies the purpose of this shader. I would not be able to have a color wheel and my color be choosable by the player. I'm looking into something that let's me dynamically swap the colors of a team like this gamedevelopment.tutsplus.com/tutorials/… but in 3D. Thanks for your answer nevertheless. | |
Dec 27, 2017 at 4:14 | comment | added | gman | Make multiple materials, set a different color on each material, then make a new Mesh for each object. A Mesh is a collection of a Material and a Geometry. It's whole point is to let you have multiple copies of some Geometry with different material parameters at different places in your scene. | |
Dec 26, 2017 at 18:33 | history | asked | TheCell | CC BY-SA 3.0 |