Jump to content


Photo

[WIP] Create MA2 files for C3 maps


Best Answer canstay, 19 July 2016 - 12:48 PM

finished all C3 maps MA2.

 

 

Go to the full post


  • Please log in to reply
75 replies to this topic

#21 canstay

canstay
  • Members
  • 91 posts

Posted 02 October 2012 - 04:31 PM

Slice map mask into object masks with any tool ?
it is a lot of works for create mask of whole map.

#22 herbert3000

herbert3000

    Guilty Until Proven Innocent

  • Division Admins
  • 502 posts
  • Location:Austria
  • Division:Commandos HQ
  • Job:Division Admin

Posted 03 October 2012 - 08:34 PM

@GMC.Phantom: I just dropped a modified DPS.SEC into the Google Drive folder. BUT: with this SEC you can only see the view cone on the beach area of the map. For the remaining parts I'd suggest to work with the original SEC.
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?

Attached File  TUT2.OBJMASK.zip   998.55KB   145 downloads

#23 canstay

canstay
  • Members
  • 91 posts

Posted 05 October 2012 - 05:17 AM

herber3000,I agree with you .
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 .

Attached Thumbnails

  • optimize script.JPG
  • Photoshop point address.JPG


#24 GMC.Phantom

GMC.Phantom
  • Division Leaders
  • 134 posts
  • Location:Italy
  • Division:Commandos HQ
  • Job:Division Leader

Posted 06 October 2012 - 03:32 PM

hello herbert3000, I have almost finished taking screenshots of all the maps, I have encountered the following problems:
  • 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.
what do you think can we do to solve these problems?

Attached Thumbnails

  • clp248.png


#25 herbert3000

herbert3000

    Guilty Until Proven Innocent

  • Division Admins
  • 502 posts
  • Location:Austria
  • Division:Commandos HQ
  • Job:Division Admin

Posted 06 October 2012 - 07:47 PM

canstay, here is an updated Cheat Engine Lua script: Attached File  comm2.lua.zip   944bytes   145 downloads
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.
lua.png
If we cut out the object in Photoshop, we can get the Y64 values directly from the PSD file.
y64v.png


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: Attached File  MA2_Tutorial.zip   3.4MB   156 downloads

#26 canstay

canstay
  • Members
  • 91 posts

Posted 07 October 2012 - 09:07 AM

herbert, Great Job.
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 GMC.Phantom

GMC.Phantom
  • Division Leaders
  • 134 posts
  • Location:Italy
  • Division:Commandos HQ
  • Job:Division Leader

Posted 11 October 2012 - 07:40 AM

I write to give you an update on the work of creating masks for the C3 Missions:
  • 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
NOTE: please do not mind some gaps in the unfinished masks, I just need to take some more screenshots to cover them.

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!

Attached Thumbnails

  • TC.MASK.0_0.png
  • TC.MASK.1_0.png
  • TC.MASK.2_0.png
  • TC.MASK.3_0.png
  • TE.MASK.0_0.png
  • TE.MASK.1_0.png
  • TE.MASK.2_0.png
  • TE.MASK.3_0.png
  • TV.MASK.1_0.png
  • TV.MASK.2_0.png
  • TV.MASK.0_0.png
  • TV.MASK.3_0.png


#28 canstay

canstay
  • Members
  • 91 posts

Posted 11 October 2012 - 02:35 PM

Here had finished the script of Photoshop get the messages for us to make the MA2.
If you have any questions, please reply.
thx.

Attached Thumbnails

  • PS????MA2????.JPG

Attached Files



#29 herbert3000

herbert3000

    Guilty Until Proven Innocent

  • Division Admins
  • 502 posts
  • Location:Austria
  • Division:Commandos HQ
  • Job:Division Admin

Posted 13 October 2012 - 04:14 PM

Hey guys, really great work!

@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:
views.png
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:
    tc.jpg
  • 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:
    pt.jpg
  • DSP - haven't yet found a solution


#30 canstay

canstay
  • Members
  • 91 posts

Posted 14 October 2012 - 02:08 AM

hi ,herbert,
you are right,I had taked into consideration that.
In PS if you hidden the layer,export to XLM had no the measure of the hidden layer.

Attached Thumbnails

  • hidden layer no export.gif


#31 GMC.Phantom

GMC.Phantom
  • Division Leaders
  • 134 posts
  • Location:Italy
  • Division:Commandos HQ
  • Job:Division Leader

Posted 20 October 2012 - 09:06 PM

I have uploaded the TE, PT and TV masks, in Paint.NET format here if somebody wants to try to work on them. I will upload the rest under form of .png in the usual area in Google Drive during the next week.

#32 herbert3000

herbert3000

    Guilty Until Proven Innocent

  • Division Admins
  • 502 posts
  • Location:Austria
  • Division:Commandos HQ
  • Job:Division Admin

Posted 29 October 2012 - 12:53 PM

Some progress: I started to create the final MA2 of the smallest map (TUT2): Attached File  TU03.MA2.xfiles.rar   318.58KB   176 downloads
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: Attached File  gimp_plugin_export_layers_C3_MA2.zip   1.72KB   145 downloads

I'll try to finish the TE, PT and TV masks when I have time.

#33 canstay

canstay
  • Members
  • 91 posts

Posted 30 October 2012 - 01:10 PM

well done about TU03.MA2

#34 Jovan

Jovan
  • Members
  • 7 posts

Posted 20 November 2012 - 02:51 AM

Oh my goodness! This community has been very busy lately :)

#35 herbert3000

herbert3000

    Guilty Until Proven Innocent

  • Division Admins
  • 502 posts
  • Location:Austria
  • Division:Commandos HQ
  • Job:Division Admin

Posted 22 November 2012 - 06:24 PM

Sarcasm? :)
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.jpg
Attached File  sec_to_ma2_tools.zip   7.3KB   138 downloads

#36 Milones

Milones
  • Members
  • 182 posts
  • Location:Belgium
  • Projects:Destination Paris

Posted 13 December 2012 - 10:04 PM

What is the status on the c3 maps? Haven't heard from you guys in a while, but it looked like everthing was working out fine.
Really can't wait for the update.

#37 herbert3000

herbert3000

    Guilty Until Proven Innocent

  • Division Admins
  • 502 posts
  • Location:Austria
  • Division:Commandos HQ
  • Job:Division Admin

Posted 23 December 2012 - 03:54 AM

Well, production is quite slow but maybe I can finisht the map "Stop Bomb Deployment" by the end of 2012.

#38 Milones

Milones
  • Members
  • 182 posts
  • Location:Belgium
  • Projects:Destination Paris

Posted 21 February 2013 - 01:10 PM

How is your work on the C3 maps? any progress?



#39 Jovan

Jovan
  • Members
  • 7 posts

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 canstay

canstay
  • Members
  • 91 posts

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