Jump to content
Sign in to follow this  
akm74

Jpg better then pac ?

Recommended Posts

I just experiment with textures and look on this screen.  Is Jpeg really better then pac ?

1121200212215682.jpg

Share this post


Link to post
Share on other sites

I may sound stupid, but hell, I didn't know you could use jpeg's as textures! WHY DIDN'T YOU PEOPLE TELL ME! I'm redoing my TEC-9, the pac texture format screwed it up!

Share this post


Link to post
Share on other sites

I learn it just 2 hours ago. You have to type JPG extension manually. Oxygen didn’t give you these options.

Share this post


Link to post
Share on other sites

Wow , i had no idea about this, the jpg texture seems a lot better

But have you tried to see the result ingame , if the engine show the same difference as Oxygen ?

Share this post


Link to post
Share on other sites

M60 from SOF2 in buldozer. And Yes, i did use jpeg as textures.

1121200212114172.jpg

1121200212114239.jpg

Share this post


Link to post
Share on other sites

Really impressive

I never thought ingame the difference will be the same as the one you show us in the first pic !

If every new models come with jpg textures instead of paa for new soldiers , weapons or vehicles , this game will not be the same again graphic-wise of course wink.gif .

Share this post


Link to post
Share on other sites

While jpg textures can be used, you should be aware the performance hit for doing so is quite significant, as JPG decompression must be done by the CPU.

Another note is mimmapping does not work well with JPG textures in OFP, therefore objects viewed from larger distances may look "aliasing" (too fine texture used) and there is usually video card perfomance hit for using too large mipmaps for small objects.

Share this post


Link to post
Share on other sites

Thanks for information Suma.

Is it anything else you can share with us about texturing?

Some hidden options or command line in TexView 1.1? Maybe some in-house made pallets or swatches for Photoshop? Anything?

BTW

I save jpeg files with 100% quality. It means they not heavy compressed anymore. The size of final jpeg almost the same as jpeg converted to Pac.

Share this post


Link to post
Share on other sites

you can try to save your textures as "save for web" in gif format, you will get almost the same quality in ofp as in photoshop then.

how big was a pac file that you converted from jpg to pac?

Share this post


Link to post
Share on other sites

Yes, I know that. You can even open any BIS original texture file (let say for example M1A1) in Photoshop.

Then use “save for web†future. But not save image itself, just use options to save swatches.

Then you can apply this swatches to any custom made texture to stay 100% in OFP color range.

Share this post


Link to post
Share on other sites

Even with the performance hit, this is good stuff. The "speckled" appearance of "standard" OFP textures has always been a bit of bugbear with me.

Got a Radeon 9700 Pro coming in couple of days.. oooh I can't wait;)

Prospero

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">

Even with the performance hit, this is good stuff. The "speckled" appearance of "standard" OFP textures has always been a bit of bugbear with me.

Got a Radeon 9700 Pro coming in couple of days.. oooh I can't wait;)

<span id='postcolor'>

Uhm. I have to stuck here with my Kyro2 and 750 Mhz of Duron-"Power".

Well. I don't suggest that addon-makers should use the maximum possible resolution and extensive use of jpg's in this case. Sumhow i guess it's not so important because in most cases you doesn't see so much from the better quality, at least you doesn't stand very close to that objects.

In a hasty battle you wouldn't really see a big difference between jpg or paa, or at least i doesn't think that anyone will look for that when involved in heavy fighting.

So i think it's ok to use .paa and .pac instead of .jpg., as long not everyone is using hyperfast equipment, and that's surely still some much!

Regards

GM

Share this post


Link to post
Share on other sites

Ahhhh, people with low-end machines, ever the advocates of restricting anything that may force them to upgrade wink.gif

I have a question, in regards to texturing, do many of you create the textures from scratch or is there an online resource with a range of different textures?

I am 20% through doing a Toyota hilux and in searching the net I have found very few images suitable of using for texturing (seems nobody likes to take photos of cars at exact angles, everyone wants the "sports" look)

Share this post


Link to post
Share on other sites

The jpg,s can be smaller than pac,s if you compress so. But suma says JPG decompression must be done by the CPU. And thats the problem. I use jpg very long for my weapons and there are some problems of the loading from jpg if they come in the scene. But the quality of jpgs is the best wink.gif .

Share this post


Link to post
Share on other sites

I remember the day when the only format we could use at all was Jpeg, way back in the winter of '01 when Kegetys figured out you could retexture OFP models with Jpegs.

Share this post


Link to post
Share on other sites

I would advise against using jpgs due to the increased processing required. Stick to paa/pac.

It might look better to use jpg but if everyone starts using them, then addons will be unuseable.

SelectThis

Share this post


Link to post
Share on other sites

So how do you get the jpegs into O2, i can get it in O2, but then when I view the model, it says cannot load .JPG and renders the model white. Do you start with a GIF and then simply rename it JPG or what, I ont really understand.

Share this post


Link to post
Share on other sites

You have to change the texture paths manually with a hex editor.

Share this post


Link to post
Share on other sites

An alternative to the mipmaping problem could be to use the jpg textures for the first lod and pacs for the remainder. In the tests that I've done there doesn't seem to be any lag so far. How it is on other's cpu's I don't know. But the improved textures are very good.

An couple of examples of comparable file sizes:

A pac file for a 512x256 texture weighed in at 84.5 kb while its jpg alter ego weighed in at 33.9 kb

Even better was a bigger a pac file for a 1024x512 texture weighed in at 341kb while its jpg alter ego was only a mere 65.1 kb

Share this post


Link to post
Share on other sites

Another point you might want to consider when using JPG textures:

While JPG textures are stored very effectivelly on the disk, they are stored with no compression while loaded, because video card needs them uncompressed. On the other hand DXT compressed textures remain compressed even when being used.

Share this post


Link to post
Share on other sites
Guest

Ok.....not to have go at BIS (because TexView has been AMAZINGLY useful)...but are there some programs or plugins out there that convert .jpg or .tga into a DXT (which version BTW) file format....which I am assuming is what .paa and .pac are? And how native is the .paa or .pac format to OFP? Would it read a DXT file that had a different extension? Sorry...bit aof a n00b at this stuff....

I know there are Nivida plugins for Photoshop....but it's for 5.45 only, and I have 5.0. confused.gif In particular I am looking for something that handles subtle changes in colour better. I have read things about DXT compression, but they either don't apply to my problem, or it's the whole source code! tounge.gif

Anyone know anything good?? smile.gif

Share this post


Link to post
Share on other sites

NVIDIA has some tools a developer uploaded onto their site. It includes a few different things including the photoshop plugin, a command line DDS texture converter, a dll that itegrates into windows explorer so you can view thumnails of dds files, and 3dsMax dds support. < 1-3MB:

http://developer.nvidia.com/view.asp?IO=ps_texture_compression_plugin

An alternative is to download the Microsoft DirectX SDK (>100MB) and use the DXTex Tool. They may have it as a separate download. It supports opening BMP and DDS only and saves to DDS files. There are 5 different compression formats within DDS, and most graphics cards will support few or none of them. Higher compression formats within DDS are a hardware issue, but maybe OFP game engine forces you to use lowest format.

If link does not work, go to www.nvidia.com

and look in:

Developers ->

NVSDK ->

Textures ->

DXT Tools

What I think I know about OFP textures. If I am wrong please tell me so:

1. Textures must be: 2^x by 2^y dimensions although TexView will open up any evenly dimensioned textures if in right format. Saving incorrect dimensioned textures in TexView creates null files.

2. TexView will open: TGA, GIF, PAA, and PAC

TexView lists JPG, but will not open them.

It will NOT open: BMP, TIF, JPG, PCX, PNG, or DDS

TexView will convert to PAC, PAA, or TGA

You can manually type in extension if you want, but if no extension gets entered, it selects PAA or PAC automatically based on bit depth and alpha channel presence. Typing in non-supported extension (e.g. JPG) creates PAA or PAC file. Unless you rename file from (e.g. JPG) to PAA or PAC, TexView will not open it.

When TexView saves a file as PAC or PAA, mip maps get created (since PAC and PAA format have built-in support for mip maps). Bu when saving as TGA, mip maps do not get created since TGA does not support mip maps.

