  | | | Manhanon and plugins | Manhanon and plugins 2004-03-22 - By Richard R. "Remnar"
Back First I want to thank those who've welcomed me back. It's good to be back and I hope to work hard in contributing to the community here.
Well I have a story to tell here that will turn into a truespace project. I have been sick with a severe viral infection for almost a week, and it seems im not the only one. Its funny that while I am sick I get the strangest ideas and dreams. Well this dream was about a silvery disk shaped city really high up in the sky. It had 3 layers, each one having its own function. The top layer was for dining, the middle for administration and recreation and the bottom was for rooms. When i woke up I felt really emotional about it, but I knew I would get over it. But I did spend some time thinking about how it could be done. Maybe I have a knack for mechanical engineering heh. Well anyway, this idea as vague as I put it should be a great project to work on for a while. I want to get everything down to the last detail I can add including some ideas that could possiblity make such a rediculous idea work (and probably cost billions heh). Most of my ideas will be like writing a fictional novel. Even though it will be fiction I am sure it will get plenty of attention. I was looking for inspiration for a truespace project and Ive found it, in a sci-fi dream heheheh. Oh I almost forgot. I am calling this project Manhannon: Paradise In The Heavens.
As for the plugins Im developing, I have completely redone them with great improvements in memory management and stability. Some features that require a beefy computer even work faster and without interface problems. I am still looking for a few testers who have time at least once a week. I need one tester who has a beefy computer (384 megs of ram, pentium IV etc) to test a specific feature. I try to do a fraction, about 30% of the calculations on this old clunker and it just cant handle it. I can do 20% and get some decent results and I will post them soon. Oh the feature I am talking about is from the Scatter plugin. its called Image Map Particles. So if you think your computer can handle 100,000 geometry based particles or more, i need you! Really this feature will make your machine crawl unless you got the ram and processing power. One thing that comes to mind about Image Map particles, is that it is useful even on a low percentage. Scatter is also useful for light arrays, donut sprinkles, and obscurities. The operating system that I know this plugin works on is windows 98 and XP pro. Anything else is questionable. When i get all the base features of Scatter working to every ones liking, I might add animation features and possibly other requested features. As for the price of Scatter, I am not sure where to begin. It is a rather complex plugin, but easy to learn and use. The interface is similar but smaller than true particles. I also want to implement trueparticles in scatter for the Ts 6.6 release. I have a working release for 4.3 and 5.2. I am still hammering out some memory handling routines for metaballs.
I had much frustration working with the metaball api in Ts 5.2. Those of you who know the API (Application Programming (or is it Protocol?) Interface), you pass a tsxMBALLOBJ variable to the tsxMetaballIsPrimitive function, it supposed to return 2 things. 1: the tsxBool function result, and 2: the tsxMBALLOBJ** parameter. Now if the variable being passed to the metaball parameter is NULL, it will always remain null even if the function returns TRUE. This was driving me nuts cuz it would not do this in Ts 4.3 API. So after much trial and error, I found out that the variable needs to be initialized with a block of memory. Usually this is automatic but for some odd reason, the compiler automatically puts NULL into that variable. Now you know why I was so frustrated. So I solved the problem by putting a single block of memory of type tsxMBALLOBJ* into the variable like this tsxMBALLOBJ* mball = (tsxMBALLOBJ*)tsxMalloc(sizeof(tsxMBALLOBJ*)); Now i thought i needed to free this if the function was true or not, however that is not so (cuz it creates an access violation). So you need to test the function. If its true, you dont need to free the varaible, otherwise you do with tsxFree. I also have solved the problem with vertex normals getting its Z position offset in Ts 5.2 (dont know if its a problem in later versions). Well i wrote a lot of matrix and vector functions. One function sets the T (transform) column in a matrix. To fix this offset problem, you get the axes position of the object and put it into the T column of the object matrix. Heres a bit of code for you to see for yourself.
void mx_sett(CtsxTxmx3f* mx, CtsxVector3f t) { *mx.matrix[0][3] = t.x; // this can also be mx->matrix *mx.matrix[1][3] = t.y; *mx.matrix[2][3] = t.z; }
void fSeeNvxsOffset(void) { tsxPOLYHEDRON* pPolyh = (tsxPOLYHEDRON*)tsxGetCurrentSelection(); if (!pPolyh) return; CtsxTxmx3f mx; tsxPolyhGetVxTxmx(pPolyh, &mx); CtsxVector3f axesPos; tsxGNodeGetAxesPosition((tsxGNODE*)pPolyh, &axesPos); //mx_sett(&mx, axesPos); // remove the remark tag (//) to fix the offset int nbrVxs = tsxPolyhGetNbrVxs(pPolyh); CtsxVector3f* nvxs = tsxPolyhGetVxNormalsArray(pPolyh); tsxGNODE** objs = (tsxGNODE**)tsxMalloc(nbrVxs * sizeof(tsxGNODE*)); for (int i = 0; i < nbrVxs; i++) { CtsxVector3f v = nvxs[i]; tsxTransformVect3f(v, v, mx); objs[i] = (tsxGNODE*)tsxCreateCube(1, 0.5f, 0.5f, 0.5f); tsxSceneAddObject((tsxSOBJ*)objs[i], e_tsxTRUE); tsxGNodeSetLocation(objs[i], &v); } for (int i = nbrVxs - 1; i >= 0; i--) { tsxGroupAtCurrobj(objs[i]); } tsxFree(objs); tsxSceneRefresh(); }
The correct result you should see (if you used a cube as the current object for example) is the grouped objects within and centered of the cube or whatever you used. You can see the offset (slightly below the center of the current object) if you remark the mx_sett line.
Sorry for the long email, but I hope it was informative and helpful. Dont know where else to post techy stuff. I dont own a current version of truespace yet so I cant ask for technical help. I like the new Truespace 6.6. And btw, even though truespace maybe still lacking in some areas, its the easiest application to use. Just try to paint a face in other applications (much more difficult). Also truespace is like a clay modeler. Your not limited to only 3 point faces like in cinema3d. Plus you dont have to memorize 1000s of features to understand how to do the basics. And the render speed is faster than most apps too (depending on what you use). Cinema3d has terrible banding, 3dsmax looks cheap unless you get a high priced render plugin. Sure I could tinker with 3dsmax and then tell Caligari to put all those animation and some modeling features into truespace, but i think they would really have to rewrite the whole program. An example of something nice would be stack modeling. Cant be done even with a plugin. They would have to rewrite the modeling engine of truepace to implement that feature. A feature of stack modeling would be like you would perform a boolean operation of object A to object B. Well you dont like where they are, so you move them around. You dont work with 1 object, but 2 objecs within the stack to move them around. I really dont see how this can be done even in a plugin. Do you programmers got any ideas? Well a work around would be to calculate the boolean during rendering. But how do we access the mechanics of real time rendering? Ill check the api a bit further. Well if we could move boolean stacks around we could do some nifty animations like bomb fuses, etc.. Well I better stop before i write a book heh.
Richard R. "Remnar"
|
|
 |