|
From: Roger H. <rog...@mi...> - 2005-02-11 16:13:18
|
Before my next big project I have been asked to look at .3ds import into a 3DMF document. I compiled up Quesa's 3ds plugin, put it into 3D World and contrary to what Peter had told me, it almost works. I tried a model of a wooden toy train downloaded from '3DNuts' . By a stroke of luck I happened to choose a model which was not symmetrical. I had to set the Mac file type to 3DMF in Resorcerer, but it read in. There was no colour and some of the wheels were missing, it was a mirror image and it was 'inside out' i.e. a light shining from above illuminated the bottom surface. Looking at the code I found inside parse3DSChunk in case 'kChunkVertList' that were three lines which set the output x to minus the input x, the output y to the input z, and the output z to minus the input y, like this: pointList[n].x = -vertex.x; pointList[n].y = vertex.z; pointList[n].z = -vertex.y; If I remove the minus sign on the x coordinate I find two of my problems disappear, the model is no longer mirrored and it is no longer inside out so that the sun shines on the top of the train. Should I check in the change? Are there any other corresponding changes needed? Does 3DMF and 3DS use different clockwise/anti-clockwise rule or left hand/right hand rule. Any thoughts on why some of the objects do not appear? Roger. |