Getting an object to fit inside a bigger copy of itself

Blitz3D Forums/Blitz3D Programming/Getting an object to fit inside a bigger copy of itself

Ian Thompson(Posted 2003) [#1]
I have a 3d model of a human. I have copied this and made it transparent and bigger. I wish to fit the original within the transparent copy.

I thought, easy, I will just scaleentity man,1.05,1.05,1.05 and it would fit. Wrong, this make the arms move farther away from the centre of the object causing them to collide with the old models arms.

I think I need a way of making an object 'fat'?!?!?

Is there a way to do this type of scaling? Anybody had this problem before?


Perturbatio(Posted 2003) [#2]
Check out sswift's cell shading code:
http://www.blitzbasic.com/codearcs/codearcs.php?code=446

(I believe it does something similar to the effect you want).


sswift(Posted 2003) [#3]
Yes, my code scales the object up like that. But it also flips it inside out. Just use the bit that moves the vertcies out by some amount in the direction of their normals.


Ian Thompson(Posted 2003) [#4]
Thanks guys, I'll give it a go.


TeraBit(Posted 2003) [#5]
Also this:

http://www.blitzbasic.co.nz/codearcs/codearcs.php?code=307


Ian Thompson(Posted 2003) [#6]
Thanks Lee, I'll have a look at both.