Author Topic: New art resources?  (Read 3342 times)

Offline SharkD

  • Hero Member
  • *****
  • Posts: 1011
    • View Profile
    • Isometricland
New art resources?
« Reply #15 on: February 12, 2009, 01:45:31 PM »
Quoting: Devon_v
As you surmise, trying to do Photoshop/GIMP style stuff in real time is not very doable.

It doesn't need to do it in real time -- just at the start of missions or when you change the color of your mecha. Also, JH tried changing to higher bit depths previously and there wasn't any slowdown, just some people who were experiencing bugs.

Offline Devon_v

  • Newbie
  • *
  • Posts: 24
    • View Profile
New art resources?
« Reply #16 on: February 12, 2009, 04:45:51 PM »
True... If each instance of the sprite is individual in memory (or can be made such) it would work.


Does anyone know where the data for the space background is stored in the source? The only reference I can find is "NAV_Starfield" in locale.pp, but it doesn't include any size or mapping data that I can see.

I also can't really read Pascal... :)

Edit:
Is the starfield loaded as a texture for one of the mesh*.obj files?

Offline Joseph Hewitt

  • Administrator
  • Hero Member
  • *****
  • Posts: 2552
    • View Profile
    • http://www.gearheadrpg.com
New art resources?
« Reply #17 on: February 12, 2009, 05:21:45 PM »
The starfield is loaded as a texture, but not attached to a mesh. Because it's a texture its dimensions need to be powers of two. It's stored in the variable SpaceTex and rendered in DrawSkyBox().

SharkD- If you can find a way to make that work in SDL, submit a patch. I don't mean to sound defeatist but I've already spent far too much time trying to improve the color swapper and have nothing to show for it. As far as I'm concerned it's a closed issue.

Offline SharkD

  • Hero Member
  • *****
  • Posts: 1011
    • View Profile
    • Isometricland
New art resources?
« Reply #18 on: February 12, 2009, 10:28:27 PM »
OK, I'll ask at the GIMP and SDL forums, and return when I have results of some sort.

Quick question: are GearHead (LGPL) and The GIMP's (GFDL) licenses compatible with each other? I know SDL is also licensed under the LGPL.

Also, should the swapping be done only in memory, or should disk-writing be involved?

Offline Francisco Munoz

  • Sr. Member
  • ****
  • Posts: 401
    • View Profile
    • http://www.wesnoth.org
New art resources?
« Reply #19 on: February 13, 2009, 02:44:47 AM »
You can try to ask in the Wesnoth forums (GPL game)

 They have full-alpha support with PNG and pallete swapping.
 The colour swapping is limited to a set of input colours (usually a magenta scale, but it could be defined to use other) but it could output any set.

Offline SharkD

  • Hero Member
  • *****
  • Posts: 1011
    • View Profile
    • Isometricland
New art resources?
« Reply #20 on: February 14, 2009, 01:08:15 AM »
Could you give an example of an input sprite as well as output? From what I am able to gather from what you said, The GIMP's method seems a lot more powerful. I.e you can define up to six swap channels instead of just one (Wesnoth) or three (GH).

As a side note, the Yahoo! Group has increased the file storage size from ~15MB to 100MB, so I might upload more stuff.

Offline Devon_v

  • Newbie
  • *
  • Posts: 24
    • View Profile
New art resources?
« Reply #21 on: February 19, 2009, 03:30:53 PM »
Just a brief update: I have successfully modified the game to load the prototype image, and even gotten the game to render it right side up. It's only accounting for about 180 degrees though, so I may have to extend the image to 2,048 pixels. That's probably close to half the pixels present in the rest of the game's internal art combined, but...

Other than that I'm still working on what to do about the game's 600 pixel tall screen, since the only options I have are 512 and 1024. 512 isn't too much of a stretch, and I can alter the art to compensate for the distortion on spheres (aka everything in the image).

Quoting: SharkD
Could you give an example of an input sprite as well as output? From what I am able to gather from what you said, The GIMP's method seems a lot more powerful. I.e you can define up to six swap channels instead of just one (Wesnoth) or three (GH).


You should be able to expand even Gearhead's existing method to use six channels. Basically what should work are the three primaries and anything made from perfect 50/50 blends of them, so:

Red 255,0,0
Green 0,255,0
Blue 0,0,255
Yellow 255,255,0
Purple 255,0,255
& Cyan 0,255,255

Should all work. If you have alpha support, you use that for transparency, otherwise you give up one color for that, which still leaves five.

Offline SharkD

  • Hero Member
  • *****
  • Posts: 1011
    • View Profile
    • Isometricland
New art resources?
« Reply #22 on: February 21, 2009, 11:44:04 AM »
Quoting: Devon_v
If you have alpha support, you use that for transparency, otherwise you give up one color for that, which still leaves five.

GH currently uses 8-bit paletted images, so it would have to be the latter.