Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Color() for viewing? #29

Open
johnsonm opened this issue Oct 5, 2020 · 2 comments
Open

Add Color() for viewing? #29

johnsonm opened this issue Oct 5, 2020 · 2 comments

Comments

@johnsonm
Copy link

johnsonm commented Oct 5, 2020

I could imagine Color("colorspec", [oc.TopoDS_Shape]) or something like that to apply a color to a list of objects.

Sometimes I apply random colors to objects just to be able to tell them apart easily when I'm making a complex model.

If the "colorspec" included alpha it could be used for debugging as well; if that's hard to do with oc then perhaps instead there could be a separate Transparency() that is like it but provides, say a 0-1 range of transparency for the object.

@zalo
Copy link
Owner

zalo commented Oct 8, 2020

This is a good idea. It'll be slightly tricky to implement since I recently refactored the drawing system to draw everything in a single draw-call (to make editing .STL Meshes feasible), but this may be worth adding the additional complexity...

It would be really slick to propagate colors through changed faces on CSG operations, but that requires a level of OpenCASCADE access that is beyond my familiarity right now.

EDIT: Oh, actually I just remembered that I’m propagating face index into vertex color for the color picking, so it may be reasonable to propagate actual color information that way too... another good reason to fork the MatcapMaterial and begin adding custom features (colors, per-face highlighting, proper envmap reflections, etc.)

@flolu
Copy link

flolu commented Jul 12, 2022

@zalo You mentioned "per-face highlighting". Would #147 be possible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants