Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
I've been messing with making prefabs of simple geometry for use in CC. Basically copying the contents of Unity primitive "blockout" kits for fun and learning. I'm not texturing them because that's not needed for a "blockout/greybox" or whatnot. I like to just slam the vertex-painted shapes together before merging the meshes into one and exporting to another program for texturing. If you're not doing this, I recommend you give it a try. It helps to deconstruct complex objects into simple colored shapes. Least that is what I've found out. That said, one thing I do not like is picking out the vertex color for my shapes. It's tedious when adding a lot of shapes to pick out colors. So to reduce those extra clicks I wrote a little editor plugin to do it for me, and that is what I want to share.
Just copy this code to a text file, save it as "randomVertexColor.js", and put it into you plugins folder. Next time you launch your CC you will be able to press Ctrl + P to apply a random vertex color to your geometry nodes. You can even hold down the keys to watch it run through a bunch of colors. Note: you can change the key combinations by simply replacing this line: editorRegisterMenuEntry("randomVertexColor()", "Apply random vertex color\tCtrl+P"); to something like: editorRegisterMenuEntry("randomVertexColor()", "Apply random vertex color\tCtrl+L"); It will now work with the Ctrl + L next time you open CC or reload the plugins. I recommend looking on Just_In_Case's website for his "Keyboard Shortcuts" plugin to see what other keyboard shortcuts are valid. Here it is, just open and look down at the bottom to see all the combinations you can use: https://neophyte.cf/ccb_plugin_k... You are free to do anything you want with this code. I release it to the community. If you do make something else with it, I would personally like to see it posted here for everyone. Maybe your way of doing it is superior than mine. I'm still new to programming but CC has greatly helped me learn and feel comfortable with JS. Cheers, guys. |
||||
|
Thanks a lot for sharing the plugin :) I also have an extension on my PC that allows you to change vertex color during the runtime of the game, I haven't added any ability to change the color to a random color but to a specific color. Maybe I can add the random color ability to the extension so that we can change vertex color during runtime. I created this extension for Helix Jump Demo of mine but never had time to use it or work on that project again. If you don't have any issues, would you allow me to put your plugin on Neophyte.cf with proper attribution and a link back to your contact email address or website ? |
||||
|
Hey Just_In_Case! I consider Neophyte.cf as part of the CC community, so you're free to post the code on your website. I don't need any credit since I released it to the community. Truth is I'd be happy to have it on your website since more people will likely see it. I searched the forum here for something like it and didn't find anything, so I decided to work on it and post it here. I'm happy just knowing I contributed something. I've learned a lot from your YouTube videos and website. Appreciate all you do. Cheers. |
||||
|
Thanks, uploaded it as a plugin asset on neophyte.cf here:- https://neophyte.cf/ccb_plugin_r... |
|