Home   Help Search Login Register  

Author Topic: Custom Optics  (Read 2984 times)

0 Members and 1 Guest are viewing this topic.

Offline birdy

  • Members
  • *
Custom Optics
« on: 07 Feb 2009, 07:11:53 »
Hello again fellow OFPers.  ;)

I'm here because I've been trying to get - you guessed it - Custom optics on one of my guns.

It's the BAR for the WW2 Complete pack, And I think the optics for it are hideous, so bad I can't even play with it.   >:(

So, I got a screenshot of the CoD BAR, and cropped it out, but does anyone know how to get it in-game?

I've tried the Tutorial here, but I can't get the Alpha channels working, I have Paintshop pro 7, but It won't let me save the image with the essential Alpha channels still in the image.

Could someone help me out with this?

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: Custom Optics
« Reply #1 on: 07 Feb 2009, 11:04:36 »
Hey there!

The way I've always created alpha channels (I have Adobe Photoshop) is by first pulling up a new picture with a transparent layer from the start, and then copy-pasting in the other picture, and then just cutting away the parts I want to be transparent (you can see which parts will be transparent by the chequered black and white layer underneath) : after that, I save it in the Targa (.trg?) format, making sure to keep all the layers, after which it can be opened in Texview. Once in texview, I can simply save it as a .paa file, and it will have all the appropriate alpha channels.

Haven't used this method for addons though, and mostly for ArmA, but it should work? Also don't know how it works exactly in Paintshop.

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Custom Optics
« Reply #2 on: 07 Feb 2009, 16:24:17 »
I use PSP 7 to make pictures with alpha.

Make your basic tga picture completely white.
Make sure of course that it is dimensioned in powers of 2, for example (256 X 256).

Copy/Paste your optics onto this white background, only the optics bit, so use the 'magic wand' to cut your optics image from the image you have to this new one with the white background.

Once you have your optics on the white background, make sure the optics part of the image is the only part selected.
If you de-selected at some point just use the magic wand to select the white background then 'Selection Menu ....... Invert'.
Once you have just the optics portion selected go to 'Selections Menu ........ Save to Alpha Channel'.
Now the requester that pops up will show the alpha image as it stands, just press OK.
A new requester pops up for you to name the channel, just press OK.

Save your new tga image.

Load it into Texview and check the alpha image is ok, then resave it as paa.


Planck

I know a little about a lot, and a lot about a little.

Offline birdy

  • Members
  • *
Re: Custom Optics
« Reply #3 on: 07 Feb 2009, 23:28:01 »
Thanks, But I still can't Figure it out...

what size should I make it? Would sending you what I have help you to help me further?  :P

I just can't get it right, I've centered the optic on a (1024*768), but I can't figure out if it's correct or not, I can't even understand the tutorial.  :dunno:

I think what I don't understand is the weird dimensions, I can't center it on 1024*1024, nor 512*512...

I'll send you my TGA file... the one that I think is right... I think....

oh, and when I try and save it with the Transparents it wont save with the checkered blocks, it only turns white, Is this normal?

E: Ok, just tried it in Paint.Net, and the checkers are staying, now all I need to do is convert it into .paa and put it in OFP?

(Optics that I have in Attachment.)
« Last Edit: 20 Aug 2009, 04:12:37 by hoz »

Offline hoz

  • OFPEC Site
  • Administrator
  • *****
Re: Custom Optics
« Reply #4 on: 07 Feb 2009, 23:40:13 »
The image size must be in a power of 2 so you need the image dimensions to be 512x512 or 256x256 or 512x256.

Centering/ final sizing is done in the config I bet.
« Last Edit: 07 Feb 2009, 23:41:52 by hoz »
Xbox Rocks

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Custom Optics
« Reply #5 on: 08 Feb 2009, 00:00:09 »
Your tga image is not really what I would call an optics view, it is just a view of the ironsights from an angle slightly above.

However, on the basis that this is what you want an alpha applied to and converted to paa .......here it is attached.

I made the image size 512 X 512.


Planck
« Last Edit: 20 Aug 2009, 04:12:49 by hoz »
I know a little about a lot, and a lot about a little.

Offline birdy

  • Members
  • *
Re: Custom Optics
« Reply #6 on: 08 Feb 2009, 00:07:38 »

Thank you very much.

I love this Community, you guys are very helpful, thanks!

-but just one more thing, how do I get this into the game? I've dePBOed the optics for the gun, and now I would like to replace it, and put it in game...

You've already done so much for me, so I'm going to try, but if you're not busy you could shoot a tut at me ;)

thanks again, Planck.

E: I should probably clarify that the original optic that I dePBOed is in P3d format.

quote from previous post not necessary - Planck
« Last Edit: 08 Feb 2009, 02:44:18 by Planck »

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Custom Optics
« Reply #7 on: 08 Feb 2009, 00:37:53 »
You need to pop the p3d into O2Lite and see what textures it uses.

Then look at the textures to see exactly what the optics model is using.

Lastly replace the textures with the ones you want.



Planck
I know a little about a lot, and a lot about a little.

Offline birdy

  • Members
  • *
Re: Custom Optics
« Reply #8 on: 08 Feb 2009, 02:13:30 »
pop the p3d into O2Lite

O2lite doesn't want to work for me, It keeps saying "able to open external viewer" when I load it, then when I try to load the .p3d it says load error.  ???

Do I need bulldozer? And if I do... that's not good news, I've heard it needs the OFP CD, and I lost mine YEARS ago.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Custom Optics
« Reply #9 on: 08 Feb 2009, 02:48:12 »
You shouldn't need the viewer just to load the model and examine it in O2Lite.

One reason it might not be loading into O2Lite is if the model is binarized.....ODOL format.
O2Lite will only load MLOD models - unbinarized.


Planck
I know a little about a lot, and a lot about a little.