Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > What can save an RGB image (for OpenGL texture)

What can save an RGB image (for OpenGL texture)
Thread Tools
Dedicated MacNNer
Join Date: Jun 2000
Location: Dundas, Ontario, Canada
Status: Offline
Reply With Quote
Sep 9, 2001, 02:18 AM
 
Hello,

In a game I am writing, I need to be able to map a texture onto an object but I am having difficulty. The image loader implementation I am using seems to only work with .rgb images. I obtained one and the texture loader now works perfectly with that file. The only problem is that I need to create my own texture and I don't seem to be able to create one in a format understood by the loader.

Does anyone know of anything that can create these .rgb image files?

Thanks,
Jeff.
Spectral Class
"Shedding Light on Innovation"
     
Fresh-Faced Recruit
Join Date: Jul 2001
Location: Rehoboth Beach DE
Status: Offline
Reply With Quote
Sep 10, 2001, 08:14 PM
 
GraphicConverter will work.Save the image as an .sgi,this is the correct format,then rename it by hand .rgb.I happen to be working on the same problem myself.It's a little tricky,I had some weird problems with the images not showing up on the desktop(where I was saving them to),so I had to save them to the destination folder.Remember that both the x an y dimensions have to be powers of 2,for example the texture map I have used is 256*256 pixels.There is a way around this requirement,but I don't know how to pull it off.Anybody else?
     
Dedicated MacNNer
Join Date: Jun 2000
Location: Dundas, Ontario, Canada
Status: Offline
Reply With Quote
Sep 11, 2001, 12:52 AM
 
Thank you VERY much!

I thought that rgb and sgi were the same thing. I used AppleWorks to save the jpg I found as sgi and then tried to rename it by hand but had problems. I thought that it was because of some small difference between rgb and sgi formats. I had completely forgotten about that powers of 2 issue.

Thanks for reminding me,
Jeff.
Spectral Class
"Shedding Light on Innovation"
     
Dedicated MacNNer
Join Date: Jun 2000
Location: Dundas, Ontario, Canada
Status: Offline
Reply With Quote
Sep 11, 2001, 01:41 AM
 
Problems persist. It appears as though the image I was using was already 64 pixels by 64 pixels. I tried to re-save it with GraphicConverter and then even tried it at 256 by 256 but I keep getting the same problem.

I can't understand why I am having problems. Are there any special options when saving with graphics converter? I can't get it to work.

Any other assistance would be greatly appreciated,
Jeff.
Spectral Class
"Shedding Light on Innovation"
     
Dedicated MacNNer
Join Date: Jun 2000
Location: Dundas, Ontario, Canada
Status: Offline
Reply With Quote
Sep 11, 2001, 01:53 AM
 
Ah, I got it. I just had to set Verbatim instead of RLE in the save options (luckily I have no idea what either of those are).

Thanks for your help,
Jeff.
Spectral Class
"Shedding Light on Innovation"
     
Fresh-Faced Recruit
Join Date: Jul 2001
Location: Rehoboth Beach DE
Status: Offline
Reply With Quote
Sep 11, 2001, 02:40 AM
 
Verbatim means uncompressed.RLE stands for Run Length Encoding,which is a type of compression.Suppose you had a graphics file that was in an interlaced format,where all the R values are stored,then all the G values,then all the B values.Now suppose you ran into a section in the R values that ran 55,55,55,55,55,55,43,57,87.RLE will convert this to (6)55,43,57,87,which means 55 six times,followed by 43,then 57,then 87.This is not a literal description of the encoding scheme,just a basic sketch of how it works.Non-interlaced graphics formats have the values stored RGB for each pixel,i.e. rgb,rgb,rgb,etc.

[ 09-11-2001: Message edited by: 4.669 ]
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:14 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2