ShootersForever.com Forum Index

GoldenEye 007 Nintendo 64 Community, GoldenEye X, Nintendo 64 Games Discussion
GoldenEye Cheats, GoldenEye X Codes, Tips, Help, Nintendo 64 Gaming Community


Questions about Textures/Materials from OBJ export GE Edit

 
Post new topic   Reply to topic    ShootersForever.com Forum Index -> Q-Lab Hacking Department
View previous topic :: View next topic  
Volante
Agent
Agent


Joined: 23 Dec 2013
Posts: 7

 PostPosted: Fri Dec 02, 2016 12:21 pm    Post subject: Questions about Textures/Materials from OBJ export GE Edit Reply with quote Back to top

Pardon me for my ignorance, but I have a few questions about textures and materials from ge edit's obj background export.
I havent looked at any docs that probably explain this but most of them are in hex speak.

Im working on a personal project, and im having problems finding out where the value for the alpha color is for textures (or materials?).
From what I understand the textures have a color value to use as transparentcy and it looks like the obj or mtl files doesnt have this data.
Is this something that is only on the bin format of the levels?

Opacity is a weird one... The mtl and obj files don't have (or dont use) any information about the opacity of materials.
Perfect Dark levels seem to be the only ones that use the "d" value in the mtl files.

Also if this has to do with obj/mtl files just simply not being able to support this, do the bin files for the level itself have the data?

So yeah thank you for reading!
 
View user's profile Send private message
pavarini
00 Agent
00 Agent


Joined: 07 May 2015
Posts: 479

 PostPosted: Fri Dec 02, 2016 1:03 pm    Post subject: Reply with quote Back to top

Have you tried exporting it as fbx? Just click the type and change obj to fbx when exporting.
 
View user's profile Send private message
SubDrag
Administrator
Administrator


Joined: 16 Aug 2006
Posts: 6118

 PostPosted: Fri Dec 02, 2016 1:20 pm    Post subject: Reply with quote Back to top

Make sure you use the 64-bit version of Obj2an8 if you are exporting levels to FBX, as it will take a lot of memory (RAM) to do so. But it should export with vertex shading which will give you the alpha you are looking for, I believe.
 
View user's profile Send private message
Volante
Agent
Agent


Joined: 23 Dec 2013
Posts: 7

 PostPosted: Fri Dec 02, 2016 4:24 pm    Post subject: Reply with quote Back to top

Thank you for the help. I had no problems getting objtoan8 working and it seems to be very useful.

The version of FBX is an older format that many of the programs ive tried opening with are incompatable.
The FBX files do include the data I need thanks! Just to be clear in the FBX I need the values of "TransparentColor", and "Opacity".

I will poke around some ways of converting the FBX file back to a OBJ with these values, or simply make another file
with these values attached to their textures.
 
View user's profile Send private message
Volante
Agent
Agent


Joined: 23 Dec 2013
Posts: 7

 PostPosted: Fri Dec 02, 2016 4:42 pm    Post subject: Reply with quote Back to top

Another question, I can't determine how opacity is done for certain effects in goldeneye (ie: secondary textures).
Is it just vertex coloring applied as a alpha map? Or does the entire texture have a opacity value?
 
View user's profile Send private message
SubDrag
Administrator
Administrator


Joined: 16 Aug 2006
Posts: 6118

 PostPosted: Fri Dec 02, 2016 5:00 pm    Post subject: Reply with quote Back to top

That is odd, what program are you using? I've had no trouble importing the FBX into any modelling program, except if the program is too old or not official, like Blender. You can choose the supported FBX format in the bottom right of obj2an8 if you open it and use that to convert, or probably use the FBX Convertor to convert to a different later FBX format:
http://usa.autodesk.com/adsk/servlet/pc/item?siteID=123112&id=22694909

It saves the transparency to the vertices, not materials. You are thinking it is supposed to be stored to the materials, but it is not. Same material can be used for alpha in one place, and not alpha in another. Well, some textures themselves have Transparency/Alpha embedded in the bitmap (and they will exported from the program too, in alpha channel). But there are no materials in GE, it is on a per triangle/vertex basis, that is why alpha is encoded to the vertices.

There are some complicated effects in GE, such as decals, triangles on top of triangles with alpha, even detail map in one or two spots. You will have better luck if you want to see how its done in the editor itself, turning on Advanced Rendering in preferences and right clicking on a triangle and saying Replace Texture to see its parameters.

A lot of the older style things cannot be encoded very easily into FBX format, such as Decal. I just have to use keywords, so it's not really handled right, such as TopFlag, ClampS, ClampT, MirrorS, MirrorT, etc. You'd think FBX format would support clamp and mirror, but I don't see it.
 
