BF1942 Debugger Multifunctionality Tutorial

Lots of cool and useful tips to mod either serverside or clientside

Re: BF1942 Debugger Multifunctionality Tutorial

Postby exe » Sat Jan 05, 2013 1:32 am

I realised it was just a typo by me, I deleted my posting in shame. :oops:

But I have another question: I saw here that it should be possible to put for example a different staticobjects.con in the ShadowWork/bf1942/levels/MAPNAME/ folder and it would use that instead of the one in the map's rfa. Have you tried this? It doesn't seem to work for me.


€: Ah I see, I shouldn't use the ShadowWork folder but the game's root, now it works. :geek:

€2: and to answer this question:
reegad wrote:i see lmList.da in the shortcut code, how do you generate this?

You can generate it with this: http://battlefield2.filefront.com/file/ ... ools;35211
exe
 
Posts: 60
Joined: Wed Feb 08, 2012 10:04 pm

Re: BF1942 Debugger Multifunctionality Tutorial

Postby Senshi » Sat Jan 05, 2013 11:26 am

Oh don't worry about those things. Don't delete your post the next time, just add-edit it, stating that you found the solution. Also explain the solution in short, as you'd be surprised how often the same thing might happen to other people. I myself can't count the times that I have spent hours trying to figure a problem out, then finally open a new thread here, spending half an hour describing the issue in detail, only to find the solution two minutes later myself in a huge "Duh" moment. :oops:
User avatar
Senshi
 
Posts: 695
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany

Re: BF1942 Debugger Multifunctionality Tutorial

Postby exe » Sat Jan 05, 2013 2:03 pm

Hehe, okay will do. :)

I have yet another problem, it's the same as described by Apache Thunder:

Apache Thunder wrote:[...]
Also, I've never gotten the terrain merger to work properly. It would always result in smurfed terrain. I also could not merge the terrain without first converting the terrain textures to TGA and dropping them in with the lgt TGA files. Otherwise it would refuse to merge them. (it would just exit without saying a peep). When I mean "smurfed terrain", I mean the resulted files would be useless because they are either all red, purple, or some other horrid random color hue to them. I have always had to merge them manually. :( (as in use a separate program to do the merging of the textures one at a time. :( )


My merged terrain lightmaps are always red: http://imgur.com/a/TT6PZ :(

My terrainlightmap.con looks like this:

Code: Select all
rem
rem ******** Example of a terrain shadow creation script.
rem

GeometryTemplate.setActive patchGeometry
rem *** 4.0 is 4 pixels per meter.
GeometryTemplate.shadowPrecision 4.000000

raytracer.init
raytracer.ambientIntensity 0.3
raytracer.blockSize 16

rem *** 1 == Trace only the nearest terrain patch.
rem *** 0 == Trace all patches.
raytracer.OnlyNearest 0

rem *** < 0, trace all pixels
rem *** Else, number of meters from moving free camera to trace the shadows. Preview tool.
raytracer.shadowsNearCamera -10.0

raytracer.light.create
rem **** Should be sun direction ***
raytracer.light.direction -0.191/0.450/-0.873
raytracer.light.selfshadowing 1
raytracer.light.objectShadows 1
raytracer.light.shadowIntensity 0.8
raytracer.light.intensity 0.7
raytracer.light.fov 2
raytracer.light.viewDistance 500
raytracer.light.softness 0.0

raytracer.light.create
raytracer.light.direction 0/1/0
raytracer.light.selfshadowing 0
raytracer.light.objectShadows 1
raytracer.light.shadowIntensity 0.4
raytracer.light.intensity 0.0
raytracer.light.fov 45
raytracer.light.viewDistance 20
raytracer.light.softness 0.0


Is there another way to merge them, preferably free.
exe
 
Posts: 60
Joined: Wed Feb 08, 2012 10:04 pm

Re: BF1942 Debugger Multifunctionality Tutorial

