i build my first ofelia(lib)patch together with @ingox and my brother. its again based on the lissa seq, basically theres just another visualisation.
i wonder if there is a similar object like ofLoadPath2d in gem, it works very well. only if i use curves it starts to get slow - if a lot is happening. here is the patch. have fun: lissaseq_ofelia_version.pd
-
my first ofelia patch
-
Hey @Jona
Nice work. It looks really cool!I tried the patch on macOS but there was a problem when opening the patch.
So I changed [loadbang] to [ofWindowLoadBang] and now it works fine.
1519836948276-lissaseq_ofelia_version.pdIt is because some graphic objects don't work properly until the window is created.
So it's safer to use [ofWindowLoadBang] to initialize graphic objects.EDIT : Your original patch works fine on macOS with the latest version of ofelia v1.0.5
I think the closest object like [ofLoadPath2d] in Gem would be [polygon] although the number of points is fixed per object.
And yes, using curves is generally much slower than drawing lines. You can send the "curveRes <f>" message to [ofLoadPath2d] to set the resolution of curves.
Zack
-
@cuinjune thanks. now it works also on my mac (i build the patch on windows). just tested it a few hours ago on my old mac, and i thought it is too slow.
thanks for the info about the polygon object. nice thats its possible to put a list with all the coordinates at once into ofLoadPath2d.
it would be nice to build threedimensional lissajous figures with textures and lighting (just discovered ofLoadPath3d). but i think i have to build a mesh for the use of textures because it doesnt work (out of the box) with loadPath2d and vertex points? -
@Jona Yes. [ofLoadPath3d] only stores a set of vertex points whereas [ofLoadMesh3d] can store vertices, indices, texture coordinates, normals and colors.
So if you want to apply textures and lighting to custom 3d shapes, you need to use [ofLoadMesh3d]. -
@cuinjune thanks. i build a [ofLoadMesh3d] with vertices and texCoord. for texCoord i use x and y from the vertices. the colors from the texture are applied but the picture is distorted. it seems that the texture is squeezed to the middle of the screen, and there is only one color above and one below. do you know what i am doing wrong?
with blend mode off its perhaps more obvious:
-
@Jona I'm not sure, but first thing you can try is placing [ofSetDepthTest OFF] after [ofDrawMesh3d].
Because currently the depth test is disabled for the 3d mesh you are drawing.
Let me know if it works.
-
@cuinjune we found a way to make it work, basically the texCoords need a range between 0 and 1. nice possibilities with your lib
ofelia_lissa_seq_5c.zip
-
@Jona I'm glad it worked! And I like your video. It looks really cool.
I also uploaded a video playing with your patch. -
@Jona And In case you didn't know, you don't need [ofGetLastRenderOrder] and [ofClear 63] in your patch.
Even without calling [ofClear], the background will be cleared each frame by default unless you call [ofSetBgAuto OFF].
The reason [ofClear] is in all help files is to clear the previous drawings and only show the drawings for the help file. (so it won't be mixed with other drawings when user opens the help file)
And you can set the background color by sending [bgColor( message to [ofWindow] object or by connecting [ofWindow]'s outlet to [ofSetBgColor]'s inlet .
This will affect the color of the object that you're drawing if you use the blend mode.
-
@cuinjune nice video (still need to clean up the patch ). and thanks a lot for the hints, just used some constructions from the help files.
-
I cleaned the patches (i forgot to delete list store so the list was getting longer and the patch slower ) and made a 2d version with a position index (colored edges), it represents the sound in a more "obvious" way than the 3d version. Also the animation is smoother now. And I altered the way the mouse changes the pattern. In 3d I tried to move a miniature copy of the created object at the played position, but it was hard to set the exact path. the idea was not to delete the copied object every frame but to fade it out slowly, like a motion blur but only for one render chain, so that the motion of the melody in time gets visible. but perhaps its too complicated or not possible, also not very important (it is not implemented in this version)
Lissa_Ofelia_2d_3d_b.zip
-
@Jona Hey, some nice improvements to your work.
By the way, you have [l] object in your "main2d.pd" patch which I believe is not part of Pd vanilla. (you will find it above [ofLoadMesh2d])
I could see the color changes after I replaced [l] with [list] .
Other than this, it all seemed to work fine on macOS. -
@cuinjune you`re right, that was the error
-
here is another update of the 3d version, mainly more tidy than the old patch, but also some improvements: Lissa_Ofelia_3d.zip
@cuinjune is it possible to save and draw copies of the ofDrawMesh3d polygon with the ofDrawFbo or the ofPopMatrix/ofPushMatrix Object or another way without creating a new ofDrawMesh3d/renderchain everytime? I would like to draw miniatures of the polygon that draw the path of the melody at the edges of the big polygon and dissapear slowly (and stay in the shape of creation but rotate with the edges of the big polygon). Perhaps similar to the fboTrails.pd example, but with the 3d polygon instead of the circle and a slower fade/more copies and a bigger distance between them. But Perhaps I will also try with a circle or a line first.
-
with painting in time i mean something like this (also if the line didnt follow the exact path yet ) :
-
@Jona Hi, I'm not sure if I correctly understood what you want to do but there are many ways to draw copies of [ofDrawMesh3d].
The simplest fix to your current patch to draw copy of the mesh would be like this
Also, you can simplify your drawing chain as the following. (I removed [ofSetDepthTest] because it is disabled anyway before the mesh is drawn. and [ofSetAntiAliasing] only works with lines)
And then copy it and just change the drawing position and scale.
Is this similar to what you mean by "draw miniatures at the edges of the big polygon"?
And if you want to achieve the Fbo trailing effect, you need to write the drawing to the Fbo using [ofCreateFbo] with a semi-transparent rectangle which has the same color as the background.
I will quickly try this too and post the result here.
-
@Jona I'm not sure if this is what you want but I modified your patch a bit to show you how FBO trailing effect can be done.
And here's the patch archive. Lissa_Ofelia_3d.zip
Let me know if you have any further question.
-
@Jona Here's another one I made by chance based on your patch.
I kinda like it cuz it looks like a flame.
And here's the patch archive. Lissa_Ofelia_3d.zipAnd here's one more which looks like... hell. Lissa_Ofelia_3d.zip
-
@cuinjune very nice recordings and thanks a lot for simplifying the patch. and for explaining the trailing effect and fbo and the other hints.
i also start to understand pop and push matrix.
just the positioning doesnt work right at the moment, but i will figure that out by myself. is it possible to draw fbo s "dynamically" at every vertex point of the big polygon? if not, its not very important edit: if i understand it right its not possible, at least not with the mesh3d commands, and i need to create an ofDrawFbo or ofDrawMesh3d for every object.
main_pop_push_fbo.pd
-
at least its possible to use the fbo as particles (thats great). perhaps thats the right direction, to draw one particle at each vertex point of the polygon (just experimenting)
lissa-particle.pd -
@Jona Great work! Looks somewhat expensive though.
If you know each vertex point of the polygon, you should be able to use these points to dynamically position any objects.
But you need to know vertices of mesh uses (0,0,0) as the center position so you need to adjust these vertices to use it as a position of objects outside of mesh.In case you can't understand it or unable to make it work, please upload a minimal & simplified patch then I will try to fix it and explain it to you.