Please login or register.

Login with username, password and session length
Advanced search  

News:

Use of ePSXe before 2.0 is highly discouraged. Mednafen/RetroArch is recommended for playing/testing, pSX is recommended for debugging.

Pages: [1]
andredoubleu [Posts: 6]
  • View Profile
  • share
  • [December 08, 2013, 06:41:44 AM]
Orbonne Monastery Texture Sheet in Color
« on: December 08, 2013, 06:41:44 AM »
Hi!  I'm programming Orbonne Monastery from scratch for a computer graphics class.  I just finished my model, but the texture sheet that I have is in grayscale (I obtained the texture sheet from Ganesha).  Does anyone have a color version you can send me real fast?

I found some colored texture sheets for Orbonne Monastery in Tethical, but the colors are all kind of off and I'm not quite sure why.    I also tried getting the texture sheets from map2gl, but after attempting to run map2gl on 6 different computers and several operating systems and it not working, I abandoned those attempts.

I would like to understand the process for getting the colored textures myself, but right now I'm more concerned with just getting my hands on a copy so I can turn my assignment in!
Sonic Dreams
lirmont [Posts: 473]
  • View Profile
  • share
  • [December 08, 2013, 08:14:12 AM]
Re: Orbonne Monastery Texture Sheet in Color
« Reply #1 on: December 08, 2013, 08:14:12 AM »
The simple answer is to use the appropriate blend file Tethical's original github repository provides. That's the mesh plus a material that references the image. If you want to just use the model on its own, you'll need to replace the reference to the image file within Blender (a 3d modeling program). Then, you'll need to export the result back to whatever format your project needs (which Blender likely has an exporter for already).

Other than that, you have a misconception about how the textures work. That grayscale image is the texture. Like practically every other image in the game, it's a paletted image (re: it has indexed colors). The stuff you described as "all kinds of off" is the grayscale image put next to itself in all of the different palettes in one image. For computer graphics, this is the easiest way to realize the end result in a 3d modeling program. I don't know how the actual game does it, but map2gl realizes it like that, then rewrites the UV coordinates to point only to the appropriately realized section.

That said, you do need to use map2gl to appropriately pull out both the mesh and the realized texture if you want it to show up in color in an external program.

Here are threads where other people tried to get map2gl working: http://ffhacktics.com/smf/index.php?topic=10013 and http://ffhacktics.com/smf/index.php?topic=8283.

Good luck.
« Last Edit: December 08, 2013, 10:18:33 AM by lirmont »
andredoubleu [Posts: 6]
  • View Profile
  • share
  • [December 09, 2013, 04:42:52 AM]
Re: Orbonne Monastery Texture Sheet in Color
« Reply #2 on: December 09, 2013, 04:42:52 AM »
lirmont, thank you soo much for answering all of my questions.  I looked again at the mega image and just combined the pieces I wanted so that I wouldn't have to rewrite any of my code.  It was kind of a hack, but I just needed to turn my assignment in.

But actually, I didn't use map2gl to pull the mesh and the realized texture; because this is an introductory graphics course, we were required to draw all of our polygons and map all of our textures by hand, and not import any other objects into the scene.  It was a pain in the rear, and took a few days, but I finally got it.

As far as using map2gl, I read the posts that you linked to, but I still can't get it to work.  I tried on a Windows 7 32-bit machine, and I keep getting the error:

Code: [Select]
NameError: global name 'create_textures_seprate' is not defined
I then tried on Ubuntu Precise.  I was able to run the program and get it to display the scene, but it won't respond to any keyboard inputs, and in the File menu, there's no option to export anything.
Sonic Dreams
lirmont [Posts: 473]
  • View Profile
  • share
  • [December 09, 2013, 06:29:17 AM]
Re: Orbonne Monastery Texture Sheet in Color
« Reply #3 on: December 09, 2013, 06:29:17 AM »
Okay, well, you hit a bug in the software. Gomtuu (the guy who wrote it) apparently did the work to carry on with individual textures, but he didn't link up the features he wrote to do that correctly in the code. It's probably because it's very unlikely to ever get called. Anyway, I've fixed it to call his code correctly, but you'll have to re-download the pack again: [535]map2gl+export-full.zip. However, you won't be able to export it (because that code I wrote to export the map and texture assumes you're using the single combined texture). If you run the updated version, I'd be interested to see the output around this place:

Debugging the GLError


Your GLError won't say that. That's an error I forced in the OpenGL graphics context to show what it might look like on your end. I'm interested in what it says, and maybe, having that text, I'll be able to adjust the code so it doesn't fail on you; it's just the success of a single graphics call that the program makes the determination off of.

Specifically, that line is:
Code: [Select]
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB5_A1, ix, iy, 0, GL_RGBA, GL_UNSIGNED_BYTE, imagestr)
If I had to guess, I'd guess your card/drivers don't support GL_RGB5_A1 (which is arguably a pretty specific graphics storage mode and probably unnecessary; re: 5 bits Red, 5 bits Green, 5 bits Blue, 1 bit Alpha).

If it complains about that in the GLError, you might download a program that lets you view what your video card's OpenGL implementation actually contains (like GLView; would be in the "Pixel Formats" location of the program).
andredoubleu [Posts: 6]
  • View Profile
  • share
  • [December 10, 2013, 06:10:23 AM]
Re: Orbonne Monastery Texture Sheet in Color
« Reply #4 on: December 10, 2013, 06:10:23 AM »
I'll definitely get to this in a few days.  It's finals week..!
Pages: [1]