View user's profile Send private message
Volante
Agent
Agent


Joined: 23 Dec 2013
Posts: 7

 PostPosted: Fri Dec 02, 2016 5:17 pm    Post subject: Reply with quote Back to top

Im using something completely custom. Its basically openGL and im just using the obj loader provided to load the levels.
This is still just OBJ at this point, I was going to convert the FBX files back into obj to see if the alpha channel for vertex coloring
is peserved.



This is a example of the problem.
The black on the texture should be transparent (set by the material property named "TransparentColor").
Then this is where I have confusion about whether the vertex coloring affects the
alpha of the texture (to fake opacity?), ingame this grate texture should be slighty opaque.

Code:

newmtl m13TransparentCullBoth
Kd 1.0 1.0 1.0
Ka 0 0 0
illum 2
Ns 64
d 1.000000
map_Kd 9ACC2BOther4040D.bmp


This I think is the material definition for that grate. The "d" property is the opacity of the material, and its 1.
Which is weird because its opaque ingame.

So if it is the vertex coloring, then theres a missing number behind all of the values. Theres 3 for rgb, and 1 more for alpha.
The alpha number isn't in any of the OBJ files.
 
View user's profile Send private message
Volante
Agent
Agent


Joined: 23 Dec 2013
Posts: 7

 PostPosted: Fri Dec 02, 2016 5:40 pm    Post subject: Reply with quote Back to top

Havent seen your edit, but this answers alot of questions thanks alot!
This explains a few tricks ive seen in the game and they all still blow my mind.

What it looks like I might have to do is some tweaking to the shaders of my program to accept some new values.
Actually I had to do that in the first place anyway.
 
View user's profile Send private message
SubDrag
Administrator
Administrator


Joined: 16 Aug 2006
Posts: 6118

 PostPosted: Fri Dec 02, 2016 5:46 pm    Post subject: Reply with quote Back to top

Those grates are done via the bitmap. It should have alpha for the black part. Check the exported image in photo shop. The Transparent text in material name indicates game allowed texture alpha channel. The material opacity is not suitable for these as it would be the entire texture, not just holes.

The probleml with obj loader is lack of vertex colors. I made a custom obj format but that's why other formats like fbx or Dae are more powerful.
 
View user's profile Send private message
Volante
Agent
Agent


Joined: 23 Dec 2013
Posts: 7

 PostPosted: Fri Dec 02, 2016 6:00 pm    Post subject: Reply with quote Back to top

The bitmaps from the editor export as 8-bit. I havent check the image tools if they can export in 24-bit though.
Yeah ive noticed the tags in the names of the textures and materials and use them currently.
Vertex colors with alpha also isnt supported on my end. So ill have to go without for awhile.

Again thanks.
 
View user's profile Send private message
Trevor
007
007


Joined: 15 Jan 2010
Posts: 926
Location: UK, Friockheim OS:Win11-Dev PerfectGold:Latest

 PostPosted: Sat Dec 03, 2016 2:48 am    Post subject: Reply with quote Back to top

As far as Im awayer, PG exports all textures as 32bit RGBA since some formats supported by the N64 are not supported on PC software.
Formats:
4Bit CI - Supported in PC software
4Bit GS -Not Supported in PC software
4Bit GS3/1 - Not Supported in PC Software
8Bit CI - Supported in PC software
8Bit GS - Not Supported in PC software
8Bit GS4/4 - Not Supported in PC Software
16Bit C - Supported in PC software (most default to 24bit - Not supported on N64)
16Bit GS - Supported in PC software as Greyscale PNG
32Bit - Supported in PC software

So, for most applications 32bit is supported and for the sake of exporting models for use outside the N64, its easiest to export 32bit.
Importing is a diferent story and PG has come a long way. Any of the above formats can be made so long as they meet memory requirements.

Trev
_________________
 
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ShootersForever.com Forum Index -> Q-Lab Hacking Department All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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

Cobalt 2.0 BB theme/template by Jakob Persson.
Copyright © 2002-2004 Jakob Persson


Powered by BB © 01, 02 BB Group

 


Please Visit My Other Sites: GoldenEyeForever.com | GrandTheftAutoForever.com

Got kids? Check out my Dora The Explorer site with games and coloring pages!

Our forums feature Nintendo 64 games, GoldenEye 007 N64 New Maps and Missions, GoldenEye Cheats, N64 Emulator, Gameshark, GoldenEye Multiplayer and more!

[ Privacy Policy ]