[Plugin] Color by Z (Updated August 27th, 2009)
-
I was definitely thinking of DTM's and DEM's etc when I was thinking about how it should work. I've got a lot of ideas as to how to improve it in the future, but this is a good start I think.
Chris
PS I re-uploaded it right now. You might need to re-install it.
-
Wow. You are making really cool plugins, Chris !
Almost Rhino's Grasshopper.
It would be great to also have a plugin that lets you pick a point in a flat (or curved) surface and a gradient will made from that point, like magnetic points. Moving the point, will shift the color gradient. Very useful for lakes and grass areas. But also for some wicked material use on facades etc... -
"Undfined method file loaded for main object!"
so no ruby -
Hmm, its working just fine for me. I just installed it on a fresh machine, not the one I created it on.
Could you copy the entire text from the ruby console? Thanks Pilou, you've been a die-hard script tester for me! Sorry they never seem to work for you on the first try
Chris
-
I can't open the ruby console it's at the start of the prog!
I must press OK and no ruby and no ruby console possible before!
-
Chris, Super Idea and Implementation.
I can definitely see where this would help when "Use Sun for Shading" doesn't produce desired shading nuances.
Many thanks for coming up with this!
If you select a group, is it able to act on all surfaces within that group?
Regards, John
-
Thanks John and all!
For now, it does not work on groups by design (and because I haven't made a plugin that drills down into groups, so I would have to learn how). But I made it so it would leave all groups alone because I didn't think it would be desireable to have it re-paint your trees and buildings and things.
I suppose once I get it able to drill down into groups, I could just put in a prompt asking if you want it to work on groups and components. That would probably be a good solution.
Chris
-
Thanks Coen! This script was a good challenge for me, so I'm glad I got it to work at all!
John, those are great ideas. I'll have to look into how to implement them. I know I can get the color palette in this one too easy enough, but I can't get it to remember colors very well or to give it my own starting colors. If I could figure that out, then it would be super easy to save chosen color schemes and re-use them. Maybe Ill contact the guy who developed the SU color palette and see if he can give me any tips on how to use it better.
Anyhow, thanks for using it. I'm interested in you image though John. You have some unexpected coloration going I think. It looks like you have patches of light color moving up into higher elevations and a single color crosing over onto multiple faces. I'd be interested in seeing that file maybe. Thanks!
Chris
-
I know in SU7 you can 'make a texture unique'.
Unfortunaly I am on SU 6. Is there a workaround to get it in SU 6 as well?
It would be great to be able to make a unique (projected) texture out of the mesh produced by Color by Z...Keep up the good work! That city/terrain greebler is going to be a blast when you will have finished all the needed rubies.
We have a new ruby master -
Looks cool, Chris!
maybe we should just update the first post w/ new versions as it get confusing to try to follow if one has the most up-to-date version or not...
thanks for sharing and this is a great ruby idea!
-
I'm definitively fascinated by the way you produce so many plugins.
MALAISE ................. -
Aha! I think I forgot to add "require 'sketchup.rb'" to the top of the file. And I think that is the problem. Try the current version. THanks,
Chris
-
I've experimented with something similar in the past but gave up because I didnt find a way of getting a smooth gradient. Colors are applied to every polygon and not the UV values. Also it resulted in a "LOT" of color swatches in the material browser. Is there a way of applying colors but not having them added to the materials? And is there a way of using the UV values to get a smooth gradient?
-
Works now!
-
Thanks Chris , your creation is still very cool and fantastic, my model is look better now
-
@pixero said:
I've experimented with something similar in the past but gave up because I didnt find a way of getting a smooth gradient. Colors are applied to every polygon and not the UV values. Also it resulted in a "LOT" of color swatches in the material browser. Is there a way of applying colors but not having them added to the materials? And is there a way of using the UV values to get a smooth gradient?
Yes, that is exactly what the new SU 7 feature 'Make unique texture' does. It makes one big gradient texture to project on your geometry.
If you go to the other plugin thread by chris (Random Color Select), he demonstrates this feauture in his proof of concept video in the first post.Since I don't use SU 7 (various reasons, the handicapped component browser is one of them), I truely miss that 'make texture unique' option.
-
SU7 has an option called Combine Textures (The Combine Textures menu item combines separate textures on adjacent co-planar faces into a single larger texture. This feature also, optionally, removes edges between co-planar faces to reduce the polygon count for the model as a whole. Context-click on multiple selected parallel faces, with at least one face having a texture, and select Combine Textures to create a texture which is unique to that set of faces.)
This is a great tool, but it will be more usefull if it`s extended into curved surfaces. This Color by Z or the Tools On Surface are examples of plugins that will be benefit.Daniel S
-
I still don't get a smooth gradient.
-
The way to get a smooth gradient is to make a material in photoshop that is a big smooth gradient. Then bring it into your model and turn it so it is standing vertical next to your model. Set it to "Projected". THen select all of the land for it to be applied to and apply it to your model. You'll get all faces nicely mapped with a single image.
I just don't know how to do all that in one clean ruby unfortunately. So painting each face its own material is the closest I can get for now
And with the combine textures bit....theres a HUGE downside to that. While it works great in that video I did, it only works on planar faces. So to get it to work on something like this, I would need to create a flat version of my terrain mesh, then apply all my materials to it, then run combine textures, then re-apply the new textuire onto my non-flattened terrain. So thats not terribly smooth either.
But it is what it is. Hopefully this script will be helpful for someone
Chris
-
The script idea I played with was to apply different colors based on slope and the side projected gradient doesnt work for that.
Texturing is another area in SU we could wish for improvements in.
Advertisement