Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
So I'm interested in vertex color and procedural textures for my future CC project. Graphics like the original Playstation. That said, I've been making some tools to work with various free CC0 low poly models I've found. I'm really a big fan of these modelers who give out these great sets for free, and I want to make using them in CC more enjoyable. I have quite a few ideas to chase at the moment, but recently Just_In_Case put my "Random Vertex Color" editor plugin on his great website. This new editor plugin takes in the number of materials assigned to a model and allows the user to set a vertex color per material slot. Here is the code:
I give this code to the CC community to do with what they want, free of charge, for both non-commercial and commercial purposes. Consider it CC0. No credit needed. Simply copy and paste the code into a text file, save it as "vertexColorByMaterial.js", then place it in your CC plugins folder in your CC documents folder. The key combo for this plugin is "Ctrl+Shift+L" but can be changed to anything you want by simply changing this line of code:
Note: In the example code above, I have changed "Ctrl+Shift+L" to "Ctrl+Shift+B". I hope someone finds this code useful. Cheers. |
||||
|
Oops! I meant to put this in the Programming and Scripting section of the forums. My apologies. |
||||
|
I am already doing something like that with Justin's case shader, that make use of vertex color for specific or all material / textures. |
||||
|
That's great, @Aiming_bullets. I've not gotten around to messing with shader code yet, but will eventually. Good luck with your code. |
||||
|
Noticed a minor error. Here's the updated code:
|
||||
|
How nice, thank you! I've wished for this to be possible - as a workaround i've instead applied single color textures for each material slot, which is totally fine, but this would be even better. Tested the script and it works well in all it's simpleness. If it could be extended, or if @niko, could implement this somehow in the editor, i would further wish for the possibilities to: - Visually see the vertex color in the material slots and preferably also pick a colour from a chart, rather than type in RGB-numbers. - Also an icon/menu-item for using it, in the editor |
||||
|
@blackwater Before I wrote the code above, I wrote this code to display the RGB values to me since CC doesn't do that. This code is also CC0 and given freely to the community. I may return to this code in the future and make the RGB values display all on one menu, but it works for the time being. Thanks for your comment, and you're welcome.
|
||||
|
Cheers 'Guest' - some nice code... I didnt know you could replace text using rgb.replace(" ", ""); - good to know... |
||||
|
Thanks for the comment, @Robo. Much appreciated. |
||||
|
Nice extension @guest, @aiming_bullets my shader applier per pixel color to the object. @Guest I recommend you to check out Shaders as well, it is only adding one line of code to the sample shader available in the documentation. just multiply the output with the desired color and you will get the same effect. But I am glad you are providing alternate solutions to that, as shaders don't work on all the platforms, so working with polygon editing might be a ++ in such cases. Thanks for wonderful code of yours :) |
||||
|
I'll definitely check out your shader, @just_in_case. Thanks for commenting. |
|