[MAP] Rust Vents

Post anything to do with editing Nexuiz here. Whether its problems you've had, questions, or if you just want to show off your work.

Moderators: Nexuiz Moderators, Moderators

Postby divVerent » Mon Aug 13, 2007 8:46 pm

.jpg? There we have it. Do not use .jpg files if they should be transparent, make .tga files with an alpha channel. Note that .jpg files do not support transparency.

For .tga files with an alpha channel, my shaders will work quite well. But take out the "polygonoffset" and "surfaceparm detail", and perhaps the "surfaceparm nonsolid", you wont need them.

Did girder.tga actually have transparency? Use one of the .tga files included with capturecity for testing. It's unlikely, but maybe your image editing app doesn't write alpha transparent TGAs in a way that DarkPlaces can read them? I created mine using GIMP.
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby Clueless Newbie » Mon Aug 13, 2007 9:05 pm

divVerent wrote:.jpg? There we have it. Do not use .jpg files if they should be transparent, make .tga files with an alpha channel. Note that .jpg files do not support transparency.

Sorry, but that's not it. ;)

I replaced the .tgas with transparency with .jpg versions of the same textures when I gave up on the transparency thing. Now that I'm giving it a new shot, I'm back to .tgas.

For .tga files with an alpha channel, my shaders will work quite well. But take out the "polygonoffset" and "surfaceparm detail", and perhaps the "surfaceparm nonsolid", you wont need them.

Ok. (snip) Gone. I assume the "nonsolid" parameter was why I could walk straight through those brushes...

Did girder.tga actually have transparency? Use one of the .tga files included with capturecity for testing. It's unlikely, but maybe your image editing app doesn't write alpha transparent TGAs in a way that DarkPlaces can read them? I created mine using GIMP.


Well, here's girder.tga with it's old name:

http://www.notam02.no/~clund/nexuiz/rustframe.tga

As far as I can tell, it has an alpha channel.

Maybe the problem lies in the mac version of Radiant? It does not seem to support .pngs at all, and maybe it doesn't quite know what to do with .tgas either. Are there any switches that shouuld be turned on when compiling brushes that have transparent surfaces?

Is there a way to make transparent textures in Nex by using transparency maps in separate textures instead by alpha channels? Something that has a "_TRANS" postfix, for example..?
2 GHz Mac Pro
Mac OS X 10.6.2
nvidia GeForce 8800 GT
Clueless Newbie
Keyboard killer
 
Posts: 518
Joined: Wed Jan 03, 2007 1:01 pm

Postby divVerent » Mon Aug 20, 2007 8:53 pm

Clueless Newbie wrote:Ok. (snip) Gone. I assume the "nonsolid" parameter was why I could walk straight through those brushes...


This proves that q3map2 has indeed seen your shader. Good!

Well, here's girder.tga with it's old name:

http://www.notam02.no/~clund/nexuiz/rustframe.tga

As far as I can tell, it has an alpha channel.


As far as I can tell, it does NOT have an alpha channel: the image descriptor byte (byte 17) in your file is 00, so it has 0 alpha bits (and no application I tried displayed it with transparency). However, your application indeed TRIED to write a TGA with alpha channel - if I set this byte to 08, it works. Report this bug to the manufacturer of your image editing application, and either fix your TGAs using a hex editor in the meantime, or use something else.

You can get the fixed TGA at http://hagger.rbi.informatik.uni-frankf ... e-copy.tga, tell me if that works.
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby The mysterious Mr. 4m » Mon Aug 20, 2007 10:32 pm

i tried several programs (PSP7, Paint.NET, IrfanView, XnView, Serif PhotoPlus) and all except for IrfanView and XnView displayed the alpha channel.
4m [PB] (amoebios)

This is Your world.
The mysterious Mr. 4m
Forum addon
 
Posts: 1402
Joined: Wed Mar 01, 2006 6:03 pm
Location: germany

Postby Clueless Newbie » Tue Aug 21, 2007 12:26 pm

As far as I can tell, it does NOT have an alpha channel: the image descriptor byte (byte 17) in your file is 00, so it has 0 alpha bits (and no application I tried displayed it with transparency). However, your application indeed TRIED to write a TGA with alpha channel - if I set this byte to 08, it works. Report this bug to the manufacturer of your image editing application, and either fix your TGAs using a hex editor in the meantime, or use something else.

Hmm.. that tga was made with PS, and according to another one of my apps, the resulting image does have an alpha channel. I'd be writing to more than one manufacturer. Too bad I couldn't make any sense of the GIMP interface. :?
You can get the fixed TGA at http://hagger.rbi.informatik.uni-frankf ... e-copy.tga, tell me if that works.

"File doesn't exist". Typo in the filename? ;)
2 GHz Mac Pro
Mac OS X 10.6.2
nvidia GeForce 8800 GT
Clueless Newbie
Keyboard killer
 
Posts: 518
Joined: Wed Jan 03, 2007 1:01 pm

Postby The mysterious Mr. 4m » Tue Aug 21, 2007 3:11 pm

no typo, just a comma. the forum URL interpreter falsely included it.
http://hagger.rbi.informatik.uni-frankf ... e-copy.tga

hmm.... is it a bug if the app reads the file with the missing 08 byte? i dont think so, as long as the app writes proper files with the byte included.
4m [PB] (amoebios)

This is Your world.
The mysterious Mr. 4m
Forum addon
 
Posts: 1402
Joined: Wed Mar 01, 2006 6:03 pm
Location: germany

Postby divVerent » Wed Aug 22, 2007 2:39 pm

Not sure how TGAs with 32 bit colors WITHOUT declared alpha bits SHOULD be interpreted... because that's what the broken file specifies. Should a viewer maybe regard this as a CMYK file? :P
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby Clueless Newbie » Sat Sep 01, 2007 4:57 pm

divVerent wrote:Not sure how TGAs with 32 bit colors WITHOUT declared alpha bits SHOULD be interpreted... because that's what the broken file specifies. Should a viewer maybe regard this as a CMYK file? :P
Maybe this is where the problem lies... I chose to use 24-bit .tgas because I thought that would reduce the file size ever so slightly...

I'll try 32-bit the next time I try to use textures with transparent parts.
2 GHz Mac Pro
Mac OS X 10.6.2
nvidia GeForce 8800 GT
Clueless Newbie
Keyboard killer
 
Posts: 518
Joined: Wed Jan 03, 2007 1:01 pm

Previous

Return to Nexuiz - Editing

Who is online

Users browsing this forum: No registered users and 1 guest

cron