-
Notifications
You must be signed in to change notification settings - Fork 510
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
VRML/WRL mesh export #455
VRML/WRL mesh export #455
Conversation
… KiCad's Buzzer_12x9.5RM7.6.wrl Colours are not deduplicated, transparency/alpha is unhandled
Declutters and seems to be parsed correctly
Thank you for the PR. The only part that I think might be an issue is the "magic values"; although I acknowledge that getting good results in KiCAD is an important goal, I think it is also important to not have hardcoded values that favor one specific workflow to detriment of other ones. Have you compared the rendering results in SolveSpace and KiCAD? If you use |
Actually, now that I look closer, I'm not sure if it makes sense to use |
According to this, |
Hmm, when I update But, I played around with the material a bit more, and reduced it to pretty much just Which, as I understand it (that is: poorly), and correct me if I'm wrong, is to be expected: the exported model specifies how it is supposed to look/behave, or under which conditions it looks "neutral" with its material spec, right? So, if we specify the material that we use within SolveSpace, in this case lighting conditions, was created and looks neutral under [our set of conditions], the renderer that uses the export knows to apply those instead of or on top of its defaults/environment? Anyway, this is the material I arrived at, and a screenshot demonstrating it:
The same but without Without With neither: The colour of this package's body is set to Granted, |
Merged as 837628e. |
I was also gonna add proper transparency handling since you didn't have anything against my caching scheme, but I guess I'll open a second PR? |
Yep, that works! |
As-is, any transparency is ignored, as it'd require emitting a
Shape
per transparency value (I think), so I'd like your opinion on the code as it currently stands before implementing that.I'm not sure if you have any particular preferences regarding the
std::vector<>
usage for colour (and, later, transparency) buffering?As for the material values, I present these four renders, identical, but for the material:
Just

ambientIntensity 1
:Just

ambientIntensity 0.3
, as returned bySS.ambientIntensity
:Material values copied from "Buzzer_12x9.5RM7.6.wrl" (which includes

ambientIntensity 1
):Material values copied from "Buzzer_12x9.5RM7.6.wrl", but with

ambientIntensity 0.3
, as returned bySS.ambientIntensity
:I can't speak for everyone, or for all renderers, but, to me, the last one both looks the best and truest to what I saw in SolveSpace, so that's what I've gone with.