scene processing

Mar 29, 2008 at 10:31pm

scene processing

Im trying to be able to apply separate shaders to three different geoetries. I am using Vades patch that uses the to_texture method. I can not seem to get it to work though. Please help

my patch

attached

vades patch

max v2;
#N vpatcher 190 133 1187 808;
#P origin 0 39;
#P window setfont “Sans Serif” 9.;
#P window linecount 2;
#P comment 542 613 309 196617 we can also use multiple usetexture and to_texture to allow for rendering multiple ‘scenes’ of opengl and using slab mixing!;
#P window linecount 1;
#P comment 42 152 147 196617 Ive removed the letter boxing.;
#P comment 644 187 69 196617 some objects;
#P comment 186 494 320 196617 We need something to display the texture on , so we use a videoplane.;
#P comment 403 338 88 196617 reset our camera;
#P window linecount 3;
#P comment 543 299 309 196617 tell jit.gl.render to “dump” everything weve banged untill now(drawn already) to a texture. We then erase to clear our buffer.;
#P window linecount 2;
#P comment 535 377 309 196617 notice the name of our texture matches our “usetexture” message to jit.gl.render.;
#P toggle 284 623 15 0;
#P window linecount 1;
#P message 284 642 70 196617 fullscreen $1;
#P newex 284 604 38 196617 sel 27;
#P newex 284 585 40 196617 key;
#N vpatcher 431 119 1031 519;
#P origin 2 0;
#P window setfont “Sans Serif” 9.;
#P message 9 70 43 196617 dispose;
#P message 266 117 83 196617 0 , 360. 100000;
#P newex 331 142 40 196617 line 0.;
#P newex 1 241 71 196617 prepend read;
#P user ubumenu 1 215 108 196617 0 1 1 0;
#X add audio;
#X add audio/ap.chorus.jxs;
#X add audio/ap.compress.jxs;
#X add audio/ap.delay.jxs;
#X add audio/ap.highpass.jxs;
#X add audio/ap.lowpass.jxs;
#X add audio/ap.noisegate.jxs;
#X add audio/ap.normalize.jxs;
#X add co.accum.jxs;
#X add color;
#X add color/cc.alphaglue.jxs;
#X add color/cc.brcosa.jxs;
#X add color/cc.brightness.ip.jxs;
#X add color/cc.colormap.jxs;
#X add color/cc.contrast.ip.jxs;
#X add color/cc.exrdisplay.jxs;
#X add color/cc.grgb2rgba.jxs;
#X add color/cc.planemap.jxs;
#X add color/cc.rgb2yuv.jxs;
#X add color/cc.rgba2grgb.jxs;
#X add color/cc.rgba2uyvy.jxs;
#X add color/cc.saturate.ip.jxs;
#X add color/cc.scalebias.jxs;
#X add color/cc.uyvy2rgba.exp.jxs;
#X add color/cc.uyvy2rgba.jxs;
#X add color/cc.uyvy2rgba.lite.jxs;
#X add composite;
#X add composite/co.additive.jxs;
#X add composite/co.alphablend.jxs;
#X add composite/co.average.jxs;
#X add composite/co.brightlight.jxs;
#X add composite/co.burn.jxs;
#X add composite/co.chromakey.jxs;
#X add composite/co.darken.jxs;
#X add composite/co.difference.jxs;
#X add composite/co.dodge.jxs;
#X add composite/co.exclude.jxs;
#X add composite/co.freeze.jxs;
#X add composite/co.glow.jxs;
#X add composite/co.hardlight.jxs;
#X add composite/co.heat.jxs;
#X add composite/co.inverse.jxs;
#X add composite/co.lighten.jxs;
#X add composite/co.lumakey.jxs;
#X add composite/co.multiply.jxs;
#X add composite/co.negate.jxs;
#X add composite/co.normal.jxs;
#X add composite/co.overlay.jxs;
#X add composite/co.reflect.jxs;
#X add composite/co.screen.jxs;
#X add composite/co.softlight.jxs;
#X add composite/co.stamp.jxs;
#X add composite/co.subtractive.jxs;
#X add convolution;
#X add convolution/cf.blur.jxs;
#X add convolution/cf.convolve.jxs;
#X add convolution/cf.dilate.jxs;
#X add convolution/cf.edgedetect.jxs;
#X add convolution/cf.emboss.jxs;
#X add convolution/cf.erode.jxs;
#X add convolution/cf.gaussian.2p.jxs;
#X add convolution/cf.laplace.jxs;
#X add convolution/cf.median.2p.jxs;
#X add convolution/cf.radialblur.jxs;
#X add convolution/cf.sharpen.ip.jxs;
#X add convolution/cf.sharpen.jxs;
#X add convolution/cf.sobel.jxs;
#X add generator;
#X add generator/gn.bricks.aa.jxs;
#X add generator/gn.bricks.jxs;
#X add generator/gn.checker.aa.jxs;
#X add generator/gn.checker.jxs;
#X add generator/gn.crosstile.jxs;
#X add generator/gn.gloop.jxs;
#X add generator/gn.gnoise.2d.jxs;
#X add generator/gn.gradperm.png;
#X add generator/gn.spiderweb.jxs;
#X add generator/gn.spirals.jxs;
#X add generator/gn.stripes.aa.jxs;
#X add generator/gn.stripes.jxs;
#X add gpgpu;
#X add gpgpu/gp.binarysearch.jxs;
#X add gpgpu/gp.bitonicsort.jxs;
#X add gpgpu/gp.reduce.jxs;
#X add material;
#X add material/mat.glass.jxs;
#X add material/mat.gooch.jxs;
#X add material/mat.phong.cg.jxs;
#X add material/mat.phong.glsl.jxs;
#X add material/mat.plastic.jxs;
#X add material/mat.polkadots.jxs;
#X add material/mat.shiny.jxs;
#X add material/mat.sinebump.jxs;
#X add material/mat.toon.jxs;
#X add material/mat.xray.jxs;
#X add math;
#X add math/op.abs.jxs;
#X add math/op.absdiff.jxs;
#X add math/op.acos.jxs;
#X add math/op.acosh.jxs;
#X add math/op.add.jxs;
#X add math/op.and.jxs;
#X add math/op.asin.jxs;
#X add math/op.asinh.jxs;
#X add math/op.atan.jxs;
#X add math/op.atan2.jxs;
#X add math/op.atanh.jxs;
#X add math/op.avg.jxs;
#X add math/op.ceil.jxs;
#X add math/op.cos.jxs;
#X add math/op.cosh.jxs;
#X add math/op.div.jxs;
#X add math/op.eq.jxs;
#X add math/op.eqp.jxs;
#X add math/op.exp.jxs;
#X add math/op.exp2.jxs;
#X add math/op.floor.jxs;
#X add math/op.fract.jxs;
#X add math/op.gt.jxs;
#X add math/op.gte.jxs;
#X add math/op.gtep.jxs;
#X add math/op.gtp.jxs;
#X add math/op.hypot.jxs;
#X add math/op.invert.jxs;
#X add math/op.invsqrt.jxs;
#X add math/op.ln.jxs;
#X add math/op.log10.jxs;
#X add math/op.log2.jxs;
#X add math/op.lt.jxs;
#X add math/op.lte.jxs;
#X add math/op.ltep.jxs;
#X add math/op.ltp.jxs;
#X add math/op.max.jxs;
#X add math/op.min.jxs;
#X add math/op.mod.jxs;
#X add math/op.mult.jxs;
#X add math/op.neq.jxs;
#X add math/op.neqp.jxs;
#X add math/op.normcos.jxs;
#X add math/op.normsin.jxs;
#X add math/op.not.jxs;
#X add math/op.or.jxs;
#X add math/op.pow.jxs;
#X add math/op.sign.jxs;
#X add math/op.sin.jxs;
#X add math/op.sinh.jxs;
#X add math/op.sqrt.jxs;
#X add math/op.sub.jxs;
#X add math/op.tan.jxs;
#X add math/op.tanh.jxs;
#X add math/op.xor.jxs;
#X add shared;
#X add shared/arb;
#X add shared/cg;
#X add shared/glsl;
#X add shared/licenses;
#X add specialfx;
#X add specialfx/fx.blobby.jxs;
#X add specialfx/fx.tiles.jxs;
#X add temporal;
#X add temporal/tp.slide.jxs;
#X add texdisplace;
#X add texdisplace/td.cartopol.jxs;
#X add texdisplace/td.fisheye.jxs;
#X add texdisplace/td.kaleido.jxs;
#X add texdisplace/td.lens.jxs;
#X add texdisplace/td.lumadisplace.jxs;
#X add texdisplace/td.mirror.jxs;
#X add texdisplace/td.repos.jxs;
#X add texdisplace/td.resample.jxs;
#X add texdisplace/td.ripples.jxs;
#X add texdisplace/td.rota.jxs;
#X add texdisplace/td.sinefold.jxs;
#X add texdisplace/td.twirl.jxs;
#X add texdisplace/td.wobble.jxs;
#X add transition;
#X add transition/tr.dissolve.jxs;
#X add transition/tr.edgeblend.jxs;
#X add transition/tr.gridwipe.jxs;
#X add transition/tr.shrinkwipe.jxs;
#X add transition/tr.vignettes.jxs;
#X add vertdisplace;
#X add vertdisplace/vd.gnoise.2d.jxs;
#X add vertdisplace/vd.gnoise.3d.jxs;
#X add vertdisplace/vd.twist.jxs;
#X add viz;
#X add viz/vz.normals.mdl.jxs;
#X add viz/vz.normals.view.jxs;
#X add viz/vz.texcoords.jxs;
#X prefix_set 0 1 c74:/jitter-shaders/ 1;
#X pattrmode 1;
#P newex 130 338 65 196617 jit.gl.shader;
#B color 5;
#P message 433 172 93 196617 getparamtype amp;
#P message 441 191 87 196617 getparamval amp;
#P message 369 191 67 196617 getparamlist;
#P flonum 271 170 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 271 192 88 196617 param amp $1 $1;
#P message 131 192 119 196617 read td.lumadisplace.jxs;
#P newex 127 254 145 196617 jit.gl.slab letter_box_finished;
#B color 5;
#P outlet 59 331 15 0;
#P inlet 59 42 15 0;
#P flonum 381 52 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 381 78 80 196617 param phase $1;
#P flonum 551 50 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 509 50 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 467 78 111 196617 pak param center 0. 0.;
#P flonum 601 50 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 306 52 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 306 78 73 196617 param amp $1;
#P message 601 78 78 196617 param damp $1;
#P flonum 224 52 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 224 78 75 196617 param freq $1;
#P message 85 78 95 196617 read td.sinefold.jxs;
#P newex 48 111 145 196617 jit.gl.slab letter_box_finished;
#B color 5;
#P fasten 23 1 24 0 55 236 6 236;
#P connect 27 0 0 0;
#P fasten 2 0 0 0 229 102 53 102;
#P fasten 1 0 0 0 90 103 53 103;
#P fasten 4 0 0 0 606 102 53 102;
#P fasten 5 0 0 0 311 102 53 102;
#P fasten 8 0 0 0 472 102 53 102;
#P fasten 11 0 0 0 386 102 53 102;
#P connect 13 0 0 0;
#P connect 15 0 14 0;
#P connect 24 0 15 0;
#P connect 0 0 15 0;
#P connect 17 0 15 0;
#P connect 16 0 15 0;
#P connect 27 0 15 0;
#P connect 3 0 2 0;
#P connect 25 1 26 0;
#P connect 18 0 17 0;
#P connect 6 0 5 0;
#P connect 26 0 25 0;
#P connect 12 0 11 0;
#P connect 25 0 11 0;
#P connect 9 0 8 2;
#P connect 10 0 8 3;
#P connect 7 0 4 0;
#P pop;
#P newobj 197 446 41 196617 p slabs;
#P toggle 76 414 15 0;
#P message 76 461 53 196617 enable $1;
#P window linecount 2;
#P message 272 332 126 196617 lookat 0. 0. 0. , position 0. 0. 0. , rotate 0. 0. 0. 1.;
#P window linecount 1;
#P message 348 301 175 196617 usetexture scene , to_texture , erase;
#P newex 123 514 334 196617 jit.gl.videoplane letter_box_finished @automatic 0 @transform_reset 2;
#P newex 197 382 331 196617 jit.gl.texture letter_box_finished @name scene @automatic 0 @adapt 1;
#P comment 673 -2 126 196617 http://abstrakt.vade.info;
#P window setfont “Sans Serif” 20.;
#P comment 720 -37 79 196628 RWM//;
#P comment 1 -17 85 196628 OpenGL;
#B color 1;
#P window setfont “Sans Serif” 9.;
#P comment 1 -36 46 196617 vade //;
#B color 1;
#P user panel 1 -38 800 50;
#X brgb 200 0 0;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P comment 107 590 150 196617 our render context and window;
#P newex 577 523 83 196617 prepend position;
#P newex 611 151 34 196617 v pos;
#P newex 648 150 33 196617 v rot;
#P newex 663 523 33 196617 v rot;
#P newex 577 548 34 196617 v pos;
#P newex 577 498 72 196617 route position;
#P user jit.fpsgui 23 591 60 196617 0;
#P message 577 454 34 196617 reset;
#P window linecount 2;
#P newex 422 253 349 196617 jit.gl.plato letter_box_finished @automatic 0 @position 0. 1. 0. @color 1. 0. 0. 0.5 @poly_mode 1 1 @lighting_enable 1 @depth_enable 1 @antialias 1;
#P window linecount 1;
#P newex 577 474 330 196617 jit.gl.handle letter_box_finished @inherit_transform 0 @auto_rotate 1;
#P newex 521 197 77 196617 prepend shape;
#P user ubumenu 506 177 77 196617 0 1 1 0;
#X add tetrahedron;
#X add hexahedron;
#X add octahedron;
#X add dodecahedron;
#X add icosahedron;
#X prefix_set 0 0 0;
#X pattrmode 1;
#P window linecount 2;
#P newex 497 218 378 196617 jit.gl.plato letter_box_finished @automatic 0 @lighting_enable 1 @depth_enable 1 @antialias 1 @smooth_shading 1 @blend_enable 1 @blend_mode 6 7 @tex_map 2;
#P window linecount 1;
#P newex 47 120 540 196617 t b b b b b b b b;
#P toggle 23 23 15 0;
#P newex 23 42 51 196617 qmetro 2;
#P newex 23 65 58 196617 t b b erase;
#P newex 284 661 225 196617 jit.window letter_box_finished @depthbuffer 1;
#P window linecount 2;
#P newex 23 556 222 196617 jit.gl.render letter_box_finished @erase_color 0. 0. 0.3 1. @depth_enable 1 @antialias 1;
#P window linecount 1;
#P comment 84 67 280 196617 automatic 0 bang control;
#P comment 251 451 309 196617 open up to fiddle with some realtime effects for your whole scene!;
#P connect 6 0 5 0;
#P connect 5 0 4 0;
#P fasten 4 2 2 0 76 115 28 115;
#P fasten 30 0 2 0 277 370 28 370;
#P fasten 29 0 2 0 353 327 28 327;
#P connect 4 0 2 0;
#P fasten 18 0 2 0 653 171 28 171;
#P fasten 19 0 2 0 616 171 28 171;
#P connect 2 0 14 0;
#P connect 4 1 7 0;
#P connect 32 0 31 0;
#P connect 7 1 28 0;
#P connect 33 0 28 0;
#P connect 31 0 28 0;
#P connect 7 2 27 0;
#P connect 27 0 33 0;
#P connect 7 3 30 0;
#P connect 34 0 35 0;
#P connect 35 0 37 0;
#P connect 37 0 36 0;
#P connect 36 0 3 0;
#P connect 7 4 29 0;
#P connect 7 5 12 0;
#P fasten 10 0 8 0 526 216 502 216;
#P connect 7 6 8 0;
#P fasten 9 1 10 0 544 195 526 195;
#P connect 13 0 11 0;
#P connect 11 0 15 0;
#P connect 15 0 20 0;
#P connect 20 0 16 0;
#P fasten 7 7 19 0 577 144 616 144;
#P fasten 7 7 18 0 577 144 653 144;
#P fasten 15 1 17 0 644 519 668 519;
#P pop;

#36601
Mar 30, 2008 at 1:10am

the posted patch works as expected.

the attached patch is too much of a mess for anybody to try and figure out what the problem is.

clean it up, and post a very simple example of what you’re trying to achieve and what doesn’t work, and i’m sure you’ll receive help.

other than vade’s patch, andrew benson posted a scene process example patch, which you should be able to find by searching the archives.

-rob

#125722

You must be logged in to reply to this topic.