|
 |
| Author |
Message |
|
tpapp
|
Posted: 20 Mar, 2007
|
|
Joined: 25 Feb, 2007 Posts: 217
|
I decided to split my topic from the model/animation topic because thats getting a bit crowded and this tool didnt really fit there. For information about how this works or previous version you can check out that topic.
Many of you im sure have taken a look at the textures in the unit folders and were pleased to see that SupCom includes normal maps to make its models that much more detailed. If youve worked with normal maps before though you probably realized that the normal maps in SupCom dont look like regular normal maps. Your first thought may have been that theyre simple bump or height maps but looking closer im sure youll agree that they arent. Well the fact is that the SupCom normal maps contain only two thirds of the information of a standard normal map and assumably the engine generates the last third based off of the other thirds. Thats great for saving space on your RAM and cutting down CPU/GPU usage while the game is rendering hundreds of units in full detail at once but it leaves us modders in a bit of a bind if we want to easily edit existing SupCom normal maps or make our own.
Thats why I decided to make this rather simple tool. The converter will take the two images contained within the SupCom normal maps, generate the third image from those two, and combine all three into the normal map that we're all familiar with. Once youre done editting the normal map or creating your own normal map the reconverter will take it apart and give you the images youll need to put your normal map in game.
You can get the latest version (v1.1) of the sc2normal converter/reconverter here:
http://www.prism.gatech.edu/~tpappas3/s ... r_v1-1.zip - Broken - Mike
http://www.mts.net/~Chirmaya/sc2normal_ ... r_v1-1.rar - Working - Mike
It includes a readme, two pdf tutorials for using sc2normal, and the sc2normal application.
To run sc2normal however youll need the Matlab Compiler Runtime environment. You can get the installer here ( http://www.prism.gatech.edu/~tpappas3/MCRInstaller.exe ). Just a word of warning that the installer weighs in at a hefty 150 MB. The good news though is that youll only need to install it once and then never worry about it again. Subsequent versions of sc2normal (including v1.0 above) will not have the installer included so you dont have to worry about later downloads taking forever.
Code: 1. UpdateLog
v1.1 - 3/22/2007 more slight adjustments to the GUI included an options button and window for sc2normal to give more control over conversion added code for the new options "Normalize" and "Smoothing" adjusted command prompt output to give more information and display it cleaner custom options settings saved to file to carry over between sessions
v1.0 - 3/19/2007 incorporated reconverter with appropriate GUI features including toggle buttons to switch mode front end and code improvements to the GUI to be more user friendly refined converter code to run more smoothly and logically
v0.6 - 3/13/2007 slight adjustments to the GUI including a new title graphic adjusted code to remove splotchiness in the normal map that resulted under extreme values of green or red optimized code for faster generation of the normal map
v0.5 - 3/11/2007 Initial Release
I will continue to improve sc2normal to get the conversion process as perfect as I can but as it is now its really good and more than adequate for general use.
Feedback is very much appreciated.
Here you can see the normal map for the UEF T3 artillery generated by sc2normal, the artillery mesh in 3ds max, and the artillery mesh rendered with the normal map.

Last edited by tpapp on 02 Apr, 2007, edited 9 times in total.
|
|
| Top |
|
 |
|
Nergal
|
Posted: 21 Mar, 2007
|
|
Joined: 16 Feb, 2007 Posts: 75
|
Great work. I've tested converting from supcom to 3dsmax. I'll try getting the normal back to supcom later today. but supcom 2 normalmap works perfectly!
For the ppl who don't know how to make normal maps, here is a decent tutorial:
http://www.bencloward.com/tutorials_normal_maps1.shtml
_________________
|
|
| Top |
|
 |
|
tpapp
|
Posted: 21 Mar, 2007
|
|
Joined: 25 Feb, 2007 Posts: 217
|
|
Thats a really good tutorial. I actually used it myself back when i first started learning how to work with normal maps.
Thanks for the feedback. Im glad to hear that everything works well.
There are no instructions included for going back to supcom but it should be fairly intuitive. I tried to make it as close as possible the reverse of generating a normal map from supcom. So if youre stuck just start reading the tutorial backward and you should be ok.
|
|
| Top |
|
 |
|
Nergal
|
Posted: 22 Mar, 2007
|
|
Joined: 16 Feb, 2007 Posts: 75
|
|
| Top |
|
 |
|
tpapp
|
Posted: 22 Mar, 2007
|
|
Joined: 25 Feb, 2007 Posts: 217
|
This is the latest on how the specteam works. Taken from another thread:
Quote: I can maybe shed some light on the spec team for you, you are correct that Alpha is the team color, the lighter the color, the more visible the team color. If its black, you get no team color; if it is gray you get a darker version, etc.
The same goes for the RGB channels too, Red seemed to be a brightness level, green had a kind of reflective look, and blue was a bloom lighting effect, the lighter the color on the channel the brighter the effect.
It makes sense when you think about it.
In other news, v1.1 is fully coded and compiled. At the moment Im creating the pdf tutorials. I should have it uploaded by later today. It will include a small options menu to give you more control over the conversion process from supcom to normal.
|
|
| Top |
|
 |
|
tpapp
|
Posted: 22 Mar, 2007
|
|
Joined: 25 Feb, 2007 Posts: 217
|
|
v1.1 of the converter and the updated tutorials are completed and uploaded. Check out the first post for the link and the update log.
|
|
| Top |
|
 |
|
tpapp
|
Posted: 01 Apr, 2007
|
|
Joined: 25 Feb, 2007 Posts: 217
|
|
Working on and off on v1.2. I was comparing the quality of generated textures with different options set. I realized how powerful the smoothing option was so im making it more powerful with a few more parameters that youll be able to set. The majority of the code is done but it still needs some tweaking. Hopefully Ill release by the end of the week.
v1.2 will probably be the last version of sc2normal.
_________________ tpapp's sc2normal texture converter (v1.1):
|
|
| Top |
|
 |
|
Sean Mirrsen
|
Posted: 03 Apr, 2007
|
|
Joined: 16 Feb, 2007 Posts: 325 Location: Togliatti, Russia
|
I don't mean to devalue your work, tpapp, but I've created an action set for Adobe Photoshop that allows to convert a SupCom NormalsTS file to a 'normal' normals image, and then back. Tested with several normalmaps found on the internet, and SupCom textures. I couldn't test the maps themselves yet (no import plugin for Lightwave, and no 3dsMax in vicinity), but they look identical when transformed to and fro several times. Works _very_ fast, with only a minor drawback - unmapped areas that would look grey on the 'normal' map (128;128;128) look neutral blue when I reconstruct the map (128;128;255).
I can upload the action set to somewhere, so you can test how it works, or just post the action sequence here.
Actually, I think I'll do that, I don't know where to upload the file, and my actionset might be incompatible with anything but Photoshop CS2.
Copy the RGB channel over the Green channel.
Copy Alpha 1 channel over the Red channel.
Delete the Alpha 1 channel.
Calculate (Image->Calculation): Red channel, Green channel, Linear Dodge mode, result: new channel.
Calculate: Red channel inverse, Green channel inverse, Linear Dodge mode, result: new channel.
Calculate: Alpha 1(first calc result), Alpha 2(second), Normal mode, 50% opacity, result: new channel.
Copy Alpha 3 channel over Blue channel.
Delete the 3 alpha channels. You got your RGB normalmap.
To convert normals to SupCom format, just copy the red channel to a new Alpha channel, and then copy the green channel over the entire RGB channel.
It's just two actionsets, and it saved me a 150-meg download.
It does require Photoshop though, so that converter prog should still see use...
_________________ Controller Sean 'Jaguar' Mirrsen
Creator and developer of the (currently lost) Drones race for TA and Spring
Lightwave SCM&SCA Export Kit
|
|
| Top |
|
 |
|
Thygrrr
|
Posted: 19 Jun, 2007
|
|
Joined: 15 Feb, 2007 Posts: 2737 Location: Germany
|
|
Not everybody can afford Adobe Photoshop.
_________________ Forged Alliance Forever The Community Driven Supreme Commander Lobby - public beta!
|
|
| Top |
|
 |
|
Pawz
|
Posted: 02 Aug, 2007
|
|
Joined: 15 Feb, 2007 Posts: 599 Location: Rockingham, Australia
|
I've been trying to get my photoshop actions to produce the same thing as Sean, but I can't seem to get it to convert from Normal to Supcom. My image just turns red when I follow his instructions to convert back
I could really use some help!
_________________ We are Supremilated
www.supremilated.com
|
|
| Top |
|
 |
|
Sean Mirrsen
|
Posted: 03 Aug, 2007
|
|
Joined: 16 Feb, 2007 Posts: 325 Location: Togliatti, Russia
|
|
The SupCom normalmap is just two color layers from one true normalmap that would be used in any 'normal' 3d application.
Since the map is RGB, it has three main channels - Red, Green, and Blue. A texture map also has an alpha layer. What you do to convert a 'normal' map to a SupCom one, is select the Red layer from the layers tab, Select All, then copy. Create a new alpha channel if there isn't one, and paste the black'n'white image of the red channel into it. Then select the green channel and again copy it whole, and then paste into the RGB channel that comprises the three main ones. What you should get is a black and white image of the original green channel in the RGB, and the original red in the alpha channel.
Now that I explained all this, mayhap your problem is of another sort? Because Photoshop uses red to display the Alpha channel when it's selected along with the RGB channels...
_________________ Controller Sean 'Jaguar' Mirrsen
Creator and developer of the (currently lost) Drones race for TA and Spring
Lightwave SCM&SCA Export Kit
|
|
| Top |
|
 |
|
Pawz
|
Posted: 03 Aug, 2007
|
|
Joined: 15 Feb, 2007 Posts: 599 Location: Rockingham, Australia
|
Would you mind emailing me your action sets? pawz.777 at gmail.com
This is what I'm getting:
The Image I want to convert from Supcom:
The Image after I convert it to normal:
The Image after I convert it back to Supcom:

_________________ We are Supremilated
www.supremilated.com
|
|
| Top |
|
 |
|
Sean Mirrsen
|
Posted: 05 Aug, 2007
|
|
Joined: 16 Feb, 2007 Posts: 325 Location: Togliatti, Russia
|
|
There can be no color on a SupCom NormalsTS map! You're trying to convert a SpecTeam map! That's an entirely different beast, and is dealt with in an entirely different way. There's one channel for specular map (shining), one for teamcolored areas, and one for alpha transparency, if I'm not mistaken.
At the very most, color can be on a Normal map that is the Object space map, not Tangent space as indicated by "TS" in "NormalsTS".
_________________ Controller Sean 'Jaguar' Mirrsen
Creator and developer of the (currently lost) Drones race for TA and Spring
Lightwave SCM&SCA Export Kit
|
|
| Top |
|
 |
|
Pawz
|
Posted: 05 Aug, 2007
|
|
Joined: 15 Feb, 2007 Posts: 599 Location: Rockingham, Australia
|
|
Nup, the image I'm converting is the Tarmac ones.
Tar12x_cybran_01_normals.dds from env\Common\decals\tarmacs
It LOOKS like it converts to a regular normal map ok, but I'm definitely losing info somewhere along the way. My guess is they must have added something extra to that map.. mebbe a combination spec / normal map?
_________________ We are Supremilated
www.supremilated.com
|
|
| Top |
|
 |
|
Sean Mirrsen
|
Posted: 06 Aug, 2007
|
|
Joined: 16 Feb, 2007 Posts: 325 Location: Togliatti, Russia
|
|
Ah. Those maps. You're not getting the 100% correct normal map that way, because of the additional information in the red channel. The actual normal map info is in the Green (where it should remain) and Alpha channels.
If I understand correctly, the Red channel in those maps is transparency. So what you should do for them is this sequence: Copy Red channel to Blue, then Alpha to Red, then Blue to Alpha, then clear the Blue channel and calculate it the same way as I described before. You should get the true Normal map with an Alpha layer. To convert back to this tarmac format you will need to copy Alpha layer to Blue, then Red to Alpha, then Blue to Red, and then clear the Blue. It's not all that complicated really..
_________________ Controller Sean 'Jaguar' Mirrsen
Creator and developer of the (currently lost) Drones race for TA and Spring
Lightwave SCM&SCA Export Kit
|
|
| Top |
|
 |
|
Jade Mantis
|
Posted: 27 Jan, 2008
|
|
Joined: 11 Jul, 2007 Posts: 282
|
|
How would you do this with the gimp?
|
|
| Top |
|
 |
|
codeyla
|
Posted: 16 Aug, 2008
|
|
Joined: 25 Mar, 2007 Posts: 516 Location: UK
|
|
When I click on the download link I get the message '404 Not Found', which makes me think that the download link is out of date or broken. Is it possible to download from anywhere else?
|
|
| Top |
|
 |
|
ChirmayaWrongEmail
|
Posted: 16 Aug, 2008
|
|
Joined: 23 Oct, 2007 Posts: 844 Location: Winnipeg, Manitoba, Canada
|
|
| Top |
|
 |
|
OrangeKnight
|
Posted: 16 Aug, 2008
|
|
| Forum Scout |
 |
 |
Joined: 02 Mar, 2007 Posts: 8995 Location: Ninja Editing Your Post from a Canadian IPhone
|
|
First Post Updated, thanks Chirmaya!
Mike
_________________ God of Models - Moderator BlackOps Team Twitter
|
|
| Top |
|
 |
|
codeyla
|
Posted: 16 Aug, 2008
|
|
Joined: 25 Mar, 2007 Posts: 516 Location: UK
|
|
Thank you. Does anyone also know another link for the runtime environment? I can't find a download link on the Matlab website, or anywhere else, for that matter.
|
|
| Top |
|
 |
|
Kirvesnaama
|
Posted: 25 Aug, 2008
|
|
Joined: 17 Mar, 2007 Posts: 560 Location: Finland
|
|
Yeah, it would be extremely nice to get that runtime installer also, as without it anyone who hasn't had this installed before can't use it. I would really like to be able to mess with the normals too and this is what I've been needing, but alas it's no use without the runtime.
_________________
Kirvesnaama's T3 Mobile AA
|
|
| Top |
|
 |
|
Manimal
|
Posted: 19 Sep, 2008
|
|
Joined: 11 Apr, 2007 Posts: 1915
|
|
A while ago, I've PM'ed tpapp about his dead link but he never replied...
Thanks Chirmaya !
I have a couple of newbie questions:
-> how did he make the bumps in the very 1st picture ?
-> and what modeling tool has been used for doing so ?
_________________ Console Plus - Solo A.C.U. - Experimental Wars
|
|
| Top |
|
 |
|
CardBoardBoxProcessor
|
Posted: 06 Mar, 2009
|
|
Joined: 08 Feb, 2009 Posts: 176
|
|
where does one get Matlab Compiler Runtime environment. his link is broken and google comes up with none free stuff...
|
|
| Top |
|
 |
|
OrangeKnight
|
Posted: 06 Mar, 2009
|
|
| Forum Scout |
 |
 |
Joined: 02 Mar, 2007 Posts: 8995 Location: Ninja Editing Your Post from a Canadian IPhone
|
|
| Top |
|
 |
|
CardBoardBoxProcessor
|
Posted: 06 Mar, 2009
|
|
Joined: 08 Feb, 2009 Posts: 176
|
|
Shame. Sorry for.... whats it called? raising the dead?
Though I now see this is not even needed to convert. =/ ATIs normal map generator makes better maps than are used in Supcom now =/ odd.
Also, where do I get something that makes it encorperate the 3d model for normal map generation. This should be my last Deading post. If someone wishes to answer Via Pm I am sure OK would prefer that >.>
|
|
| Top |
|
 |
 |
 |
|