| View previous topic :: View next topic |
| Author |
Message |
chrisf
Level: 52
Position: Moderator
Joined: 06 Sep 2010
Posts: 242
Kel: 255 [ Donate ]
Online Status: Offline
|
Posted: Sun Jan 23, 2011 8:32 pm Post subject: Raw D2K Art |
|
|
Contents of DATA.R8, as PNG8 with correct palette embedded[/url]
http://ijw.co.nz/d2kout.zip |
|
| Back to top |
|
 |
psydev
Level: 32

Position: Registered User
Joined: 31 Mar 2012
Posts: 59
Kel: 70 [ Donate ]
Online Status: Offline
|
Posted: Mon Apr 30, 2012 1:36 pm |
|
|
Thanks!
I am wondering, do you know of a way to convert these graphics to CNC / RA color palettes? I know a lot of them are bigger than 24x24, but a lot of them aren't, and could be resized/recentered.
And are there any more data files from Dune2K with art in them? |
|
| Back to top |
|
 |
BaronOfStuff
Level: 48
Position: Registered User
Joined: 22 May 2011
Posts: 312
Kel: 332 [ Donate ]
Online Status: Offline
|
Posted: Mon Apr 30, 2012 5:19 pm |
|
|
Oh, now this is good. Thanks for these, now I won't have to scrounge around cutting and pasting existing C&C units together like some sort of low-budget Frankenstein's Army.
| psydev wrote: |
I am wondering, do you know of a way to convert these graphics to CNC / RA color palettes? I know a lot of them are bigger than 24x24, but a lot of them aren't, and could be resized/recentered.
|
You can use the TD/RA palettes in Paint Shop Pro (or any other program supporting palettes), although at the moment it wouldn't translate the 'house remap' colour properly.
I guess I can attempt to create a JASC-format 'purple palette' (using roughly the same range of shades as the commonly-used TD/RA conversion palettes by Nyerguds) so you can translate everything cleanly, but obviously you'd have to resize all the images you want to use yourself.  |
|
| Back to top |
|
 |
Cmd. Matt
Level: 45

Position: Registered User
Joined: 01 May 2012
Posts: 517
Kel: 516 [ Donate ]
Online Status: Offline
|
Posted: Tue May 01, 2012 12:36 pm Post subject: Dune2k SHPs |
|
|
Already created the windtrap (or at least tried to). It worked in the dev mod "palettetest" (from git) if you rename it as powr.shp and add it like the MCV you can replace the power plant in RA. However transparency at the borders did not work well. I did not use the RA.Utility.exe because I did not understand how it worked (seems you need to arrange the .pngs in a picture using a graphics program and then tell the commandline tool the right properties. But I won't recommend trying XCC Mixer and SHPbuilder either.
I found http://ra.afraid.org/html/downloads/mods.html and extracted some .shps from some strange mod .mix files. The grey building animations looks a little adapted to RA. When I had a look at the original png files the Dune 2000 building animation is cracking out of the sand (even though you reinforced the ground with concrete plates...)
Edit: Removed the game files for copyright reasons.
Last edited by Cmd. Matt on Sun May 13, 2012 5:46 pm; edited 1 time in total |
|
| Back to top |
|
 |
Cmd. Matt
Level: 45

Position: Registered User
Joined: 01 May 2012
Posts: 517
Kel: 516 [ Donate ]
Online Status: Offline
|
Posted: Sat May 12, 2012 6:32 pm Post subject: R8Reader |
|
|
You can put the PNG pieces together to prepare for RA.Utilities.exe --SHP:
| Code: | | convert {4109..4150}.png +append mcvdeploy.png |
This requires ImageMagick (and a bash script that I will start working on right now).
I am currently working on a DATA.R8 parser because I don't think that uploading pre-converted Dune 2000 game files is legal. https://github.com/Mailaender/OpenRA/commits/ I already fixed the error about stopping at Frame 1010. First it cropped the files ignoring the offset, now it aligns everything to the left using the full frame mimicking the PNGs in d2kout.zip However they are not correctly aligned. In DATA.R8 there is a offset field to position the image inside a virtual frame. I would be happy if someone tells me how to fix it. Notice the Debug messages and the unused variables StartX/Y, EndX/Y that I calculated from OffsetX/Y. |
|
| Back to top |
|
 |
Cmd. Matt
Level: 45

Position: Registered User
Joined: 01 May 2012
Posts: 517
Kel: 516 [ Donate ]
Online Status: Offline
|
Posted: Sat May 12, 2012 6:50 pm |
|
|
However RA.Utility.exe fails:
| Quote: | Received args: --shp mcvdeploy.png 96
System.IO.EndOfStreamException: Failed to read past end of stream.
at System.IO.BinaryReader.ReadByte () [0x00000] in <filename unknown>:0
at OpenRA.FileFormats.Graphics.PngLoader.Load (System.IO.Stream s) [0x00000] in <filename unknown>:0
at OpenRA.FileFormats.Graphics.PngLoader.Load (System.String filename) [0x00000] in <filename unknown>:0
at OpenRA.Utility.Command.ConvertPngToShp (System.String[] args) [0x00000] in <filename unknown>:0
at OpenRA.Utility.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
|
Edit: This happens when not using compatible PNG files (8bit Indexed palette). Not a bug, just a very technical and hard to understand error message.
Last edited by Cmd. Matt on Sun May 13, 2012 6:00 pm; edited 1 time in total |
|
| Back to top |
|
 |
Cmd. Matt
Level: 45

Position: Registered User
Joined: 01 May 2012
Posts: 517
Kel: 516 [ Donate ]
Online Status: Offline
|
Posted: Sun May 13, 2012 5:58 pm Post subject: DATA.R8 -> PNG -> SHP working! |
|
|
I removed all the pre-converted SHPs of the original Dune 2000. For legal reasons I don't think we should supply ripped game files even though the game looks like abandonware. However my adapted RA.Utility.exe can now create SHPs from the Dune 2000 R8 game files. https://github.com/Mailaender/OpenRA/commit/db9a8c4aaa6c8df5af91dd7fc34b467e8eb8ff95
It works like this (on Linux):
| Quote: | mono OpenRA.Utility.exe --r8 "/home/user/.openra/Content/d2k/DATA.R8" "mods/palettetest/d2k.pal" 1699 1730 "harvester" --transparent
mono OpenRA.Utility.exe --shp harvester.png 32 |
I will create a shell script / batch file (Windows) that automatizes this. However the offset is still ignored as it sometimes has negative values or the picture is set outside of the frame and I don't know how handle this at the moment (help appreciated). |
|
| Back to top |
|
 |
Sleipnir
Level: 150

Position: Administrator
Joined: 10 Apr 2002
Posts: 3768
Kel: 3251 [ Donate ]
Online Status: Offline
|
Posted: Mon May 14, 2012 4:08 am Post subject: Re: DATA.R8 -> PNG -> SHP working! |
|
|
| Cmd. Matt wrote (View Post): | | However the offset is still ignored as it sometimes has negative values or the picture is set outside of the frame and I don't know how handle this at the moment (help appreciated). |
I hit the same issue with my original parser, which, combined with the legal issues you have already mentioned are why I abandoned my d2k efforts.
I had three thoughts on the problem, which I never followed up on:
- What happens if you increase the frame size to encompass these (seemingly) bogus offsets?
- Are the file format specs wrong? Perhaps the offsets mean something subtlety different from what we think?
- These offsets may be unused by the game, and there may be an offset table embedded elsewhere in the game data / exe
|
|
| Back to top |
|
 |
Cmd. Matt
Level: 45

Position: Registered User
Joined: 01 May 2012
Posts: 517
Kel: 516 [ Donate ]
Online Status: Offline
|
Posted: Mon May 14, 2012 7:05 pm |
|
|
| Apart from the offset: the direction for moving vehicles is also wrong when I add the D2k trike or mcv to RA mod. Driving left and right backwards and hovering sidewards to the 45° angles. Mirroring the PNG won't help eather. |
|
| Back to top |
|
 |
Sleipnir
Level: 150

Position: Administrator
Joined: 10 Apr 2002
Posts: 3768
Kel: 3251 [ Donate ]
Online Status: Offline
|
Posted: Mon May 14, 2012 11:00 pm |
|
|
| For some reason, they thought it appropriate to change the mapping between direction and frame. You will need to reverse and cycle the frame order, or (probably simpler in the long run) change the mapping used in the engine. |
|
| Back to top |
|
 |
psydev
Level: 32

Position: Registered User
Joined: 31 Mar 2012
Posts: 59
Kel: 70 [ Donate ]
Online Status: Offline
|
Posted: Thu May 17, 2012 2:56 am |
|
|
| Are the offsets for each frame available somewhere in human-readable format? |
|
| Back to top |
|
 |
katzsmile
Level: 48

Position: Registered User
Joined: 06 Sep 2010
Posts: 22
Kel: 46 [ Donate ]
Online Status: Offline
|
Posted: Thu May 17, 2012 5:13 am |
|
|
Offsets for infantry frames is
OffsetX = frameWidth/2 - Width/2
OffsetY = frameHeight/2 - Height/2
Offset for vehicles and projectile frames is
OffsetX = frameWidth/2 - frameOffsetX
OffsetY = frameHeight/2 - frameOffsetY
Offset for buildings frames is
if (frameOffsetX < 0) { frameOffsetX = 0 - frameOffsetX; }
if (frameOffsetY < 0) { frameOffsetY = 0 - frameOffsetY; }
OffsetX = 0 + frameOffsetX
OffsetY = frameHeight - frameOffsetY |
|
| Back to top |
|
 |
Cmd. Matt
Level: 45

Position: Registered User
Joined: 01 May 2012
Posts: 517
Kel: 516 [ Donate ]
Online Status: Offline
|
|
| Back to top |
|
 |
Cmd. Matt
Level: 45

Position: Registered User
Joined: 01 May 2012
Posts: 517
Kel: 516 [ Donate ]
Online Status: Offline
|
Posted: Thu May 17, 2012 12:48 pm |
|
|
| Sleipnir wrote (View Post): | | For some reason, they thought it appropriate to change the mapping between direction and frame. You will need to reverse and cycle the frame order, or (probably simpler in the long run) change the mapping used in the engine. |
I didn't know where and how to change the mapping used in the engine and therefore reversed and cycled the frame order for vehicles. Code is a little redundant and ugly, but it works (tested with palettetest mod). *yay* I think I can start creating the OpenD2k mod now or at least add the Dune 2000 units and buildings to the Red Alert mod. Arrakis.yaml is currently crashing the editor and I don't know how the map tiles where extracted, appended and scripted in the first place. |
|
| Back to top |
|
 |
Sleipnir
Level: 150

Position: Administrator
Joined: 10 Apr 2002
Posts: 3768
Kel: 3251 [ Donate ]
Online Status: Offline
|
Posted: Thu May 17, 2012 4:48 pm |
|
|
The arrakis tileset was created with the OpenRA.TilesetBuilder tool.
Up until the last time I looked (about a year ago) it was never very well supported (most of the ui was unfinished and nonfunctional) and it relied on hardcoded parameters in the source. Looking at the current code, this doesn't appear to have changed. I believe that katzsmile was working on a successor at one point, but don't know what happened with it. |
|
| Back to top |
|
 |
|