VradFix - Lightmap Editor!

fubarFX

The "raw" in "nodraw"
aa
Jun 1, 2009
1,721
1,975
VradFix 0.1

this is a lightmap editor to fix your compiled maps. it's pretty early in development so it is missing some features but I figured it could still be useful for some of you guys. until I get everything ironed out, you guys can have this alpha build.

Download

what's new:
-hdr support
-scalable interface
-new, more straight forward way of picking faceIds (refer to the faq)

quick note: you probably should not try this if you don't know what an RGB value is. for now, the application kinda assumes you know what you are doing. don't input in values above 255 and don't edit the length of lightmaps.
I really need to write more documentation for this

FAQ
Q- how do I get a face id?
A- load your map with sv_cheats on and then use the command "mat_surfaceid 2" to see surfaceids. Use "mat_Wireframe 3" to help you figure out how faces are divided.

Q- but the application just gives me a bunch of numbers!
A- yes, those are RGB values that you can edit

Q- I understand RGB but what is RGBE?
A- E stands for exponent, it is a fourth value that affects how the 3 others are displayed. you probably won't need to edit those values but you can if needed.

Q- the lightmap I get is flipped/upside down/rotated. why is that?
A- the lightmap data is displayed pretty much in the order it appears in the bsp. I am not really sure how I could rearrange the order so it makes more sense with what is displayed in the game but I might try to figure it out later on. meanwhile, try to figure out by yourself the order in which the information is displayed.

keep in mind that this is very much a work in progress. keep the feedback coming. you're probably going to struggle with the application but that's okay. feel free to post some suggestions and I will see what I can do about it. also if you have some features you'd like to see just say so. I've been thinking about implementing a lightmap based color correction but I'm not sure how successful that would be.

edit: development has pretty much stopped but the tool is open source so there ya go https://github.com/maxdup/VRADFix
 
Last edited:
Sep 7, 2012
638
500
I downloaded it and tried it out, changing a lightmap's colour for demonstration purposes that it isn't just a scam:

testvradfix0000.jpg



Updating the editor to be a bit more graphical might be nice. Something like this:

makeitlikethisfubes.png
 
Last edited:

WhyNott

L1: Registered
Oct 21, 2012
27
1
So what, with it I can get rid of that ugly rainbow-like things on the walls in dark areas? Please, let this be true, these things are just sooo annoying...
 

henke37

aa
Sep 23, 2011
2,076
513
There is also the good old inkspill problem. And some occasional completely black faces. Vrad has serious issues.
 

Spacek531

L4: Comfortable Member
Jan 28, 2012
165
94
Is it possible to use this tool (and enough time) to lightmap an entire map from fullbright?
 

fubarFX

The "raw" in "nodraw"
aa
Jun 1, 2009
1,721
1,975
Is it possible to use this tool (and enough time) to lightmap an entire map from fullbright?

if you're really motivated, yes

@ABS, yeah I should add some examples of what this tool can do. that's all part of the long documenting process
 
Last edited:

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
Is it possible to use this tool (and enough time) to lightmap an entire map from fullbright?
Actually I think you can't, because fullbright doesn't "exist" per se. mat_fullbright is an engine setting that is auto-enabled when a BSP is loaded that has no lightmaps. Which is what happens when you skip VRAD, the lightmaps are never created, and the map is technically devoid of any light and completely dark.

and... I guess this is some of what I've heard about VRAD being screwed up. I haven't seriously mapped in so long I've never experienced this stuff.
 

JeanPaul

L6: Sharp Member
Aug 5, 2010
283
278
So what, with it I can get rid of that ugly rainbow-like things on the walls in dark areas? Please, let this be true, these things are just sooo annoying...

Surely you mean your monitor's gradient banding...? Vrad does not band.
 

Sergis

L666: ])oo]v[
aa
Jul 22, 2009
1,874
1,257

fubarFX

The "raw" in "nodraw"
aa
Jun 1, 2009
1,721
1,975
just updated to a new verison!

what's new:
-hdr support
-scalable interface
-new, more straight forward way of picking faceIds

You now get your faceId by loading your map with sv_cheats on and then using the command "mat_surfaceid 2" to see surface ids. Use "mat_wireframe 3" to help you figure out how faces are divided.
Note that these faceIds are different from those used in the previous version.

also I just realised that some lightmap bugs cannot be fixed only by editing the lightmap. I have some figuring out to do.
 

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,694
2,579
You know what I think would be awesome and totally doable? If you worked alongside Nemesis to get Crafty's map viewer tool integrated into this, so that the user can find faceIds by clicking on the 3D view and maybe even preview their changes in it.
 

fubarFX

The "raw" in "nodraw"
aa
Jun 1, 2009
1,721
1,975
so I think I'm going to open source this tool. it's a nice little piece of code since it was built entirely without libraries. I doubt the tool is getting much use now tho (vrad has started working again for me) but it's still pretty cool nonetheless. I've used it in the past to write secret messages in maps. it's tedious but it's a cool easter egg to do.

on top of finishing the UI, one could implement tons of cool features like a curve editor or a function to smooth lightmaps. who knows, rgb values are a lot of fun to play around with.

just need to clean up the code a little
 

fml42

L1: Registered
Sep 9, 2017
1
4
Hello. Looks like it's been a while since the last post here :p

Due to a recent discussion on a discord server I had the idea to create a lightmap editor for Source engine games. Someone then me here. Since yours is open source I deciced to modify it a bit.

Here's what I changed:
  • Lightmaps are now displayed as an image instead of text rgb values.
  • Some improvements to the GUI
  • Exposure adjustment: You can brighten or darken the preview of the lightmap
You can have a look at the new version here: https://github.com/fml42/sourcelightmap
(also open source btw if anyone wants to add something)

Just wanted to say, thanks for making the original program! :)
Hope you like the features I added.
 
Last edited: