Custom Image/Texture Format?

Graphic based area of development (Graphics Processing Unit), including the Geometry Transform Engine (GTE), TIM, STR (MDEC), etc.
Post Reply
User avatar
MrQuetch
Curious PSXDEV User
Curious PSXDEV User
Posts: 23
Joined: April 1st, 2018, 9:34 am
Motto: You can accomplish anything.
Looking to: Create professional homebrew.
Location: United States

Custom Image/Texture Format?

Post by MrQuetch » September 30th, 2018, 2:41 pm

Hello, everyone.

Forgive me if this has already been asked and/or answered before, but is it possible to create an image/texture in the form of an array? In other words, is it possible to set the colors of pixels directly to the texture sheet in just plain C code? To be honest, I would much rather prefer this.

For example, the Nintendo 64 uses arrays of colors for the textures. There is a function where you just apply the array, and the texture is drawn out over the polygon.

As far as PS1 development is concerned, I've had minor success with the program used to create/edit the texture sheets. Basically, some of my textures worked for the samples already in the PSY-Q SDK. However, when I went to make my own project, the textures would never display correctly. If it's possible to just load textures as arrays, and have it work, I would be more than glad to do it this way.

Thank you for your understanding.

User avatar
gwald
1997 Yaroze Enthusiast
1997 Yaroze Enthusiast
Posts: 256
Joined: September 18th, 2013, 8:44 am
I am a: programmer/DBA
PlayStation Model: Net Yaroze
Location: Australia
Contact:

Re: Custom Image/Texture Format?

Post by gwald » September 30th, 2018, 7:37 pm

Oh you mean converting binary to C code?
Linux has a program called od or google bin2c, which does that, but I wouldn't recommend it, it's a waste of RAM, unless you plan on reusing that space again.

"For example, the Nintendo 64 uses arrays of colors for the textures. There is a function where you just apply the array, and the texture is drawn out over the polygon."

TMK, no.. you could use a different CLUT with a simple texture?

If you are asking about creating a dynamic TIM, it's actually pretty easy, look at the TIM format and do a 16bit image, 16bit is easiest because there's no CLUT to worry about.
The map on the left is a dynamic TIM's

https://www.youtube.com/watch?v=OTN2gfT ... AGdm_ysGZD


"Basically, some of my textures worked for the samples already in the PSY-Q SDK. However, when I went to make my own project, the textures would never display correctly"

Do they look okay in timUtil? most likely a VRAM placement issue.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests