<joseph_>
peepsalot: Thanks for following up. You're right, I didn't see your earlier messages at first. So to confirm, the artifacts won't be an issue in the F6 render, because it's already preprocesed and there's no realtime CSG? How should I alter my GSoC proposal?
retrosenator has joined #openscad
<retrosenator>
openscad is tooo slow
<retrosenator>
how do I make it faster?
<retrosenator>
i need inverse minkowski how do I?
<retrosenator>
and a "reduce" operator to simpliy the mesh because nesting minkowski crash my computer
<dalias>
minkowski is basically unusable :/
<dalias>
i always just find ways to avoid it
<dalias>
if you really want "inverse minkowski", you can approximate it by using a very small minkowski and differencing the original to get just a thin surface, then performing minkowski on that and subtracting it off the original
<dalias>
but of course it will be ridiculously slow
nedko has quit [Ping timeout: 240 seconds]
nedko has joined #openscad
<peepsalot>
joseph_: yes, I think the artifacts are a result of shader + OpenCSG. And OpenCSG is only used for preview. so F6 render should theoretically be free of those artifacts with shaders, but CGALRenderer is not set up to use them yet. It uses very old style fixed-pipeline GL calls instead
<retrosenator>
dalias: I did that but
<retrosenator>
you can't minkowski something thats been minkowskied
<retrosenator>
that is sure crash
<peepsalot>
joseph_: so probably one of the first things to do would be to integrate shaders into the CGALRenderer class.
<peepsalot>
joseph_: another difference with CGALRenderer is the way it displays geometries, using callbacks from CGAL library, which is conceptually very different from our OpenCSGRenderer (or the more simple ThrownTogetherRenderer)
nedko has quit [Ping timeout: 240 seconds]
<peepsalot>
joseph_: IIRC the callback things are only if you are displaying CGAL Nef Polyhedrons (one of the geometry datatypes output by rendering)
<peepsalot>
joseph_: see files like CGAL_OGL_VBOPolyhedron.h, CGAL_OGL_VBO_Helper.h, etc.
nedko has joined #openscad
<peepsalot>
joseph_: we have an internal geometry type called PolySet which is a very simple format, essentially a list of triangles, which translates to OpenGL much more simply. Objects are sometimes in that format even through F6 Rendering, if for example they were linear extruded with no boolean operations, so not actually processed through CGAL
<retrosenator>
is there a way to simplify or reduce the number of triangles?
<peepsalot>
retrosenator: not as "post-processing", so the only way is to not make so many in the first place (adjust $fn, or $fs,$fa)
<retrosenator>
yeah I mean post processing operator "reduce" or something
<retrosenator>
mesh reduction which uses longer sides where there is less curvature
<peepsalot>
that's what $fa is for
<dalias>
using $fs and $fa is generally better than using $fn
<dalias>
it makes it so there are few enough segments that each angle is no smaller than $fa and each segment is no shorter than $fs
<retrosenator>
what angle do you use?
<dalias>
these days i usually use $fa=5 $fs=0.3
<retrosenator>
i dont think this is the same as post processing, because after several operations, areas with lots of triangles in a plane can't be merged
<retrosenator>
but i will try $fa and $fs
<dalias>
this avoids using excessively many sides for small holes, fillets, etc. while also avoiding bad polygonal approximation of large curves
<dalias>
but i dont know if it will help your problem
<retrosenator>
i think it will help
<retrosenator>
though perhaps not enough to nest minkowski
<retrosenator>
i tried $fa=5 $fs=0.3
<retrosenator>
slow as hell
<dalias>
yeah, just don't use minkowski
<dalias>
it's awful
<retrosenator>
well hmm
<retrosenator>
i need to get better to not use it
<dalias>
what are you trying to do?
<retrosenator>
make an object that has sharp corners not have them anymore
<dalias>
consider instead making some modules for primitives you need
<dalias>
like rounded_cube and such
<retrosenator>
my shape is complex though
<dalias>
a rounded cube can be made without minkowski by doing something like intersecting linear_extrude() offset() cube() in multiple directions
<dalias>
but can you just make each of its constitutent parts with rounded corners to begin with?
<dalias>
rather than trying to apply rounding at the end
<retrosenator>
not easily no
<retrosenator>
it would require a lot more lines to do this, would have to rotate extrude and linear extrude I think
<dalias>
rotate_extrude and linear_extrude are imo the most useful operations openscad has :)
<dalias>
and roof() once it's promoted from experimental
<retrosenator>
but yeah being able to do minkowski limited to a sphere as the second operator
<retrosenator>
seems like something that could be optimized
<dalias>
probably
<retrosenator>
what does roof do?
<retrosenator>
i wrote a standalone program years ago that did mesh reduction
<dalias>
it's kinda like linear_extrude but the 2D region is offset(delta=-z) along the extrusion in z
<retrosenator>
using a priority queue with quadratic metrics to determine curvature for which vertices to reduce first
<dalias>
meshlab has something like that
<dalias>
and it works very well
<retrosenator>
if somehow could port that into a reduce operator in scad
<retrosenator>
hmm
<dalias>
objects in openscad aren't semantically meshes, except for polyhedra
<dalias>
the mesh is just the rendering of the geometry
<dalias>
that's why there aren't operations that transform meshes
<dalias>
at the level of the language, meshes aren't a thing
teepee has quit [Remote host closed the connection]
teepee has joined #openscad
<retrosenator>
i see
<joseph_>
peepsalot: Thanks for the info. At first I wondered how F6 rendering was functioning when there were seemingly no other shader files in the repo. I will edit my proposal to add the task of changing the renderer code to support shaders
<retrosenator>
can shaders somehow perform operations?
<joseph_>
teepee: Before I forget, I wonder if someone has already created Dockerfiles with X forwarding for local OpenSCAD dev/testing. So far I've been using a VM for my builds, but prefer Docker. I saw https://github.com/openscad/docker-openscad but didn't see X forwarding there
<peepsalot>
retrosenator: in theory, yes. practically, probably not for a long time if ever. compute shaders exist, but we are a long way from having geometry operations implemented on GPU
<retrosenator>
i mean it could perform all the tests of which side of a plane a vertex is
<retrosenator>
and this would accelerate unions and differences
<retrosenator>
just a vertex/fragment shader
<retrosenator>
ok its hard to do I get that
ur5us has quit [Ping timeout: 260 seconds]
arebil has joined #openscad
linext_ has quit [Read error: Connection reset by peer]
retrosenator has quit [Ping timeout: 250 seconds]
retrosenator has joined #openscad
retrosenator has quit [Read error: Connection reset by peer]
arebil has quit [Quit: My keyboard has gone to sleep. ZZZzzz…]
<J22>
j4l13n: probably noticed the difference between a colon and a comma
teepee has quit [Remote host closed the connection]
teepee has joined #openscad
arebil has quit [Quit: My keyboard has gone to sleep. ZZZzzz…]
califax has quit [Remote host closed the connection]
califax has joined #openscad
ur5us has quit [Ping timeout: 250 seconds]
arebil has joined #openscad
muesli has quit [Quit: NO CARRIER]
muesli has joined #openscad
retrosenator has joined #openscad
little_blossom_ has quit [Ping timeout: 272 seconds]
myosotis has joined #openscad
arebil has quit [Quit: My keyboard has gone to sleep. ZZZzzz…]
<peepsalot>
i am so fed up with git
<peepsalot>
i just want to know how to tell git what the actual path is when it falsely detects a file rename as a deletion
<peepsalot>
i can't rebase or merge older code anymore, it just breaks everything
<teepee>
:(
<teepee>
and merging in master is probably also too much changes to help?
<peepsalot>
idk what you mean. i think "merging in master" is effectively what i'm trying and failing at right now
<teepee>
I mean merging master into the old code first
<peepsalot>
whether its a merge or rebase makes no difference for all the falsely detected "CONFLICT (modify/delete): ..."
<InPhase>
peepsalot: If you redo moves rather than trying to merge or rebase them in I guess that breaks it to?
<InPhase>
peepsalot: Moves are simple enough that you can simply script them in any branch, but then it would have to be able to merge a set of moves back together I guess.
fling has joined #openscad
<teepee>
on a positive note, at 22:00 CEST - Revision Demo Parts 2022 / Shader Showdown Quarter Finals
arebil has joined #openscad
retrosenator has quit [Read error: Connection reset by peer]
KimK has quit [Ping timeout: 250 seconds]
ferdna has joined #openscad
arebil has quit [Quit: My keyboard has gone to sleep. ZZZzzz…]
SamantazFox has quit [Ping timeout: 272 seconds]
fling has quit [Ping timeout: 240 seconds]
fling has joined #openscad
<teepee>
peepsalot: do you have a good example of a cmake find file? I'm having issues with our Cairo file on MXE
<teepee>
it's using pkg-config and as far as I can tell it should pick up the -lpixman dependency but that does not work
<teepee>
the problem I'm always having with cmake stuff, it's never really clear which of the examples are the most "correct" and "modern" way to do things
<peepsalot>
hrm, not sure. what is pixman in regard to cairo? is there a log?
<teepee>
it's a separate lib but I think it's maintained by the same people
<peepsalot>
cairo depends on it, or the other way around?
<teepee>
log, no, it's currently still all local docker build as I'm trying to update to latest MXE for openscad-1.5.0 and the zlib bugfixes
<teepee>
cairo depends on pixman
<teepee>
and it is mentioned in cairo.pc
toulene has joined #openscad
<teepee>
I'll try to generate some cmake trace
<peepsalot>
so, cairo is listed in mxe packages: https://mxe.cc/#packages are you trying to update to a newer version than that (looks like 1.16.0)?
<peepsalot>
or, I guess its building cairo fine, and the problem is just that openscad can't find it?
<peepsalot>
i'm still not clear what the exact issue is... is cairo build not finding pixman?
<teepee>
all default packages, and openscad builds fine
<teepee>
but link fails as it does not link pixman
<teepee>
/mxe/usr/bin/x86_64-w64-mingw32.static.posix-ld: /mxe/usr/x86_64-w64-mingw32.static.posix/lib/libcairo.a(cairo-region.o):cairo-region.c:(.text+0x5a1): undefined reference to `pixman_region32_init_rects'
<peepsalot>
i haven't worked much with pkg config + cmake but it seems like making a find_package module which relies on pkgconfig is just overcomplicating things to me. the top level CMakeLists.txt should just either call find_package OR pkg_check_modules IMO
<teepee>
I guess it's working everywhere else as it's no problem for dynamic linked stuff
<teepee>
I'll try first with just that FindPixman.cmake that cairo itself uses
<teepee>
to get things building first :/
<teepee>
but I guess you are right that if we know that cairo always installs the .pc file, that should be enough to detect it
<peepsalot>
from pkg config cmake docs: The following variables may be set upon return. Two sets of values exist: One for the common case (<XXX> = <prefix>) and another for the information pkg-config provides when called with the --static option (<XXX> = <prefix>_STATIC).
<peepsalot>
so if the problem is related to static vs dynamic, then maybe we need to do something like: if (MINGW) pkg_check_modules(PC_CAIRO_STATIC QUIET cairo) ?
<peepsalot>
or, I think i interpreted that wrong. the call can go unchanged, but just check for variables with static in the name: PC_CAIRO_STATIC_LIBRARIES etc. ?
<teepee>
yeah, those do exist after the pkg-config call, I saw those in the cache file
<teepee>
it did build with the separate FindPixmap call
KimK has joined #openscad
nedko has quit [Ping timeout: 240 seconds]
<teepee>
I dropped the find_library call, it might have fixed it already, at least I'm seeing some -lpixman stuff now
<teepee>
of course the fun question is, will that then work on all the other platforms :)
nedko has joined #openscad
fling has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
fling has joined #openscad
<Scopeuk>
Cake always feels like it's trying to get the jump on me
<Scopeuk>
Cmake**
<Scopeuk>
Any time I get something working it feels more like look than judgement
fling has quit [Remote host closed the connection]
<joseph_>
peepsalot teepee InPhase: Do you have more feedback about the current version of my proposal, before I copy it for public review? I just pushed one more change which further clarifies the shading differences for preview vs render
<teepee>
I'll have a look
<teepee>
shader showdown competition supposed to start now too :)
<teepee>
ah, in 10 minutes
<teepee>
so only 30 minutes later than in the time table \o/
ur5us has joined #openscad
<InPhase>
joseph_: I opened it but didn't read through it yet. Can you remind me when it's due?
<InPhase>
I have the 18th in mind, but I have that in mind for many things at the moment so that might be interference...
<InPhase>
Regardless, I will try to look over it tonight.
<teepee>
joseph_: about the file storage, we already have the separation of system provided (potentially read-only) folder and user folder for customization
<teepee>
cool, that stream is much better, I tried the HLS stream earlier with VLC and that broke every couple of minutes
muesli has quit [Quit: NO CARRIER]
<J22>
seems to be an unfair challenge - evvvvil is a different level
<teepee>
today, yes. in general provod has shown awesome stuff
<teepee>
waiting for the lighting flash effects
muesli has joined #openscad
<J22>
bit like scad vs curv
myosotis has quit [Quit: myosotis]
lastrodamo has quit [Quit: Leaving]
* teepee
votes for both
<J22>
600 minutes pause
ur5us has quit [Ping timeout: 250 seconds]
retrosenator has joined #openscad
<ali1234>
something i have been thinking about recently: what if openscad supported 4 (or more) dimensions? eg you could say: hypercube([x, y, z, w]); and then project() the result into 3 dimensions. would this actually be useful for anything? what could you make with it?
<retrosenator>
yes
<InPhase>
ali1234: I bet the 4D printer would be expensive.
<InPhase>
ali1234: Although if you really want to blow your mind, "View, Animation" is a built-in 4D slicer.
<retrosenator>
nice
<retrosenator>
4d would be amazing
<retrosenator>
but sure rotating through 4th dimension is useful
<InPhase>
peepsalot would need to buy a spacetimemouse
<ali1234>
does csg even work in 4+ dimensions?
<InPhase>
Sure.
<InPhase>
I mean not the library, I assume. But the concept should.
<ali1234>
what would be an example of something that is tricky to do in 3 dimensions but becmes very easy in 4?
<ali1234>
(where the result in in 3d)
<InPhase>
Hmm. Well for example if you extrude a sphere cylindrically into a fourth dimension, rotate it very slightly around an axis perpendicularly to the extrusion, and then 3D project it back into a cylindrical-like shape around its original extruded axis, you'll end up with a cylinder that has a very slightly rounded top and bottom face with the amount of that rounding being determined by the amount of the
<InPhase>
rotation.
<InPhase>
There are all sorts of little games you could play like that, similarly to how you can morph 2D objects by going into 3D.