Game Development Community

Face Extrude Plugin

by Jaimi McEntire · in Constructor · 05/11/2007 (6:52 am) · 59 replies

OK, I've got a working version of the face extrude plugin running. Right now, the new (extruded) brush has sides that are perpendicular to the selected face (you can skew it by modifying the normal).
I was thinking about adding an option to create the sides of the new brush so they conform to the planes of the touching faces. Does this interest anyone?

If anyone wants to try it, post a message here, and I'll email you a test version.
Page «Previous 1 2 3 Last »
#1
05/11/2007 (7:16 am)
I'll try it.
#2
05/11/2007 (7:53 am)
I will try it aswell...

mrludo At H0tmail d0t c0m
#3
05/11/2007 (12:25 pm)
Plugin Sent - let me know what you think!
#4
05/11/2007 (1:06 pm)
I would like to try it to, email on profile.
#5
05/11/2007 (1:35 pm)
OK - I' sent it out, let me know how it works for you. I'm looking for constructive criticism. Thanks!
#6
05/11/2007 (1:44 pm)
I'll try it as well, I've been spending quite a bit of time in constructor lately :)
#7
05/11/2007 (2:38 pm)
Oh can I try too? Lmaceleighton@msn.com ty in advance:)
#8
05/11/2007 (2:44 pm)
OK - plugin sent.
#9
05/11/2007 (3:43 pm)
Nice! I was going to lend a hand on this one but you beat me to it =)

Good work!
#10
05/11/2007 (3:53 pm)
I'd love to try it out. And I can be very opinionated about art tools sometimes. :) jboy at menlofarms dt net.
#11
05/11/2007 (7:59 pm)
OK - somehow the .dso I sent didn't work for anyone but me. So, I've sent out the source warts and all.
#12
05/11/2007 (9:13 pm)
Beautiful... just beautiful...


Works perfect Jaimi!
#13
05/11/2007 (9:58 pm)
I've only gotten it to work correctly on a newly created cube so far - on oddly angled faces the new brush sometimes doesn't appear (and the undo list doesn't register that the extrude tool has been used) and other times the new brush seems to be the right shape but is not oriented correctly as if it had been extruded, instead it's straight upright.
#14
05/11/2007 (10:18 pm)
@Jeff - I've seen this also, Namely, it can handle it if you translate a brush (or drag it's faces around etc), but if you choose modify/scale or modify/rotate a brush, the transforms are carried around with the brush, instead of being directly applied. The extruder will then extrude the face pre-transform. I need to figure out how to get the transform for the brush, then I can transform the face directly, and use that to extrude.
#15
05/12/2007 (12:51 am)
Just checked in, and will check my mail now, I always come here first. Thanks Ill try it now:)
*****//Update
WOW nice start, I haven't run into the problems above but, trust the validity of these fellows. However I have to say awesome job getting a start on a feature a lot of people really wanted. I think it will not be long before you have good finished product that everyone can enjoy:)
#16
05/12/2007 (7:39 am)
Jaimi
I would like to try it too, please.
alemar@marcoalemar.com
#17
05/12/2007 (9:33 am)
OK - I've got the scaling/rotating issues fixed. I'll send out an update to the people who bothered replying. I got a few more features to add, and then I'll go onto the next plugin.

In case anyone else is writing plugins, you can get the transform from the brush like this:

%static.transform = %map.getBrushTransformMatrix(%brushid);

This is a real matrix, not the "7 element" matrix that are used by the internal MatrixMulPoint (etc) functions, so to use it you'll need a real matrix transform:

// The built in Torque "matrix" functions don't
   // actually take matrixes. This takes a 4x4 matrix
   // and a point, and returns the transformed point.
   function MatrixMultiplyPoint(%mat, %vsrc)
   {
      %vsrc0 = getWord(%vsrc,0);
      %vsrc1 = getWord(%vsrc,1);
      %vsrc2 = getWord(%vsrc,2);
      
      %mat11 = getWord(%mat,0);
      %mat21 = getWord(%mat,1);
      %mat31 = getWord(%mat,2);
      %mat41 = getWord(%mat,3);
      
      %mat12 = getWord(%mat,4);
      %mat22 = getWord(%mat,5);
      %mat32 = getWord(%mat,6);
      %mat42 = getWord(%mat,7);
      
      %mat13 = getWord(%mat,8);
      %mat23 = getWord(%mat,9);
      %mat33 = getWord(%mat,10);
      %mat43 = getWord(%mat,11);
      
      %mat14 = getWord(%mat,12);
      %mat24 = getWord(%mat,13);
      %mat34 = getWord(%mat,14);
      %mat44 = getWord(%mat,15);
      
      %x = (%vsrc0 * %mat11) + (%vsrc1 * %mat21) + (%vsrc2 * %mat31) + %mat41;
      %y = (%vsrc0 * %mat12) + (%vsrc1 * %mat22) + (%vsrc2 * %mat32) + %mat42;
      %z = (%vsrc0 * %mat13) + (%vsrc1 * %mat23) + (%vsrc2 * %mat33) + %mat43;
      %w = (%vsrc0 * %mat14) + (%vsrc1 * %mat24) + (%vsrc2 * %mat34) + %mat44;
      
      if (fabs(%w) < 0.000000000001) %w = 0.000000000001;
      %x = %x / %w;
      %y = %y / %w;
      %z = %z / %w;
      return NewVector(%x,%y,%z); // just returns %x SPC %y SPC %z (got tired of typing it that way)
   }
#18
05/12/2007 (12:48 pm)
OK just have a chance to try it out. And i see those issue already mentioned, plus I've had some wierd transform offsets applied as well. I think that might be due to constructors *center* bug though. Otherwise it's a great start and one i can see using on a regular basis. I also took a few minutes to make a png that matches the interface better, feel free use it if you want, i'm just anal like that, hehe :)

beautifulpeoplesclub.net/phpBBdev/files/extrude_162.png
Heres a zip in case the web does weird stuff to transparent pngs.

Extrudepng.zip

Thanks so much for this resource!
#19
05/12/2007 (3:09 pm)
Hey, that looks great! Thanks! I'm getting ready to send out the newest version, I think this one is ready to go. (famous last words). I'm going to include Jason's new icon also.
#20
05/12/2007 (6:31 pm)
I sent the new package out. I think this one should work in most if not all cases. The only way I can see it failing is if there are degenerate edges in the brush face (with colinear vertexes). I'll try to add a check for this, but this really shouldn't be allowed on a brush anyway, so it's possible that we'll never see this issue.
Page «Previous 1 2 3 Last »