Posted: Sun May 10, 2009 11:58 am Post subject:
RA2/YR full map picture renderer released
Hi all, over the last 2,5 years I've been working on and off on a program that renders RA2 maps. I completely restarted my project just over a year ago and added support for mods and YR.
A few days ago I finished most of the functionality I planned, hacked up a quick GUI and put an installer up.
For now I do not render any voxels, and LightIntensity on lamps is not processed correctly yet. Other than that, the tool managed to render all 178 maps in multimd.mix in just under 12 minutes on my system.
The sources compile under windows and linux on both x86 and x64 architectures.
For those interested, sources are on the sourceforge svn too.
Any comments are welcome
2013 update: project moved to http://github.com/zzattack/ccmaps-net Last edited by zzattack on Sat Aug 31, 2013 3:39 pm; edited 4 times in total QUICK_EDIT
Sweet, nice one mate . Welcome back to PPM too Not seen you arouund before but you joined before me so it's not surprising. _________________ Yes, work on MV continues. It is not forgotten. QUICK_EDIT
A Version that renders TS maps would be awesome, would save me so much time.
I initially planned on doing this. If there's still enough interest I think I'll either add support to the current tool, or release a seperate one for TS.
Lt Albrecht wrote:
Sweet, nice one mate . Welcome back to PPM too Not seen you arouund before but you joined before me so it's not surprising.
Thanks, but I've never actually been active in the CNC modding scene.
Hyper wrote:
Hm, got a problem, it has trouble with finding the mix files in the directory i point it to, do certain characters truncate the path?
I'm not sure actually, I've used some simple commandline parsing code I found on google. What's your command line, perhaps I can reproduce it? The -m option is added so that multiple instances can be used, i.e. one modded version of the game from one folder and another version in another folder. Also required for linux of course, as there's no registry to read the install path from.
Crimsonum wrote:
Full map size. I only shrank it so it'd fit as a minimap preview.
I see you used the ore/gems emphasizing options, this way it actually looks really close compared to the original preview
Lt Albrecht wrote:
Brilliant, it shows elevation and bridges and everything =D
I think I've got most of the game's internal behaviour reproduced. For example ore and tiling are recalculated. I'm not sure if it has a name, I named it auto-clatting or auto-connect-latting. Anyway, it's how the game recalculates the tiles used between different LAT tiles. Also there's support for auto-clat overrides. I wrote some about it here: http://ccmaps.wiki.sourceforge.net/Auto-lat. Also the way ore is spread is mimiced, although that's randomized. Lighting and lightsources are implemented and affect the result, but the LightIntensity tag is surely not used correctly yet.
Most work left to do is implementing code to render voxels. You can see this for example when rendering a map with an outpost, it'll be missing the patroit missile thing on top of it. QUICK_EDIT
Voxels you'll have to do HVA reading and all that good(bad)ness Otherwise you'll end up with retarded looking vehicles on larger scale images Stucuk (IDK if I spelled it right) and Banshee know about voxel rendering, so they might be good to ask _________________ Yes, work on MV continues. It is not forgotten. QUICK_EDIT
Thanks. About the filesize, there's nothing that can be done about that really. You can chose to output JPG and lose some information, but PNG might be desirable in other situations so I added an option to output either or both QUICK_EDIT
Filesize is nothing compared to the awesome'ness of this tool!
BTW, my directory's string;
I:\Command & Conquer\Command & Conquer Red Alert(tm) II\RA2
That works fine for me. I changed I:\ into C:\, but it shouldn't matter. Did you put the directory name in quotes? Can you show the complete command line? What error do you get? Do the files actually exist there? QUICK_EDIT
Well, i'm was testing with some maps here but i'm having some problems:
-I can't select my .yrm or .mpr maps!
--in some maps when it get in the part:drawning tile i can a error, it say it was finished but won't finish! QUICK_EDIT
Filesize is nothing compared to the awesome'ness of this tool!
BTW, my directory's string;
I:\Command & Conquer\Command & Conquer Red Alert(tm) II\RA2
That works fine for me. I changed I:\ into C:\, but it shouldn't matter. Did you put the directory name in quotes? Can you show the complete command line? What error do you get? Do the files actually exist there?
Ill find out later, ill try the command line app, i was using the GUI. QUICK_EDIT
Filesize is nothing compared to the awesome'ness of this tool!
BTW, my directory's string;
I:\Command & Conquer\Command & Conquer Red Alert(tm) II\RA2
That works fine for me. I changed I:\ into C:\, but it shouldn't matter. Did you put the directory name in quotes? Can you show the complete command line? What error do you get? Do the files actually exist there?
Ill find out later, ill try the command line app, i was using the GUI.
The GUI shows the commandline used, it's on the bottom. Can you paste that? QUICK_EDIT
I see you used the ore/gems emphasizing options, this way it actually looks really close compared to the original preview
If you indeed plan to apply TS support (which would be awesome!), you could add green lighting for green Tiberium, and blueish-purple for blue Tiberium, in a similar manner. _________________
Joined: 19 May 2008 Location: Scotland, starting a Revolution Cameo: metricon. Posts:???
Posted: Mon May 11, 2009 4:50 pm Post subject:
This is a great tool
only comments are
voxels as you said (mainly the turrets look bad),
1 or 2 buildings have bits missing (not that big a deal),
there are no colours other than grey (again not a big deal or needed but it would make single player maps look nicer and easyer to see whats whos)
and the bridges are offset (see pic)
other than that Great job and i look forward to seeing TS, FS and YR support.
Joined: 19 May 2008 Location: Scotland, starting a Revolution Cameo: metricon. Posts:???
Posted: Mon May 11, 2009 6:59 pm Post subject:
strange it didnt work for me
ill try again
i feel bad for pointing out more problems now but there are 1 or 2 buildings (eg the statue of liberty and the allied power plant) that are showen in the wrong pallet. _________________ Creator of TS:BoB and some other things that might be good when finnished. QUICK_EDIT
Liberty has a custom palette and hte PP always looks weird non-ingame IIRC _________________ Yes, work on MV continues. It is not forgotten. QUICK_EDIT
I see you used the ore/gems emphasizing options, this way it actually looks really close compared to the original preview
If you indeed plan to apply TS support (which would be awesome!), you could add green lighting for green Tiberium, and blueish-purple for blue Tiberium, in a similar manner.
I've bought TFD today. Seems like a good idea.
Revolutionary wrote:
This is a great tool
only comments are
voxels as you said (mainly the turrets look bad),
1 or 2 buildings have bits missing (not that big a deal),
there are no colours other than grey (again not a big deal or needed but it would make single player maps look nicer and easyer to see whats whos)
other than that Great job and i look forward to seeing TS, FS and YR support.
Thanks. Missing building parts are probably all voxels. I haven't been able to reproduce the thing where the conyard misses that part. Could you send me your map?
I'll search for remappable schemes to give buildings their actual owner's color. So far I think I've copied one from Banshee's SHP editor (for neutral objects). Should be easy to find the others.
Quote:
and the bridges are offset (see pic)
. That's quite weird, but then again bridges are placed a little weird. If you send me the map I'll look into it inmediately.
About power plants not having the correct palet: easy fix, I used a wrong check somewhere so the first SHP file in building/overlay/vehicletypes etc would get the same palet, but that's fixed.
About liberty statue: fixed too. Now I finally understand the purpose of that palet named "lib" QUICK_EDIT
Well, i can't post the problem in here because, they are from my mod or others mappers maps, sorry! >_<
But i maded a list of some problems:
-trasitions tiles (sand to normal grass) beetween terrains has some problems!!!
--problem with the power plant in images with wrong pallete!!!
---Turrets won't show!!!
----yuri wall show as the nod one!
-----looks like it won't show the tanks!
------in missions, the side has everytime the grey colour!
-------The gi has the pallete problem too! QUICK_EDIT
And, my RA2 and RA2MD.mixes are in there, and it still says:
The program wrote:
Error: mix files not found in "C:\Westwood\RA2-r".
And, it says that the map image was created but that if I can't see it that an error occurred, and that I should contact you via e-mail.
I see, the fix is pretty simple, there's a space missing inbetween the closing " for the mix dir and the -r switch. I'll post a fix in a few days. For now you can replace the GUI with this file:
http://files.zzattack.org/patches/CNC%20Map%20Renderer%20GUI.exe
Shadow Hunter wrote:
Well, i can't post the problem in here because, they are from my mod or others mappers maps, sorry! >_<
But i maded a list of some problems:
Quote:
-trasitions tiles (sand to normal grass) beetween terrains has some problems!!!
I don't think so, I've taken a lot of care to render these transition tiles exactly the way they appear in game. Please show me what's wrong.
Quote:
--problem with the power plant in images with wrong pallete!!!
Yep, true, I fixed that (see my above post)
Quote:
---Turrets won't show!!!
Yep, they're voxels, which I don't show.
Quote:
----yuri wall show as the nod one!
I'll look into it asap.
Quote:
-----looks like it won't show the tanks!
Those are also voxels.
Quote:
------in missions, the side has everytime the grey colour!
I've worked on that. I'm still looking for the exact formula to remap colors, but I'm not sure how they work yet. Expect that to be fixed next release (also see above post)
Quote:
-------The gi has the pallete problem too!
Also fixed. Last edited by zzattack on Tue May 12, 2009 9:52 am; edited 1 time in total QUICK_EDIT
Could your code be adapted into a real time map viewer/editor? The current map editor use by the community was bought by Westwood and has many shortcomings that are never likely to get fixed. QUICK_EDIT
Could your code be adapted into a real time map viewer/editor? The current map editor use by the community was bought by Westwood and has many shortcomings that are never likely to get fixed.
Well of course, anything can be adapted. Then again, creating a map editor out of this would be insanely much work and I'm not up for that
I've made the source code available to anyone so anything I did can be reused by someone else though. QUICK_EDIT
Yea, gotta agree with you there, though a lot of the code for writing the map compression and basic template still exists in the game, so eather way its possible, but a lot of work QUICK_EDIT
Joined: 22 Apr 2009 Location: >THE< United States of America
Posted: Tue May 12, 2009 6:03 pm Post subject:
Maybe it's because I'm using Vista. It now says it can't find the render program even though I copy and pasted the file location from the other GUI. This is what the other GUI says is the file name:
Quote:
cncmaprender.exe
But, it says in the other GUI that the program can't be found.
EDIT: Nevermind, I realized that the original GUI was a shortcut. I followed it back to the main folder and replaced it with the new one, and then put a new shortcut on the desktop. Now it works! Thanks.
EDIT2: Okay, now there's a new problem. The map rendered, but there are three start points shown on the map. Even though, in the game there is only 2. I'm attaching the image. The one in the top middle is a false start point. Anyway, how would you use this as the in game preview? I also need to know how big it has to be to fit.
Maybe it's because I'm using Vista. It now says it can't find the render program even though I copy and pasted the file location from the other GUI. This is what the other GUI says is the file name:
Quote:
cncmaprender.exe
But, it says in the other GUI that the program can't be found.
EDIT2: Okay, now there's a new problem. The map rendered, but there are three start points shown on the map. Even though, in the game there is only 2. I'm attaching the image. The one in the top middle is a false start point.
I noticed this additional start position too today, it's fixed. I'll probably put up a new release later tonight.
Quote:
Anyway, how would you use this as the in game preview? I also need to know how big it has to be to fit.
I once hacked up a quick app to inject thumbnails from the commandline. Thumbnails are obtained by resizing them using irfanview's commandline.
This is what I posted:
Quite simplified, my batch file to do this did the following:
go through all .map files in a folder,
call the rendering program on it,
create a nice thumbnail for it (the hovering previews for ra2maps.net)
Joined: 22 Apr 2009 Location: >THE< United States of America
Posted: Tue May 12, 2009 7:18 pm Post subject:
No, that program isn't working, no error codes, it just stops working and Windows closes it.
I have have two more questions. How does the map render program pick colors for different terrain, does it use a pal? And, if I add terrain through a mod, will I have to change the program in any way? QUICK_EDIT
I've uploaded version 0.94 to SVN, and a new installer is available on sourceforge.
See first post for details.
I think I've now got most of the functionality implemented. Other than voxel support and TS support I don't know of anything that I feel should be added. I fill proceed to add voxel support first, and later perhaps TS support. I've looked into the voxel file format and I estimate I will need about 30 hours of work to implement this. Expect a release in about a month. QUICK_EDIT
Well, i need again another mirror to download the file (some problems to download from that site) anyway, i have a suggestion for you render:
-make a option to don't show the buildings (for thoses single-player maps! )
EDIT: i have an images of the tiles problems i was talkind about, is from the map "cold war", i will upload the map too, to you see!
EDIT2: i finally success downloaded from that site, no need others mirrors, thanks!
Shadow Hunter: I fixed the tiling issue. It was caused by "median" tiles not being defined in snow theater, and thereby defaulting to 0 instead of -1 or something, which confused the program into thinking of not connecthing those transitions (because median tiles and clear are not connected). QUICK_EDIT
Joined: 22 Apr 2009 Location: >THE< United States of America
Posted: Thu May 14, 2009 6:53 pm Post subject:
Yea, I think it will work the same in FA.
I asked the same question yesterday, and got this answer: Custom minimap...
Anyway, crazy map! How long did it take you? And, is it SP or MP? I ask the second question because I see no start points, but that could just mean you didn't select to show start points. QUICK_EDIT
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum