question about subtractive texturing

Jun 1, 2007 at 4:34am

question about subtractive texturing

Not sure if the title is an official term but at 12am I honestly could not
think of a better way to express this.

While this is doable in some (most?) 3d modeling programs, I am not sure if
this is doable in jitter. Namely, I am hoping to have 3d objects floating in
space and when they move into the area where a [preferably invisible]
texture is being projected (a texture of a quicktime movie for instance),
their body will reflect a particular part of this otherwise invisible
texture. So, in other words, if a 3d object finds its way into the top-right
corner of the projected texture (which would be invisible otherwise), then
their body would reflect that top-right corner, in effect becoming
doubly-textured object.

This would in effect seem as if the invisible texture in question is being
subtracted against the shapes of 3d objects, allowing only to see parts of
the texture where 3d objects reside. Hence, my [awkward?] title :-).

Any help in this matter is most appreciated!

Ivica Ico Bukvic, D.M.A.
Composition, Music Technology, CCTAD, CHCI
Virginia Tech
Dept. of Music – 0240
Blacksburg, VA 24061
(540) 231-1137
(540) 231-5034 (fax)
ico@vt.edu
http://www.music.vt.edu/people/faculty/bukvic/

http://ico.bukvic.net

#32222
Jun 1, 2007 at 4:42am

Did you see my sharing is fun projective texture patch from last
night? This could serve your purpose if you want the projected
texture to be arbitrarily located in the scene. You’d have to change
things a little of course to get multitexturing, but it could easily
be done. The other option which is less flexible but easier on the
GPU and more straightforward to understand is to use object space
texture coordinates with a border color of black and a @wrap
clampborder.

wes

On 5/31/07, Ivica Ico Bukvic wrote:
> Not sure if the title is an official term but at 12am I honestly could not
> think of a better way to express this.
>
> While this is doable in some (most?) 3d modeling programs, I am not sure if
> this is doable in jitter. Namely, I am hoping to have 3d objects floating in
> space and when they move into the area where a [preferably invisible]
> texture is being projected (a texture of a quicktime movie for instance),
> their body will reflect a particular part of this otherwise invisible
> texture. So, in other words, if a 3d object finds its way into the top-right
> corner of the projected texture (which would be invisible otherwise), then
> their body would reflect that top-right corner, in effect becoming
> doubly-textured object.
>
> This would in effect seem as if the invisible texture in question is being
> subtracted against the shapes of 3d objects, allowing only to see parts of
> the texture where 3d objects reside. Hence, my [awkward?] title :-).
>
> Any help in this matter is most appreciated!
>
> Ivica Ico Bukvic, D.M.A.
> Composition, Music Technology, CCTAD, CHCI
> Virginia Tech
> Dept. of Music – 0240
> Blacksburg, VA 24061
> (540) 231-1137
> (540) 231-5034 (fax)
> ico@vt.edu
> http://www.music.vt.edu/people/faculty/bukvic/
> http://ico.bukvic.net
>
>
>
>

#105612
Jun 1, 2007 at 5:19am

Awesome! Many thanks for this!

BTW, regarding the second option, do you mind elaborating upon this one a
bit more? Are you suggesting simply calculating coordinates of the object in
respect to floating texture area and based upon that extracting a portion of
the texture from the texture matrix and then mapping it onto the object in
question?

Best wishes,

Ico

