 |
 |
GoldenEye 007 Nintendo 64 Community, GoldenEye X, Nintendo 64 Games Discussion GoldenEye Cheats, GoldenEye X Codes, Tips, Help, Nintendo 64 Gaming Community
|
 |
 |
 |
 |
|
 |
 |
 |
 |
 |
Blue Solo Agent

Joined: 29 Dec 2011 Posts: 7
 |
Posted: Thu Dec 29, 2011 9:23 pm Post subject: Goldeneye Texture Export with Alpha? |
 |
|
Hello. I am working on a project of mine to put Goldeneye on iOS devices. I do not think I will ever complete it to make a full game (as I am just one person working on this project and I only occationally work on it). I know I am wasting my time with this project, but mostly this project is for more experience with programing and game development and to have fun doing so.
So my question is: How do I export textures from Goldeneye (With GE setup editor) with their alpha channels?
The possible solutions:
Export textures in a different format than .bmp because .bmp does not have alpha channels.
-Looked for the option in the GE Setup Editor but could not find anything.
Use a program or photoshop script that converts the blacks of the textures to alpha transparency?
-I tried searching, but was unable to find anything.
Another Question I have: Is there a way to export a map with the objects on it. Or export the positions and rotations of the objects? When exporting the map the objects are left behind.
If you have any other solutions or helpful hints PLEASE let me know.
Thank you very much for your time.
Also...
If anyone wants to check out some of my progress, here is my latest video and a link to my youtube channel in which I have other videos of my project.
Latest Video: http://www.youtube.com/watch?v=NcUKnNyXTXc
My Channel http://www.youtube.com/user/GoldeneyeMr007 |
|
|
|
|
|
 |
 |
 |
 |
 |
SubDrag Administrator

Joined: 16 Aug 2006 Posts: 6171
 |
Posted: Thu Dec 29, 2011 9:57 pm Post subject: |
 |
|
Welcome to the boards! Very impressive video, I just checked it out. There actually isn't transparency built in to any texture - it's part of the displaylistthat you enable or disable it. So in theory a texture could be both transparent and not transparent, although in practice it's usually one or the other. Not sure what you use to program your tool, but in DirectX you can set transparency when you load a texture, so I imagine you have a similar method.
There is no way to export objects too, I guess I could add if you want it, but wouldn't it be more useful to have them drawn as separate objects? Objects can be exported as their own entities in Edit Model or by right clicking an object and exporting obj.
You can export coordinates by in Edit Presets, click Export Presets, although the values are in floating point (as hex), it has coords, then up vector, then target vector. If you need something I can probably incorporate it if reasonable. |
|
|
|
|
|
 |
 |
 |
 |
 |
Blue Solo Agent

Joined: 29 Dec 2011 Posts: 7
 |
Posted: Thu Dec 29, 2011 10:57 pm Post subject: |
 |
|
SubDrag wrote: |
There is no way to export objects too, I guess I could add if you want it, but wouldn't it be more useful to have them drawn as separate objects? Objects can be exported as their own entities in Edit Model or by right clicking an object and exporting obj.
You can export coordinates by in Edit Presets, click Export Presets, although the values are in floating point (as hex), it has coords, then up vector, then target vector. If you need something I can probably incorporate it if reasonable. |
Thanks for the quick response! I will look more into the texture things.
As for exporting objects, you say "drawn as separate objects." If you do draw them to the map as a single object, what does this mean.
Does this mean... For example: when you import a goldeneye map into a 3d editor it is in parts such as primary_RoomXX and secondary_RoomXX. If you were to draw the objects to the map as a single object when exporting, would they become presetXX such as the rooms are when imported into a 3d editor? If this is the case, it is perfect and I hope it would not be too much of a burden.
If you do not understand what I am asking here please let me know. I am not very good at explaining this, but I will try my best.
Last edited by Blue Solo on Thu Dec 29, 2011 11:30 pm; edited 1 time in total |
|
|
|
|
|
 |
 |
 |
 |
 |
SubDrag Administrator

Joined: 16 Aug 2006 Posts: 6171
 |
Posted: Thu Dec 29, 2011 11:24 pm Post subject: |
 |
|
I would think you'd want to have your routine be something like:
1) DrawLevel
2) Draw Props
3) Draw Guards
etc
So your code would make a transformation matrix for each room, each prop, each guard, etc, versus one huge set of triangle draws. If you're asking about coordinates I don't export them in the obj file. They have rotations, etc, which wouldn't be captured. |
|
|
|
|
|
 |
 |
 |
 |
 |
Blue Solo Agent

