Re: [Plib-users] Scaling loaded models - clipping problems
Brought to you by:
sjbaker
From: Per L. <li...@ho...> - 2001-01-17 22:52:27
|
On Wednesday 17 January 2001 13:52, Sam Stickland wrote: > Hi, > > I'm having some difficultly scaling loaded models in SSG. I have an model > in AC3D format that I wish to draw in various sizes about the scene. So my > first thought is to load the model, and then stick relevant scaling > transforms above it. > > a 0 0 0 > 0 a 0 0 > 0 0 a 0 > 0 0 0 1 > > to scale by a in all three axis. But I get clipping problems when I do > this. It appears that SSG isn't updating the bounding sphere? (I've tried > calling recalcBSphere() on the returned entity from ssgLoadAC). Am I doing > anything obviously wrong here? What I did when I needed a scaled version of a model, was that I loaded it, scaled it (and presumably got the same clip-problems that you do), but just saved the scaled model as an ASE model. This format doesn't store normals or bounding spheres, so these will be recalculated when you load the model the next time, and it will work as expected. Works all right, if you can live with that the scaling is done off-line. I'm not sure it will work in your application, since I don't know what you want to do with the model. Regards, Per -- / Per Liedman / li...@ho... / www.mdstud.chalmers.se/~md6pl / 031-825659 / 0705-520455 |