> —–Original Message—–
> From: jitter-bounces@cycling74.com [mailto:jitter-bounces@cycling74.com]
> On Behalf Of Wesley Smith
> Sent: Friday, June 01, 2007 12:43 AM
> Subject: Re: [jitter] question about subtractive texturing
>
> Did you see my sharing is fun projective texture patch from last
> night? This could serve your purpose if you want the projected
> texture to be arbitrarily located in the scene. You’d have to change
> things a little of course to get multitexturing, but it could easily
> be done. The other option which is less flexible but easier on the
> GPU and more straightforward to understand is to use object space
> texture coordinates with a border color of black and a @wrap
> clampborder.
>
> wes
>
> On 5/31/07, Ivica Ico Bukvic wrote:
> > Not sure if the title is an official term but at 12am I honestly could
> not
> > think of a better way to express this.
> >
> > While this is doable in some (most?) 3d modeling programs, I am not sure
> if
> > this is doable in jitter. Namely, I am hoping to have 3d objects
> floating in
> > space and when they move into the area where a [preferably invisible]
> > texture is being projected (a texture of a quicktime movie for
> instance),
> > their body will reflect a particular part of this otherwise invisible
> > texture. So, in other words, if a 3d object finds its way into the top-
> right
> > corner of the projected texture (which would be invisible otherwise),
> then
> > their body would reflect that top-right corner, in effect becoming
> > doubly-textured object.
> >
> > This would in effect seem as if the invisible texture in question is
> being
> > subtracted against the shapes of 3d objects, allowing only to see parts
> of
> > the texture where 3d objects reside. Hence, my [awkward?] title :-).
> >
> > Any help in this matter is most appreciated!
> >
> > Ivica Ico Bukvic, D.M.A.
> > Composition, Music Technology, CCTAD, CHCI
> > Virginia Tech
> > Dept. of Music – 0240
> > Blacksburg, VA 24061
> > (540) 231-1137
> > (540) 231-5034 (fax)
> > ico@vt.edu
> > http://www.music.vt.edu/people/faculty/bukvic/
> > http://ico.bukvic.net
> >
> >
> >
> >

#105613
Jun 1, 2007 at 5:32am

Here’s a start. BTW, I made a mstake in my previous email. The borer
color should be 1 1 1 1.

wes

