Il 07/12/2012 11:23, Ted VjBros ha scritto: > Le 06/12/2012 17:10, mrk25 a écrit : >> Hi Kas, thanks for your suggestions, i'll try to explain a couple of >> things. >> >>> I looked over it and I couldn't spot the "terrible hack". Could you >>> explain what you are doing and why? I have a hunch it has to do with >>> blur's effects on the background, I have at times wanted to do >>> something like that, at least. >> hope my english here isn't too weird to understand: please forgive me, >> I'm Italian :) >> >> The first big problem that I encountered is that I can't load .obj files >> on-the-fly because it freezes the output for some seconds... >> >> So i load them all when executing the first script ( _start_linux.scm + >> the included lib/objects.scm ) and put all objects by default to -1000 >> on Y axis. >> >> After that the function (shapeSchema) - which is called when pressing >> keyboard letters to have a sort of control pad ( see lib/keys.scm file ) >> - passes to the function (pulse) the objects that must be moved up of >> 1000 on the y axis and animated. >> >> Here comes another problem: once an object is passed to the (pulse) >> function and substituted with another, I can still see the first moving >> and rotating 1000 units far in the background... quite ugly, because >> when loading many objects they become an irregular spot fluctuating in >> the far background. >> >> At this point I needed to fastly patch this behaviour before saturday >> and introduced a bgPlane object in the (pulse) function, that is simply >> a very big black plane, still placed at -75 untis on the Z axis. It >> hides far objects keeping the nearest ones well visible. >> >> I guess it's not the proper way to do such things, but for now it's the >> better solution I found, and enough for saturday evening. >> >> Any help on this issues will be much appreciated. > > Hi mrk, > What you can do is to set your objects to hide with > (with-primitive your-obj > (hide 1)) > Let them on the origin and when you need to show your object just call > (with-primitive your-obj > (hide 0)) > > The other solution, if it feet, is to let your objects hiddden, and > call (draw-instance your-obj). > Although the original is hidden, the instance will appear (if I > remember). > You enter in drawing mode, so you don't have access to pdata's but you > steel can manipulate the instances > with translate, rotate and scale. > The advantage is you can make any instances of your original object > and they'll disappear as soon as you stop calling (draw-instance) > The build way to do this is (build-copy), but you have to store your > copy in a variable, to (destroy variable) later. >
Thank you very much for your suggestions Ted, I'll give a try to both. > Also, I had some background issues to. It came from the (blur) > function which depending of > you place it make this artefact. Try to place it outside a > (with-sate). It worked form me. > > I'll give a look to your git code. > > Good luck with your gig. > > Cheers, > Ted > > Thanks again, your help is precious for me to better understand the state machine and fluxus rendering engine. -- mrk
