I think I found the problem, the light, I'm using GX_COLOR0A0 in both, in the light and the model, that does not work, but now I don`t know how to use GX_COLOR1A1 for the model at the same time that GX_COLOR0A0 xDby copete23 - Coding
Hi, I tried to make that the Wii displays a 3d model with textures, normals, and vertex colors, but only get to show the textures and normals, is a limitation of the library?, or am I doing something wrong? In the examples, is used only the combinations of position + color, or position + texture+ color, so I think that maybe it is not possible to use normals simultaneously. In the case of thby copete23 - Coding
Thanks, I've solved, it was not so complicated after all xD actually the 4x4 matrix is only a 3x4 matrix with some extra vectors that bullet physics do not use , so the only thing to do is find out the position vector x, y, z, the scale vector, etc... in each type of matrix, This is what I've done: f32 worldMat[16]; //the 4x4 matrix Mtx m; // 3x4 matrix obj->_btRigidBodyby copete23 - Coding
Hi, i'm trying to integrate Bullet physics in my project, I got it working, but I'm not sure how to translate the transformation of physical objects, to the 3D models. Bullet uses this function to store the transformations of objects in a Matrix, then pass it to the 3d model: btRigidBody-> getWorldTransform ().getOpenGLMatrix(Matrix); But there is a problem, OpenGL uses 4by copete23 - Coding
Sorry for the delay :) , this is what I have done to install devkitPPC on Mac, and use Xcode: Note: I will use terminal to create the directories 1 - create the directory devkitPro in opt: sudo mkdir -p /opt/devkitpro sudo chmod 777 /opt/devkitpro // is a public directory 2 - Download devkitPPC, libogc, and the rest of libraries that you need 3 - Create the directory devkitPPC, aby copete23 - Coding
Ok, I've figured out how to install it, I can already compile dol files using Xcode :D If someone else wants to know how, tell me and I put it. bye!by copete23 - Coding
Well, I know, but if I can directly use Xcode (Now I work a lot with Xcode), it is more convenient than having to use a virtual machine, a copy of windows or having to create another partition, I think :)by copete23 - Coding
Hi, lately I'm using OS X more than Windows, and I would like to know if anyone knows how to integrate devkitPPC in Xcode, I have not much experience with mac, so I do not really know how to do that. Can anyone help me with this? Thanks:)by copete23 - Coding
Hi, I've tried everything and I do not get it to work, I tried to comment out the gx, the wpad, and the sound, and nothing, I did not know what to do :( I'm using c + +, can be what causes the problem? Why if I run snesgx first, does it work? Any ideas?by copete23 - Coding
I don`t know, the code is very simple, to load the file i`m using this: FILE* file= NULL; fichero = fopen("sd:/apps/robo_tank/saves/data1.save", "r"); if (file != NULL) { rewind(file); fread(&lev, sizeof(float), 1, file); fclose(file); } i`ts all. I think I may be make a mistake initializing gx, and conflicts with fat, because if I use grrlib, it don`t gives me this error aby copete23 - Coding
Hi, I'm having a strange problem with fat, when I try to upload a file from the SD, the system gives me an exception, and the program stops. FatiIniDefault () has been initialized first (one time), and the path is correct, the strangest thing is that to make the program work, I have to run first snes GX (?), If I open snes gx, close, and then open my program, the program works well, I doby copete23 - Coding
I think that the reason may be is the version of grrlib, I use the version 4.0.0 XD, and is very old, perhaps GRRLIB_SetPixelTotexImg function is different in the latest version, i have tried to change the order of the color components and works better, but the glow continues to have a reddish hue, so it must be the version from grrlib. I will review the latest version of grrlib to see what thby copete23 - Coding
yes, the demo works fine, but when compiling the source appeared to me an error message: error: expected primary-expression before '. " token looking the source, i observed: rgbaPixel_u pixel = (. rgba = (r <<24) | (((u32 )(*(( u16 *) (bp + offs +32)))) <<8) | (r>> 8)); I assumed it was missing "pixel.rgba", with that, the error disappeared, but it appeared a warninby copete23 - Coding
Thank you very much again DrTwox, I was modifying the previous version to adjust the effect, but your new version is much better :D but, I think something is wrong with _Getpixel function, because the image of the game, is with a red tone (as I can I put you a screenshot), I'm not sure, why this happens, at first it appeared an error message, looking at the code of the function _Getpixeby copete23 - Coding
XD Ok, I'll try to do that, he, he, he, I never thought that would be so difficult to rotate a ball XDDby copete23 - Coding
:) Ok, the sphere radius is 2 (in pixels), anyway in video 1 when I change the angle of the wiimote, the rotation changes the direccicion immediately, not gradually as the direction of the ball, or what is the same, the ball has an inertia, against the faster it goes, more difficult to reverse its direction, but whith "rotation = sqrt (...);" the direction of rotation is reversed very quickly.by copete23 - Coding
Ok, then would have to put it that way, does it? guMtxIdentity(ballMtx); guMtxRotAxisRad(Mt_1, &rotationDir, rotation); guMtxTransApply(ballMtx, ballMtx, -x, -y, -z); guMtxConcat(ballMtx, Mt_1, ballMtx); //Here you update x, y, z to their new values and: guMtxTransApply(ballMtx,, ballMtx, x, y, z); guMtxCopy(ballMtx, model); guMtxConcat(view, model, mv); GX_LoadPosMtxImm(mv, GX_Pby copete23 - Coding
Ok, it´s true, sorry, to draw the ball i use this: The main mtrix to render the ball and the rest of the scenary is "view" This is how I have it now: Vector dir={-ball.acelx,0,-ball.acelz}; Vector normal={0,1,0}; Vector rotationDir; guVecCross( &dir, &normal, &rotationDir); rotation +=sqrt(( ball.acelz * ball.acelz + ball.acelx * ball.acelx)); guMtxIdentity(model); guMtxRotAby copete23 - Coding
I can`t fix the little mistakes of rotation : (, I applied guMtxRotAxisRad in one of the matrix, and I have concatenated, but does not work, probably because I've done wrong XD guMtxIdentity (model); guMtxRotAxisDeg (Mt_1, & dir, rotation); guMtxRotAxisRad (Mt_2, & dir, rotation); guMtxConcat (Mt_1, Mt_2, model); Is this correct?by copete23 - Coding
QuoteBy the way, how do you calculate the normal vector? I have put only Vector normal={0,1,0} (?)by copete23 - Coding
It's perfect !! :D, but something must be wrong with my code, because when put sqrt (ball.accelx * ball.accelx + ball.accely * ball.accely), the ball does not rotate, perhaps my acceleration Equation is wrong. .... if I put for example, rotation + = sqrt (ball.accelx * ball.accelx + ball.accely * ball.accely) * 20, the ball rotates fine, but when changing direction, the angles are reby copete23 - Coding
Hi Technik , I do not find that function, maybe it guVecCross ()?. anyway I have not understood how to do what you say XD sorry, could you give me more details?. for the direction of the ball I use ball.x + = ball.acelx; ball.z + = ball.acely; acelx and acelz depend on the angle of the wiimote and gravity, perhaps there is the error. I added Daid classes, to use quaternions, but the reby copete23 - Coding
:D Thanks for the classes Daid, i try to use it in my project, wow, if that is difficult to rotate a simple ball XD Thanks!by copete23 - Coding
Hi, I'm trying to rotate a sphere according to the direction in which it moves (x, z), but I can not work properly, I have implemented the physics, but i am unable to make the sphere rotate well XD. I tried this: Mtx mX, mY, mZ; Vector axisX = (1.0, 0.0, 0.0); Vector axisY = (0.0, 1.0, 0.0); Vector axisZ = (0.0, 0.0, 1.0); ...... ... guMtxIdentity .... guMtxRotAxisDeg (mX, &by copete23 - Coding
Wow, thank you very much, that's great, I will study carefully this example, I'm sure it will be very instructive for me : D really thank you very much for your attempt DrTwox. you are the best. Ok, I'll tell you if i do anything with it PD: sorry for my horrible English.by copete23 - Coding
It's true the blur function of grrlib is very bad for this, but I do not have enough knowledge to make my own blur system :( . I've tried to rescaling the image but I've only got 8fps (64X64 pixels) XD ..... perhaps this is too complicated for me.by copete23 - Coding
Thank you very much for the help DrTwox, I've been doing some tests, and I managed to add the blur effect, and works well, but at 0.5 fps XDD consumes much cpu. for the blur I used one of the functions of grrlib, GRRLIB_BMFX_Blur, but to work I put this function into the main loop, and that makes it consumes many resources : ( I have no idea how to do it to run well. This is how I'mby copete23 - Coding
Ok, ok, I think I understand, :D, for example I use Screen2Texture to capture a screenshoot of the scene, updated frame by frame, then draw the captured picture (like a 2d image) , and apply the effects in that picture (blur, blending, contrast ... .); Is that right?by copete23 - Coding
i think you're referring to models in 2d, (sorry if I get confused), but I want to use it, in to a 3D model, like this:by copete23 - Coding