#P window setfont “Sans Serif” 9.;
#P flonum 243 337 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P message 243 358 42 196617 rate $1;
#P message 130 328 83 196617 read dishes.mov;
#P message 177 358 27 196617 stop;
#P message 143 358 31 196617 start;
#P flonum 86 337 35 9 0.5 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 44 337 15 0;
#P newex 44 357 52 196617 metro 30;
#P message 207 358 31 196617 clear;
#P newex 44 382 63 196617 jit.qt.movie;
#P flonum 561 164 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 524 164 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 491 199 100 196617 pak anchor 0.5 0.5;
#N vpatcher 95 381 578 727;
#P window setfont “Sans Serif” 9.;
#P window linecount 0;
#P newex 98 79 60 196617 unpack 0. 0.;
#P window linecount 1;
#P newex 32 47 109 196617 route theta zoom anchor;
#P window linecount 0;
#P newex 353 98 27 196617 t b l;
#P flonum 32 127 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 190 219 27 196617 * 1.;
#P newex 370 178 27 196617 * -1.;
#P newex 227 219 27 196617 * 1.;
#P newex 32 219 27 196617 * 1.;
#P newex 370 123 60 196617 unpack 0. 0.;
#P newex 353 76 60 196617 vexpr 1./$f1;
#P newex 69 219 27 196617 * -1.;
#P newex 32 149 81 196617 expr 0.5*cos($f1);
#P newex 209 149 78 196617 expr 0.5*sin($f1);
#P flonum 301 244 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 264 244 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 227 244 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 190 244 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 191 267 128 196617 pak tex_plane_t 0. 0.5 0. 0.5;
#P flonum 143 245 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 106 245 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 69 245 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 32 245 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 33 267 130 196617 pak tex_plane_s 0.5 0. 0. 0.5;
#P inlet 32 25 15 0;
#P outlet 33 297 15 0;
#P connect 1 0 23 0;
#P fasten 22 0 21 0 358 122 37 122;
#P connect 23 0 21 0;
#P connect 21 0 13 0;
#P connect 13 0 17 0;
#P connect 17 0 3 0;
#P connect 2 0 0 0;
#P fasten 7 0 0 0 196 291 38 291;
#P fasten 16 0 17 1 375 171 54 171;
#P fasten 3 0 2 1 37 263 68 263;
#P fasten 12 0 14 0 214 182 74 182;
#P connect 14 0 4 0;
#P fasten 19 0 14 1 375 208 91 208;
#P fasten 4 0 2 2 74 263 98 263;
#P connect 23 2 24 0;
#P fasten 5 0 2 3 111 263 128 263;
#P fasten 24 0 6 0 103 104 148 104;
#P fasten 6 0 2 4 148 263 158 263;
#P fasten 12 0 20 0 214 182 195 182;
#P connect 20 0 8 0;
#P fasten 16 1 20 1 425 213 212 213;
#P fasten 21 0 12 0 37 145 214 145;
#P fasten 8 0 7 1 195 263 225 263;
#P fasten 13 0 18 0 37 193 232 193;
#P connect 18 0 9 0;
#P fasten 16 1 18 1 425 213 249 213;
#P fasten 9 0 7 2 232 263 254 263;
#P fasten 10 0 7 3 269 263 283 263;
#P fasten 24 1 11 0 153 108 306 108;
#P fasten 11 0 7 4 306 263 312 263;
#P fasten 23 1 15 0 70 71 358 71;
#P connect 15 0 22 0;
#P connect 22 1 16 0;
#P connect 16 0 19 0;
#P pop;
#P newobj 299 215 94 196617 p TexCoordMagic;
#P message 299 188 56 196617 theta $1;
#P newex 299 163 107 196617 expr $f1*3.14/180;
#P flonum 423 139 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 460 163 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 423 163 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 393 186 70 196617 pak zoom 1. 1.;
#P flonum 299 143 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 91 199 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 53 199 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 16 199 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 13 220 99 196617 pak position 0. 0. 0.;
#P newex 45 410 339 196617 jit.gl.texture test @bordercolor 1 1 1 1
@wrap clampborder @name proj;
#P window linecount 2;
#P newex 13 248 308 196617 jit.gl.gridshape test @shape torus @color 1
1 1 1 @lighting_enable 1 @scale 0.2 0.2 0.2 @tex_map 1 @texture proj;
#P window linecount 1;
#N vpatcher 10 59 171 198;
#P window setfont “Sans Serif” 9.;
#P window linecount 0;
#P newex 74 79 41 196617 s draw;
#P window linecount 1;
#P newex 50 50 58 196617 t b b erase;
#P inlet 50 30 15 0;
#P outlet 50 79 15 0;
#P connect 1 0 2 0;
#P connect 2 0 0 0;
#P fasten 2 2 0 0 103 73 55 73;
#P lcolor 13;
#P connect 2 1 3 0;
#P pop;
#P newobj 0 100 42 196617 p Draw;
#P message 94 100 70 196617 fullscreen $1;
#N vpatcher 10 59 170 225;
#P window setfont “Sans Serif” 9.;
#P newex 50 72 38 196617 sel 27;
#P newex 50 50 40 196617 key;
#P outlet 50 94 15 0;
#P connect 1 0 2 0;
#P connect 2 0 0 0;
#P pop;
#P newobj 94 60 33 196617 p Esc;
#P toggle 94 81 15 0;
#P newex 94 120 151 196617 jit.window test @depthbuffer 1;
#P newex 0 78 57 196617 qmetro 33;
#P toggle 0 58 15 0;
#P newex 0 121 86 196617 jit.gl.render test;
#P connect 24 0 22 2;
#P connect 23 0 22 1;
#P connect 22 0 21 0;
#P connect 10 0 8 0;
#P connect 21 0 8 0;
#P connect 25 0 9 0;
#P connect 34 0 33 0;
#P connect 29 0 27 1;
#P fasten 32 0 25 0 135 377 49 377;
#P fasten 30 0 25 0 148 377 49 377;
#P fasten 31 0 25 0 182 377 49 377;
#P fasten 26 0 25 0 212 377 49 377;
#P fasten 33 0 25 0 248 377 49 377;
#P fasten 27 0 25 0 49 378 49 378;
#P connect 28 0 27 0;
#P connect 18 0 16 0;
#P fasten 18 0 17 0 428 158 465 158;
#P fasten 17 0 15 2 465 182 458 182;
#P connect 16 0 15 1;
#P connect 20 0 21 0;
#P fasten 15 0 21 0 398 211 304 211;
#P connect 19 0 20 0;
#P connect 14 0 19 0;
#P connect 11 0 10 1;
#P connect 12 0 10 2;
#P connect 13 0 10 3;
#P connect 6 0 3 0;
#P connect 4 0 6 0;
#P connect 5 0 4 0;
#P connect 7 0 0 0;
#P connect 2 0 7 0;
#P connect 1 0 2 0;
#P window clipboard copycount 35;

#105614

You must be logged in to reply to this topic.