Postby fo0k » Sat Jan 05, 2013 6:41 pm

merging will smurf with the 3dmax TGA output in my experience.. I re-save all TGA again with psp/ps etc..
maybe 32 bit / 24 bit TGA thing.. maybe..
great topic.. just saw.
User avatar
fo0k
 
Posts: 1423
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: BF1942 Debugger Multifunctionality Tutorial

Postby exe » Sun Jan 06, 2013 2:23 pm

Hmm, doesn't work for me, it refuses to merge them if they are 32 bit .tga's. Resaving them as 24 bit causes the same "red problem".

Senshi, what program do you use to convert .dds to .tga? Do you mind uploading a couple of .tga/lgt.tga that merge correctly?
exe
 
Posts: 60
Joined: Wed Feb 08, 2012 10:04 pm

Re: BF1942 Debugger Multifunctionality Tutorial

Postby Senshi » Sun Jan 06, 2013 11:55 pm

I use IrfanView to batch-convert dds to tga. Works perfectly fast and smooth, especially as IrfanView is my default image viewer anyway. Check my sig, there'll you find the tool I use to re-convert the tga to dds.

The shadow image you uploaded earlier looks correct, but yeah, seems like the merging fucks up for some reason.
User avatar
Senshi
 
Posts: 695
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany

Re: BF1942 Debugger Multifunctionality Tutorial

Postby exe » Mon Jan 07, 2013 8:22 pm

I also use IrfanView's (latest version 4.35) batch convert function, really strange. :?

Your .tga to .dds converter looks like a really helpful tool but as long as I can't merge the lightmaps correctly it's not of much use for me sadly.
exe
 
Posts: 60
Joined: Wed Feb 08, 2012 10:04 pm

Re: BF1942 Debugger Multifunctionality Tutorial

Postby Senshi » Mon Jan 07, 2013 9:07 pm

I think I recall having had similar issues once. Not sure, but it was something with the lightmaps not merging properly at least. Though it definitely wasn't such a blatant miscolouring, more like artifacts during the shadowing.

I worked around that by dropping the lightmap merger altogether and just using a photoshop action (macro) to blend the pics properly. But this was cumbersome as well.

Sorry, it's been a really long time since I last really worked on maps (more than three years now...).

Did you test different TGA compression/quality settings on conversion? It might be the merger doesn't accept every format and that this causes messups.

I'll look further into this. Worst case scenario I might write a simple Java app that takes care of all the lightmapping&merging...
User avatar
Senshi
 
Posts: 695
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany

Re: BF1942 Debugger Multifunctionality Tutorial

Postby exe » Sun Jan 13, 2013 3:55 pm

Sorry for my late reply but I had some trouble with object lightmapping again. I fixed them now hopefully.

Correct me if I'm wrong but I don't see many options for the .tga format at least in IrfanView, I played with some settings and also tried different colour depths but it made it worse and it usually refuses to merge them. I even tried it on a different PC, but that didn't help either.

A merging tool would definitely be appreciated. :)

btw. do you know for what these numbers are at the end: +game DesertCombat +workingFolder "ShadowWork\" +mergeTerrainShadows "bf1942\levels\MAPNAME\ 1.5 0.6"
exe
 
Posts: 60
Joined: Wed Feb 08, 2012 10:04 pm

Re: BF1942 Debugger Multifunctionality Tutorial

Postby GoodDayToDie!! » Thu Jan 17, 2013 9:40 pm

Hello,
I'm trying once again to do this.
I can't find the lightmaps in my map to copy over to the texture folder in my shadow work folder....any ideas? Must I creat them 1st somehow?
Image
GoodDayToDie!!
 
Posts: 217
Joined: Mon Dec 13, 2010 7:59 am
Location: Bat Country, California

PreviousNext

Return to General Modding Tutorials

Who is online

Users browsing this forum: No registered users and 9 guests

cron