Joined: 29 Dec 2011 Posts: 7
 |
Posted: Fri Dec 30, 2011 1:11 am Post subject: |
 |
|
So wait, just to clear this up. It is not possible to draw objects in their locations to the map or just not practical? |
|
|
|
|
|
 |
 |
 |
 |
 |
radorn 007


Joined: 23 Sep 2007 Posts: 1424
 |
Posted: Fri Dec 30, 2011 2:47 am Post subject: |
 |
|
GE doesn't seem to support an alpha channel for textures. There's a rendering mode where pure black pixels in the texture will be see through. That's all you have.
You can set alpha in vertices to make the corners of triangles alpha, but that affects whole texture. (I'm not sure if editor really supports setting alpha in channelsright now)
As for objects in modeler...
well, OBJ doesn't support anything but pure geometry, all coords are absolute, and it doesn't support separate entities with their own coordinate grid. the mere possibility of having separate objects recognized within an OBJ model, while it might be possible, has not been proven, and it would probably be more work than it's worth and would be surely full of issues and would surely not be very compatible with 3d modelers. |
|
|
|
|
|
 |
 |
 |
 |
 |
Blue Solo Agent

Joined: 29 Dec 2011 Posts: 7
 |
Posted: Fri Dec 30, 2011 2:38 pm Post subject: |
 |
|
I understand that only the geometry is captured and not the coords themselves. But when the object is captured to the map, it is in position, rotation and scale.
Such as this:
I exported a .obj with 6 cubes I labled as preset_TestXX on the Dam map. This is the .obj import menu on 3ds max.
Now here is the view of the 6 cubes that were exported with the map.
When the geometry is captured, it gives the cubes positions, rotations and scale in relation to the map. (Although I know it is not entirely the position and rotation, as they each have a location of (0, 0, 0) and a rotation of (0, 0, 0).)
If this still does not seem reasonable, is there at least a way to export every object in the game at once rather than having to do them each one by one? |
|
|
|
|
|
 |
 |
 |
 |
 |
SubDrag Administrator

Joined: 16 Aug 2006 Posts: 6171
 |
Posted: Fri Dec 30, 2011 3:12 pm Post subject: |
 |
|
Here are all the props exported to obj:
http://www.battlefieldforever.com/hackers/priv/subdrag/Props.rar
DirectX handles all the rotation matrices, translation, etc (and it's somewhat complicated), so unfortunately I can't get you what you want there. What else would be useful?
Also what tool are you using there? |
|
|
|
|
|
 |
 |
 |
 |
 |
Blue Solo Agent

Joined: 29 Dec 2011 Posts: 7
 |
Posted: Fri Dec 30, 2011 4:27 pm Post subject: |
 |
|
SubDrag wrote: | Here are all the props exported to obj:
http://www.battlefieldforever.com/hackers/priv/subdrag/Props.rar
DirectX handles all the rotation matrices, translation, etc (and it's somewhat complicated), so unfortunately I can't get you what you want there. What else would be useful?
Also what tool are you using there? |
Thanks for the props!
I do not understand up vector and target vector.
Can the x, y z coord, up vector x, y z and target vector x, y, z in the Edit Presets menu be used to get the position of the objects as x, y, z coords? Would this also give information about rotation as x, y, z?
Or is this what you said is somewhat complicated and DirectX handles it?
By the way are you asking about the tool in the screenshots? Those are from 3ds max.
Update:
I have come across some information. I think I may understand what can be done now. I will do some more checking to see if I am correct.
Update 2:
Can xyz-coords, up vector xyz and target xyz be put into fixed point decimal form?
Last edited by Blue Solo on Fri Dec 30, 2011 10:40 pm; edited 1 time in total |
|
|
|
|
|
 |
 |
 |
 |
 |
SubDrag Administrator

Joined: 16 Aug 2006 Posts: 6171
 |
Posted: Fri Dec 30, 2011 10:10 pm Post subject: |
 |
|
GE had pretty crazy rotations.
Here's the standard object rotation matrix (not including special flags or doors) :
D3DXMatrixIdentity( &m );
// Flip x axes since GE has it backwards - you may not need this
xrotationfinal = -xrotationfinal;
xoffsetfinal = -xoffsetfinal;
float x11 = ((yoffsetfinal * zrotationfinal) - (zoffsetfinal * yrotationfinal));
float x12 = ((zoffsetfinal * xrotationfinal) - (xoffsetfinal * zrotationfinal));
float x13 = ((xoffsetfinal * yrotationfinal) - (yoffsetfinal * xrotationfinal));
float x21 = ((yrotationfinal * ((xoffsetfinal * yrotationfinal) - (yoffsetfinal * xrotationfinal))) - (zrotationfinal * ((zoffsetfinal * xrotationfinal) - (xoffsetfinal * zrotationfinal))));
float x22 = ((zrotationfinal * ((yoffsetfinal * zrotationfinal) - (zoffsetfinal * yrotationfinal))) - (xrotationfinal * ((xoffsetfinal * yrotationfinal) - (yoffsetfinal * xrotationfinal))));
float x23 = ((xrotationfinal * ((zoffsetfinal * xrotationfinal) - (xoffsetfinal * zrotationfinal))) - (yrotationfinal * ((yoffsetfinal * zrotationfinal) - (zoffsetfinal * yrotationfinal))));
float x31 = xrotationfinal;
float x32 = yrotationfinal;
float x33 = zrotationfinal;
float normalized1 = 1 / (sqrt(pow(x11, 2) + pow(x12, 2) + pow(x13, 2)));
float normalized2 = 1 / (sqrt(pow(x21, 2) + pow(x22, 2) + pow(x23, 2)));
float normalized3 = 1 / (sqrt(pow(x31, 2) + pow(x32, 2) + pow(x33, 2)));
m._11 = (x11 * normalized1); m._12 = (x12 * normalized1); m._13 = (x13 * normalized1); m._14 = 0;
m._21 = (x21 * normalized2); m._22 = (x22 * normalized2); m._23 = (x23 * normalized2); m._24 = 0;
m._31 = (x31 * normalized3); m._32 = (x32 * normalized3); m._33 = (x33 * normalized3); m._34 = 0;
m._41 = 0; m._42 = 0; m._43 = 0; m._44 = 1;
which might be equivalent to this which I have commented out above it. It might not be though, not sure.
/*
up = D3DXVECTOR3(-xoffsetfinal,yoffsetfinal,zoffsetfinal);
LocalZ.x = -xrotationfinal; LocalZ.y = yrotationfinal; LocalZ.z = zrotationfinal;
D3DXMatrixIdentity( &m );
D3DXVec3Normalize( &LocalZ, &LocalZ );
D3DXVec3Cross(&LocalX, &up, &LocalZ );
D3DXVec3Cross(&LocalY, &LocalZ, &LocalX );
D3DXVec3Normalize( &LocalX, &LocalX );
D3DXVec3Normalize( &LocalY, &LocalY );
m._11 = LocalX.x; m._12 = LocalX.y; m._13 = LocalX.z;
m._21 = LocalY.x; m._22 = LocalY.y; m._23 = LocalY.z;
m._31 = LocalZ.x; m._32 = LocalZ.y; m._33 = LocalZ.z;*/
Many Bothans died to bring us this information. |
|
|
|
|
|
 |
 |
 |
 |
 |
Blue Solo Agent

Joined: 29 Dec 2011 Posts: 7
 |
Posted: Fri Dec 30, 2011 10:40 pm Post subject: |
 |
|
Well those are some pretty crazy rotations. That stuff is way over my head, amazing work figuring all of that out!
-I think I may have figured something out for rotations though, but it has no use without the positions. In fact, I'd rather have the positions over the rotations; positions are more important.
I am not sure if you saw in my last post but...
Can xyz-coords, up vector xyz be put into fixed point decimal form?
Floating point hexadecimal is turning up to be quite odd in my situation.
Another thing: To get the positions it is a combination of the xz-coords
and the up vector determines the y-coord; Is this correct? |
|
|
|
|
|
 |
 |
 |
 |
 |
SubDrag Administrator

Joined: 16 Aug 2006 Posts: 6171
 |
Posted: Fri Dec 30, 2011 10:47 pm Post subject: |
 |
|
That's just the beginning of rotations...The doors I've just realized I still don't have the flipped/inverted flag working right. Eek.
Anyways, give me a format and I'll export the coordinates in that format for you. Coordinates are just translation, you don't use the up/target vectors, that is just for rotation. There also is scaling that occurs in between translation and rotation. The y coordinate, unless in air flag is toggled or in air rotated (2 flags one of them), is lowered to clipping tile beneath it. |
|
|
|
|
|
 |
 |
 |
 |
 |
Blue Solo Agent

Joined: 29 Dec 2011 Posts: 7
 |
Posted: Fri Dec 30, 2011 11:05 pm Post subject: |
 |
|
I have a format, but I am not sure the information you have.
Are you Subdrag2 in the Java Live Chat? It would be easier to talk live. |
|
|
|
|
|
 |
 |
 |
 |
 |
|
 |
 |
 |
 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
 |