3. Oxygen will open: TGA, GIF, PAA, and PAC

Although TGA and GIF get opened, they get immediately converted to PAA or PAC, so they will not get used in-game.

If you get error, you are missing some dlls that need to be copied into o2light directly.

The textures an Oxygen created model references will either be PAA or PAC.

4. By hex editing Oxygen created models, you can change name/format of textures to alternate formats that the game engine supports. I think there is a texture swapping prog. that does this.

Game engine supports: PAA, PAC, JPG, DDS

Other formats maybe supported: TGA, PNG, PCX, BMP,

The DirectX utility code may read some of these in, but the game engine may not have supporting code/or not let it happen.

5. Ideal Texture Format:

Extension Bit Depth(col) Colors Transparency(levels) Mips DiskSpace CPU VRAM

PAA 12 4,096 16 Yes Good Good Good

PAC 8 256grey 256 Yes Good Good Good

JPG 16?24? 65,536 ? No? Bad Worst Good (same as PAA/PAC)

DDS 16 65,536 2 Yes(is supported..) Best Best Best

Others that might but probably aren't supported:

TGA 24/32 16.7million! 256 No? Worst Depends on comp Worst

Since DDS is supported on 99% of video cards, requires no CPU processing, supports 61,440 more colors than PAA, takes up the least amount of VRAM and still supports basic transparency, it should be the defacto standard for all addons. The game Morrowind uses DDS for all textures and it's skies look beautiful whereas OFP skies are relatively ugly (To be fair, Morrowind uses terrain paging system where not all textures are loaded into RAM/VRAM where OFP is different so texture requirements are much more important). Going to DDS will allow you to have 16 times the colors than PAA. All newer cards will support DDS, but older cards GeForce2 maynot. DirectX/OFP engine might convert DDS to uncompressed versions if not hardware supported though--so you need not release separate addons.

Question: If game engine reads in JPG and JPG does not support mip mapping---will your textures get mip mapped in-game? I think Suma said it doesn't work well or something like that. It is just a filtering effect somewhat like ansiotropic filtering or anti-aliasing filtering. The mips just effect really far away textures which aren't that visible anyway. All ground textures and in-game models will be mipped, so I don't think it will be that apparent. What will be apparent is up close textures that look really ugly due to very small bit depths like PAA. CPU time shouldn't be that bad--all textures are loaded off of disk and decompressed at level load time--not during game play. Is slightly longer level load times worth 61,440 more colors (JPG@16bit vs. PAA@12bit)--I think so. JPGs will not be compressed in VRAM, but neither will PAC or PAA unless they are using custom pixel shaders--which didn't come out till DirectX8. Only problem is lack of mips and longer level load times.

P.S. Also on Nividia's developer site, there is a texture library with 50? 512x512 and 1024x1024 textures. It is a free download and is 107MB with textures for glass, metal, cloth, etc. Maybe you will find it useful. All textures are in DDS, do not know what compression level--you may need DXTool to convert them down, but don't think so.

For those of you who have fortitude to read this far, I have few questions about changing sky in OFP (thanks to KEGs:

1. KEG's didn't change horizon gradient. I made beutiful gradient based on my Terragen renderings (that took 5 hours), but when converted to PAA, I have horrible banding problems. I want to change textures but also format. Kegetsy just changed texture. The obloha.p3d model references just 1 texture--stormy skies; what about other textures. They are not referenced in any config/resource files. Must I hex edit the OFP.exe--that may not work.

2. Why did KEG's alter obloha.p3d--it seems to have more segments, but wonder if it is something else.

3. I used a program to generate a cubic mapping of a Terragen sky dome. How do I map my 5 textures to OFP's skydome. Using KEG's method, I can modify the sky dome obloha.p3d and hex edit to other formats, but how do I generate the actual U,V coords for Oxygen skydome from 6 textures. Manually will not work... I think I could do spherical mapping in gMax (3ds) and export model with textures, but I thought only planar mapping will import into Oxygen. Anybody got solution? FYI-my 5 textures have spherical distortion.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×