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
Flat colors render mode #524
Comments
Think, such mode would be especially useful for export 2D view to PDF and SVG. |
One option is to set the intensity of both light sources to 0.0. There is still an ambient light which will show the model but will not be as bright as you may want (white shows as a uniform grey). Proper flat shading might just be turning off the existing lights and changing the ambient brightness which is no a UI option. |
@Symbian9 Digging all the way down to the shader code it looks like simply setting the ambient lighting to 1.0 would effectively disable the 2 lights and produce the desired effect. Unfortunately that parameter isn't in the UI at the moment. |
Nice. @phkahler, I hope, you would be able to solve this issue & add some UI controls for enhanced control for render parameters into "Property Browser". |
@whitequark what would you think of automatically setting the ambient lighting to 1.0 when both lights are set to zero brightness? That would not involve a UI change but should provide flat coloring if wanted. @Evil-Spirit Related to shading, what is the coordinate system for the lights? I thought the position was x,y,z with +x to the right, +y up and +z out of the screen. But when mucking about with the shader code it seems there might be some sign flipping going on between the UI and the shader, is that correct? @Symbian9 what is wrong with your solution to place the light at 10,000? Is it just the lack of any way to reset it to normal without writing it down or remembering? |
That seems really hard to discover. I think a checkbox like |
Actually don't remember. One of the lights direction probably is in camera space. |
Beside it looks as needed on screen & on export 2D view to PNG, placing the light at Z: So my solution with
@whitequark, it would be great! Also, on implementing this solution add related CLI option too, please! |
@whitequark I'm leaning more towards adding the Ambient parameter to the lighting config. I've also been experimenting with shaders and may have another parameter at some point. |
…Ambient lighting.
…Ambient lighting.
…Ambient lighting.
System information
3.0~690f87c
Expected behavior
Add an option "Show flat color view of solid model" to enable "flat colors" render: (direct RGB values without any gradient shades; independent of light direction)
Actual behavior
Actual render has gradient shades, according to default "light direction" setting.
And it's non-trivial task to get near "flat colors" render in SolveSpace.
As workaround I use next settings:
(
10000
used for#0
light source Z, because with10
,100
and1000
value gradient shades still appear visually)Additional information
As side note, seems like there no way to reset "light direction" setting to default values:
So, it would be good to add button for reset "light direction" too.
The text was updated successfully, but these errors were encountered: