[WIP] Create MA2 files for C3 maps
#21
Posted 02 October 2012 - 04:31 PM
it is a lot of works for create mask of whole map.
#22
Posted 03 October 2012 - 08:34 PM
You already completed the task "Create mask of whole map" for the Berlin and Stalingrad maps so nothing else has to be done to change the color to green
Yes, to create the MA2, we have to cut out each object. And yes, it's a lot of work. I attached the object masks of the TUT2 map (each view as a seperate PSD file), that's what I think is the best way to accomplish this task - for the moment.
If anyone knows a better way, please let us know
Anyway, this is how I would create the object masks and the MA2 description files:
1) Cut out the object masks: one layer per object, using unique names (if a layer is called "tree1" in the first view, then it's necessary to name the same object "tree1" as well in the other three views). You can check out the attachment for details. Btw, I chose the PSD format, because it can be opened (and saved) with Photoshop, Gimp and Paint.net (there's a plug-in available).
2) Run Commandos 2 with the Commandos 3 mission pack. Use Cheat Engine and the script I provided to get the correct in-game values to create the bounding volumes. Keep in mind that the masks from step 1 must be assigned to the corresponding bounding boxes in the final step. We could use Excel to calculate the relative values of the bounding boxes but it's not the most ideal solution, there's still room for improvement.
3) Create the MA2 Description.xml with the values from the previous steps. The object masks from step 1 must be saved as single images. The positions of the masks on the map as well as the values from the bounding boxes must be entered in the description file.
I know that I just told you WHAT has to be done but not really HOW to do it. And that's just because we don't have the right tools to complete the tasks in a comfortable way. Ok, step 1 can't be really optimized (imo), I'll write a tutorial for this part. But I have some ideas about how to optimize step 3 (e.g. extract masks and positions directly from the PSD files; use the Cheat Engine output to auto-calculate the relative values of the bounding boxes).
canstay, what do you think about it? Do you have any ideas/suggestions?
TUT2.OBJMASK.zip 998.55KB 210 downloads
#23
Posted 05 October 2012 - 05:17 AM
about step 3 ,maybe optimize the script of Cheat Engine can do it be quick.
by the way ,can you find out a point address from Photoshop?
maybe we should use photoshop cut out he abject maske and record the valuse of Y64.
at last,PSD format or TIF format had layer for you .
#24
Posted 06 October 2012 - 03:32 PM
- in TE I can take only screenshots of the lower part of the map as the upper part is all grey, using the original .sec for the upper part does not get the trick done since the view is sometimes blocked by objects
- in PT the background color is not even, you can still see the water mixing up the colors (see attached example)
- in DSP with your .sec I cannot manage to get the enemy to highlight the map when in views 1.0 and 3.0, I can only capture the lower part of the map (the beach) in views 0.0 and 2.0, while with the original .sec file the view gets obstructed by the buildings (and still cannot get to highlight map in views 1.0 and 3.0.
#25
Posted 06 October 2012 - 07:47 PM
Press CTRL+Q to save the coordinates of the cursor on the map (start with the center of an object, then the corner points), press CTRL+W to write the complete object info in xml syntax to the output window.
If we cut out the object in Photoshop, we can get the Y64 values directly from the PSD file.
phantom, I didn't include the PT.BAS file by accident - it should be available in the google drive now.
For the upper part of the TE map, I created a new SEC (just rename TE#71.SEC to TE.SEC).
And the DSP map is weird, I used many different heights for the SEC but I wasn't able to make the view cone visible, I'll have a closer look at this issue. The strange thing is that I also can't see any views on the beach if I use the original SEC.
Edit: Here's a first version of my MA2 Tutorial: MA2_Tutorial.zip 3.4MB 223 downloads
#26
Posted 07 October 2012 - 09:07 AM
this script is very useful for editing "
Volumenes Escenario".
I think there are something to
optimize "remember the position of the layer on the map" too.
#27
Posted 11 October 2012 - 07:40 AM
- TA1 is almost done (need to make a small fix in view 2.0)
- TE doesn't convince me much due to the fact that capturing at different altitudes, the masks do not give the same information and it is hard to make them coherent, herbert3000 please take a look at the screenshots and tell me what you think
- TV is done but the mask doesn't cover all the map borders, I don't think that this is a problem though due to the fact that Commandos cannot reach those areas anyway. In any case, please take a look and tell me what you think. By the way, the rails are dark, does this mean that the Commandos, upon walking (or crawling) over the rails will get hidden behind them? If so then this has to be fixed.
- TC cuts one angle, in all the views, I will try to use TC_1, maybe that gives a wider area to play with (or should I change the .MARGENES_UNLOCK from 0 to 1?)
- CP almost done (need to do a small fix in view 3.0)
- PT done (check to see if it's ok)
- DSP, we are awaiting for a better solution to capture the masks as in views 1.0 and 3.0 the enemy's view doesn't highlight anything
I think we are on a good way to reunite all 4 Commandos Games in one! that would be truly a great success for all the fans of this fantastic series!
#29
Posted 13 October 2012 - 04:14 PM
@Canstay, I have a question:
The layers get renamed automatically so the layers of all four view PSDs must be in the same order, right? But there's a problem: sometimes an object is completely hidden behind another object in one view, like this:
object B is behind object A in the 4th view
That means there's no layer for object B in the 4th PSD -> the script ExportLayerCoordinatesToXML doesn't write the correct <ObjectIndex>
It could be solved like this: create an empty layer for the hidden object and name it "empty". Then the scripts must check if a layer name is eqals "empty", -> if yes then don't rename layer / don't export layer / don't export coordinates BUT increase object index!
@GMC.Phantom:
- TE - to me it doesn't look bad, it shouldn't be too hard to manually fix the missing masks.
- TV - you are right, we don't have to care about masks for areas that can't be reached. And yes, the rails must be fixed.
- TC - strange...any idea why it behaves like this? Changing .MARGENES_UNLOCK seems to be a good solution for this problem.
I guess for two areas of the map you should use the original SEC to take the screenshots because their sectors have a different heigt:
- PT - I put a new SEC in the Google Drive which can be used to obtain the masks of the ships and some parts of the dockside:
- DSP - haven't yet found a solution
#32
Posted 29 October 2012 - 12:53 PM
It's not 100% perfect but I think it's good enough What do you think about it?
This is the Gimp plugin I used to export the layers and create the Description.xml entries: gimp_plugin_export_layers_C3_MA2.zip 1.72KB 204 downloads
I'll try to finish the TE, PT and TV masks when I have time.
#33
Posted 30 October 2012 - 01:10 PM
#34
Posted 20 November 2012 - 02:51 AM
#35
Posted 22 November 2012 - 06:24 PM
OK, here's a little update: I thought instead of recreating the bounding volumes from scratch, it would be handy to use the existing data from the SEC files. I attached the scripts (still beta). The current procedure is: convert C3.SEC to C1.SEC -> import C1.SEC in 3ds max -> adjust sectors -> export to MA2 format.
sec_to_ma2_tools.zip 7.3KB 191 downloads
#36
Posted 13 December 2012 - 10:04 PM
Really can't wait for the update.
#37
Posted 23 December 2012 - 03:54 AM
#38
Posted 21 February 2013 - 01:10 PM
How is your work on the C3 maps? any progress?
#39
Posted 27 June 2013 - 01:19 AM
Maybe this was answered already (sorry! I missed it), but any clues/knowledge as to how the game activates the masks?
From what I saw, each mask has one or more bounding prisms associated with it right? So does it perform a prism intersection test of some kind, or check 2D/3D coordinates or anything like that to see if a commando is behind the bounding? At which point it activates just that mask?
Awesome work!!
Edited by Jovan, 27 June 2013 - 01:20 AM.
#40
Posted 29 June 2013 - 05:58 AM
anyone work for it now ?
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users