Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Product Chat / {Wolfs Guide To FPSC} -Episode 1- Lightmapping

Author
Message
Wolf
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 26th Jun 2011 13:46 Edited at: 7th Aug 2011 22:01
Welcome to the first episode of my future Guide to FPSC.

Those of you who know me for some time and where active in the german board might remember my tutorial collection from 2008/09. I just dug it up and discovered that it had around 50 pages. Thats quiet a lot but it is all in german...and I was a bit cocky as I wrote it so I figured all the dirty jokes are slightly annoying for the reader

This is the renaissance of this series and it will be written in english. Here is the disclaimer:

Disclaimer:

Quote: " 1. These tutorials are being released on an irregular basis.
2. English is not my native language
3. Length and Quality of my tutorials may vary
"


Difficulty Level:

ROOKIE

(List of difficultys

Beginner : Lets get started
Rookie : Warming up
Intermediate: Medium difficulty
Hard: Needs some knowledge
Pro: Needs a lot of knowledge and experience
Experimental: Haven't figured the whole thing out myself yet

Introduction What is Lightmapping?

Lightmapping is the process of rendering static lights in your level (feel free to correct me if I'm wrong). Here on the forums, we use it as a term to describe the way of you placing your lights in your level.
For concerts,movies and theatershows, it is a wellpayed job to do the lightning as it is extremly important. I've recently watched a film where a woman got pregnant, everyone was so happy and all the scenes where lit in fuzzy warm colors. Then it turned out that the baby won't survive and suddenly everything was lit in cold, blueish colors. Who doesn't know the effect of ubercolorful clublights and cocktails on...no scratch that: The feel of humming cold fluorescent lights in a hospital at night. The gritty blue green feel of it? Or the surreal feel of a room lit by sunlight shining through grunged up yellow industrial windows? You know exactly what I am talking about? Then WHY are you placing a plain boring white light in your hospital floor?? ARGH!

Part 1 Placing the lightsources Indoorarchitect

It is important to place the lights on a somewhat believable place. If you have really no idea where to put it, just look around in the places where you usually are. Your workplace/school/home/trainstation/supermarket etc. ...or images on the net....or movies. A lot of inspiration everywhere.

Remember to look at the texture of your segment first.



A few hints to get you going:

*Fluorescent Lights and large lights are usually on the ceiling and rarely on the wall

*In Scifi Levels, feel free to hide small colorfull lightsources
wherever it fits

*Offices and most modern buildings are well lit.

*A normal, clean building has no weatherd down yellow lights

*For the realist: Never place a light on or near a waterpipe.

*For the realist: In underground structures, you can have cables that link to your light.

Part 2 Lightmapping lets do it

A weak lightsource in a small and dark room lights up a lot of space. The same lightsource is a lot weaker if there is another, more dominant lightsource close...keep that in mind.

A single candle in an underground bunker can light up an entire room

I write this down because I've seen a lot of dark hallways where everything that gets lit up by the big fluorescent light is the light itself. This simply looks bad.
If you are working on a horror game: Dark rooms where the player doesn't see where he is going are not scary, they are just annyoing.

Important:

Every player has different screensettings. A scene that is lit on one can be pitchblack on another. I learned this the hard way having a lot of people not seeing anything in my games like Euthanasia or Thanatophobia that are perfectly lit on my and one of my friends system. Well...it happens.

This is why it would be best to make the levels a lot brighter than necessary. I'll do this in the future levels of relict and in shavra aswell.

***************

Lets place the light. Dont place it too close to the source!!



Nevermind the door, that is an entirely different story



It does not matter what color the lightbulb entitie in the editor has.

Now that we placed the lights lets see how the settings where made.



This is the setting box for the light.
You can copy the hexcodes if you really feel like you need to.
What are Hexcodes? I'll explain that later

It has a light range of 200.. please keep in mind that the darker your light is, the further your range can be without overlighting your scene



lets pick this You can select it by clicking on the right, next to the hexcode. Ignore those colors that are there...never use plain red, plain yellow or plain white lights.

Click on "other"



You'll get this box.



I circled the colors I use for my grungy games These are natural tones that fit my textures best. You can find your own style by experimenting a little Feel free to use really subtile lightcolors.

Oh, Like I wrote before, never use plain white light. Especially not when you use Bloom Effects. Go into a greyish or even another color.

Lightintensity:

Yeah, Some cute little toddlers complain about no lightintensity option.

It is that bar that is circled on this image



The darker the color, the less intense your light is. It works, trust me

Thats about it. You can now use the same lightmapping magic as I do. I hope I won't regret revealing my easy little tricks

Hexcodes:

...are the little codes that you can see in the setting box. I recall some people writing me about it in MSN. You don't need it. Really, its useless...unless you want to use the exact same color for the exact same light in your game over and over again. There are some small programs on the net that read hexcodes from images. In case you want to use only colors that exist in the eyes of your girlfriend in your favorite photo of her...that would not be...creepy at all....what?!

Addendum:

This is an idea I had 2008. I forgot about it and dug it up today. Sorry for the horrible image quality.

It shows the use of Overlays for fake light and shadow effects.
A bit like a poor version of rolfys baked shadow technique:





Just an idea...maybe someone wants to work with it

Okay, I hope you people enjoyed it so far and are not too disappointed because it was so easy =D No multiple lightsources, no mods, no directional lights, no blackmagic...just this.

To get the same results as I do, you need to adjust your setup ini.

Update 7th of August .11

Apparently a lightmaptexsize of 1024 produces less files and renders faster. I also noticed slightly better performance.
Thanks to BOND1

High End

Quote: "lightmapatten=32
lightmapmaxsize=-1
lightmapboost=4
lightmaptexsize=1024
lightmapquality=400"


Quote: "lightmapatten=32
lightmapmaxsize=-1
lightmapboost=4
lightmaptexsize=1024
lightmapquality=256"


Recommended

Quote: "lightmapatten=32
lightmapmaxsize=-1
lightmapboost=4
lightmaptexsize=1024
lightmapquality=32"


Quote: "lightmapatten=32
lightmapmaxsize=-1
lightmapboost=4
lightmaptexsize=1024
lightmapquality=16"


Less strong systems
Quote: "
lightmapatten=32
lightmapmaxsize=-1
lightmapboost=4
lightmaptexsize=1024
lightmapquality=16"


Quote: "
lightmapatten=32
lightmapmaxsize=-1
lightmapboost=4
lightmaptexsize=1024
lightmapquality=8"




-Wolf

I make serious coffee - so strong it wakes up the neighbors.
http://serygalacaffeine.deviantart.com/
Twitter:@Serygala
maho76
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 26th Jun 2011 14:01
thank you for this, wolf.

vote for sticky.
Fuzz
User Offline
Joined: 14th Nov 2006
Location: Tasmania, Australia
Posted: 26th Jun 2011 14:02
Good read, Wolf. Looking forward to your next tutorial.


2Beastmode4u
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 26th Jun 2011 16:30
Awesome job Wolf. Thanks for sharing, I needed this.


Cheers.

God help me, Please.

Come on down to my site at Unleashed FPSCreators
That Guy John
User Offline
Joined: 30th Apr 2010
Location: United States
Posted: 26th Jun 2011 16:31
Wolf, nice tips.

I'm working on some what of a big tool for FPSC, mind of I use your "setup ini" settings for preset profiles?

And Here Is A Penguin:
FPSC OneSource [DeskTop App] - Bringing everything together into one.
uzi idiot
User Offline
Joined: 27th Dec 2009
Location: Who Knows?
Posted: 26th Jun 2011 16:48
Great tutorial, the overlays for directional lighting is an excellent idea.
I think this should be stickied.


Mental Stability is over-rated!
Dark Frager
User Offline
Joined: 16th Mar 2010
Location: The Void.
Posted: 26th Jun 2011 17:56
Awesome! Now I can have lightmapping skills like you! Oh wait, a bit too early?
Good job and thanks for releasing this!



Wolf
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 26th Jun 2011 18:21
Thanks people

Sticky would be cool

@That Guy John: Of course! Go ahead



-Wolf

I make serious coffee - so strong it wakes up the neighbors.
http://serygalacaffeine.deviantart.com/
Twitter:@Serygala
That Guy John
User Offline
Joined: 30th Apr 2010
Location: United States
Posted: 26th Jun 2011 18:49
Great added your setting tips to my notes, commented with you as the contributor.

And Here Is A Penguin:
FPSC OneSource [DeskTop App] - Bringing everything together into one.
Wolf
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 26th Jun 2011 21:57
Cool! Thank you



-Wolf

I make serious coffee - so strong it wakes up the neighbors.
http://serygalacaffeine.deviantart.com/
Twitter:@Serygala
The Storyteller 01
User Offline
Joined: 11th May 2009
Location: On a silent hill in dead space
Posted: 26th Jun 2011 23:31 Edited at: 26th Jun 2011 23:32
Thanks a LOT @Wolf

For 2 weeks now I thought about writing you an email about.....the very contents of this tutorial ^^

And man, I never thought about the colour of the light as such an important factor!

In case you find my grammar and spelling weird ---> native German speaker ^^
CapnBuzz
User Offline
Joined: 8th Jan 2010
Location:
Posted: 27th Jun 2011 06:55
Wolf, Many thanks for this!
anayar
User Offline
Joined: 19th Aug 2009
Location: Minneapolis, MN
Posted: 27th Jun 2011 08:45
Much needed tutorial Wolf... and coming from you just makes it better. Many thanks for this mate!

Cheers,
Anayar


For KeithC
Vent
User Offline
Joined: 3rd Apr 2009
Location: Chilliwack, BC
Posted: 27th Jun 2011 10:25
Thanks Wolf! I'll give this a proper read through when I get a chance



KeithC
Senior Moderator
User Offline
Joined: 27th Oct 2005
Location: Michigan
Posted: 27th Jun 2011 15:00 Edited at: 27th Jun 2011 15:00
Very nice! I would like to add this to the Tutorial Compendium I just need you to specify the "level of difficulty somewhere in the initial post; then I'll add it to the title as well, and place the link in the Compendium. Thanks for taking the time.

-Keith

Wolf
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 27th Jun 2011 22:55
@the Storyteller 01: I found it out by accident messing with nightskyambiences Feel free to write me a mail about other things I could write a tutorial about

@KeithC: I edited the tutorial and added it It would be great if you add it to the compendium

@Anayar Your very welcome With all these constructive comments, I'm nearly forced to make more tutorials

@Vent: Take your time Maybe I have edited all the typos out then

@Capn Buzz: Your welcome



-Wolf

I make serious coffee - so strong it wakes up the neighbors.
http://serygalacaffeine.deviantart.com/
Twitter:@Serygala
s4real
User Offline
Joined: 22nd Jul 2006
Location:
Posted: 28th Jun 2011 02:52
Nice tut there wolf this will def help a lot of people out.

best s4real



Pack ya games with vishnu packer its free.
KeithC
Senior Moderator
User Offline
Joined: 27th Oct 2005
Location: Michigan
Posted: 28th Jun 2011 04:09
Added.

-Keith

Leongamerz
User Offline
Joined: 14th Aug 2010
Location:
Posted: 3rd Jul 2011 03:31
Hello Wolf thanks for this tutorial.Can I put it in my tutorial.I will credit you.

Poloflece,Anayar,PWP,Henry Ham,Cosmic Prophet,Wolf,KeithC,Nickydude And Lee Bamber is my icon.
Wolf
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 3rd Jul 2011 22:11
You can as long as you give credits and link to the original post for questions and comments.



-Wolf

I make serious coffee - so strong it wakes up the neighbors.
http://serygalacaffeine.deviantart.com/
Twitter:@Serygala
Leongamerz
User Offline
Joined: 14th Aug 2010
Location:
Posted: 4th Jul 2011 06:06
Thanks Wolf

Poloflece,Anayar,PWP,Henry Ham,Cosmic Prophet,Wolf,KeithC,Nickydude And Lee Bamber is my icon.
Wolf
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 2nd Aug 2011 23:35
Felt like bumping this up again before I write a new one

I make serious coffee - so strong it wakes up the neighbors.
http://serygalacaffeine.deviantart.com/
Twitter:@Serygala
Ched80
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 2nd Aug 2011 23:56
Great tut! well done.

Leaning Objects To The Side
User Offline
Joined: 3rd Jan 2007
Location:
Posted: 3rd Aug 2011 18:30
OMG! Wolf,thank you so much for making this tutorial!! you are one of da best!! keep up da Awesome work.

I hope you have a great day.

Cheers,
Tanya.
Wolf
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 5th Aug 2011 00:46
Thanks people!



-Wolf

I make serious coffee - so strong it wakes up the neighbors.
http://serygalacaffeine.deviantart.com/
Twitter:@Serygala
bond1
User Offline
Joined: 27th Oct 2005
Location:
Posted: 6th Aug 2011 17:01 Edited at: 6th Aug 2011 17:02
Great tutorial. One question though. In my tests, "lightmaptexsize" didn't change the quality of the lightmap. It just packed the lightmaps into larger textures.

For example, for the same "lightmapquality" settings, lightmapping creates four lightmap textures at a setting of 512, versus 1 lightmap texture at a setting of 1024. And I know for a fact that GPU's are more effecient reading one 1024x1024 texture versus four 512x512 textures. So it seems like regardless of the lightmapquality settings, it would make sense to keep lightmaptexsize at 1024 - making less work for the graphics card since it only has to access one texture instead of 4.

At a setting of 256 it becomes even more significant. Your graphics card will have to do sixteen texture fetches instead of one texture fetch at a setting of 1024. As counterintuitive as it sounds, using a larger lightmaptexsize is more efficient.

SPECS: Windows7 x64, Intel Core i7 920, Geforce GTX 580, 6GB RAM
Wolf
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 6th Aug 2011 18:36
Quote: "For example, for the same "lightmapquality" settings, lightmapping creates four lightmap textures at a setting of 512, versus 1 lightmap texture at a setting of 1024. And I know for a fact that GPU's are more effecient reading one 1024x1024 texture versus four 512x512 textures. So it seems like regardless of the lightmapquality settings, it would make sense to keep lightmaptexsize at 1024 - making less work for the graphics card since it only has to access one texture instead of 4.
"


I assumed that it would have the same imagecontent in a file with a lower resolution that would directly influence the quality. I didn't know that it would simply make more files. I look this up later today.

However, regardless of the graphics card (most gamer's have something halfway decent nowadays) FPSCreator still has to create these texturemaps. Here I have to see what is creating the larger filesize ( a bunch of small bitmaps ot a larger one) and of course the typical stability question. FPSCreator isn't exactly famous for that. I assumed that creating small files would be easier for it to render than large ones.

I will test this on a larger map and build it. (see how it runs and what it looks like)



-Wolf

I make serious coffee - so strong it wakes up the neighbors.
http://serygalacaffeine.deviantart.com/
Twitter:@Serygala
bond1
User Offline
Joined: 27th Oct 2005
Location:
Posted: 6th Aug 2011 19:40
Quote: " I didn't know that it would simply make more files. I look this up later today."


Yeah let me know if you get the same results. I tested this a while ago, so I'm not sure if anything has changed. But I remember after the lightmapping stage, it briefly shows you the number of textures created- and with smaller "lightmaptexsize" settings, it just created more textures. The actual resolution of the lightmap seems to be entirely dependent on the "lightmapquality" setting.

SPECS: Windows7 x64, Intel Core i7 920, Geforce GTX 580, 6GB RAM
uzi idiot
User Offline
Joined: 27th Dec 2009
Location: Who Knows?
Posted: 7th Aug 2011 13:14
I set my lightmaptexsize to 4096 and it builds faster. I didn't notice a lot of performance change.


Mental Stability is over-rated!
Wolf
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 7th Aug 2011 21:59 Edited at: 7th Aug 2011 22:01
@Bond1 You where right! Thats actually great!

Edited the mainthread



-Wolf

I make serious coffee - so strong it wakes up the neighbors.
http://serygalacaffeine.deviantart.com/
Twitter:@Serygala
Tinker
User Offline
Joined: 17th Jul 2011
Location: Alqaida
Posted: 8th Aug 2011 08:32 Edited at: 10th Aug 2011 09:36
This is great, I never thought the lighter colors are better than the plain or original ones. I will try this asap and see the result myself. Keep it up wolf, hope to see more from you in the near future.

edit:

Wolf, Can you visit my wip? See if there's already an improvement, I followed your tutorials, I guess the result was fine now, but of course it will be better if you would give me some feedback/comments/suggestions to make my games more cool just like yours.

+ Code Snippet

Effective, Efficient, Capable and Committed... That's me!
Wolf
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 12th Aug 2011 02:54
Quote: "Wolf, Can you visit my wip? See if there's already an improvement, I followed your tutorials, I guess the result was fine now, but of course it will be better if you would give me some feedback/comments/suggestions to make my games more cool just like yours.
"


Of course! I will give it a look tomorrow... right now I'm just too tired.

I make serious coffee - so strong it wakes up the neighbors.
http://serygalacaffeine.deviantart.com/
Twitter:@Serygala
Tinker
User Offline
Joined: 17th Jul 2011
Location: Alqaida
Posted: 15th Aug 2011 13:01
Wolf, thanks wolf, you really did visit my thread, your really cool. Hope you wont change being the helpful. Thank you so much! Btw! I replied to your questions.


If there is no way, then we create our own!
ASTECH
User Offline
Joined: 18th Jul 2007
Location:
Posted: 19th Aug 2011 00:08 Edited at: 19th Aug 2011 04:31
Let me just go out here on a limb and say that if you ever reach 1000 lightmapped objects... then your game will freeze in the
final build. I think I've finally nailed it down and figured out why my final build freezes. It tries to load all the light maps but
once you reach the big 1000... you have to lower your lightmapquality to the 20's.

You might not get the strongest effect... but at least the game will load. I have no choice in the matter though. My game
revolves around 1 big building. I can't just remove lights as I please.

Your signature has been eaten by a llama. Sorry; that's just the way it goes.
Wolf
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 19th Aug 2011 10:22
Just build the levels 1 by 1 and attach them back together later



-Wolf

I make serious coffee - so strong it wakes up the neighbors.
http://serygalacaffeine.deviantart.com/
Twitter:@Serygala
ASTECH
User Offline
Joined: 18th Jul 2007
Location:
Posted: 19th Aug 2011 22:45
Quote: "Just build the levels 1 by 1 and attach them back together later"


Won't work in that sense. Level 1 would build just fine but I'd still have to lower the quality on levels 2-3. I can't make
huge light changes as all the levels revolve around the 1 big building.

Well... you live and learn. My next project will be on a more conservative side with lightmaps.

Your signature has been eaten by a llama. Sorry; that's just the way it goes.
Wolf
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 19th Aug 2011 23:06
I still dont have that issue...what are your system specs?

I make serious coffee - so strong it wakes up the neighbors.
http://serygalacaffeine.deviantart.com/
Twitter:@Serygala
ASTECH
User Offline
Joined: 18th Jul 2007
Location:
Posted: 20th Aug 2011 07:52 Edited at: 20th Aug 2011 07:57
AMD Phenom II X4 2.7ghz
8GB of DDR3 1600Mhz Ram
Nvidia Geforce 9800GT 512MB
Windows 7 Pro 64-bit

But its not my pc that is the issue. Its FPSC and how it builds the final game. If you played my game then you would understand
why the final build game would freeze when loading with more detailed lightmaps.

You might be able to disable the memory cap in test build but there is no such thing in the end build of a game.
It will just stop loading the game if it hits 2GB of ram used or it will crash where it stopped loading a certain object in that level.

When you start adding hundreds of lights, FPSC buckles in the final build. You WONT notice it in a test level while using the
editor... but it is a completely different story in the final build of the game.

So another thing you should note is that you need to be conservative with your lights in your levels.
I have 8gb of ram but FPSC games won't ever try to use more then 2gb when loading a game. I guess this is just another
suggestion that should be mentioned to Lee. 5 years ago, there was no way a FPSC game would call for more then 2gb of memory.

Today with all of the new features and expand-ability... the limit needs to be moved and the final building process, optimized.
Of course, I've learned my lesson. I simply can't create the "outside ambiance" effect like I did in Dusk again.

Whoever said that Intel graphics fail, obviously never owned a Core i5.
cds1234
User Offline
Joined: 30th Apr 2011
Location:
Posted: 20th Aug 2011 10:05
I was under the impression that you can patch together the same result as a build-game process to override this issue.

Are you saying that even if you build your levels, one by one, and then paste in the order of level loads in the .init yourself, that when you launch the final build of the game, that it wants to load the entire game, all levels, all at once?

What I thought that I had read, was that if someone was trying to use 'build game' and it was crawling to a hault, that you can just load a level or two, build them, and then manually copy/paste the levels in their place (where they would go if the full build-game process were doing this automated for you), and then type in the final levels once all rendering is done, in smaller pieces.

But, if you are saying that you have successfully compiled the game, and it won't load as a game, then that is certainly an issue.

Also, someone mentioned a command to override the 1.8gig mem issue- not sure if related or helpful.
ASTECH
User Offline
Joined: 18th Jul 2007
Location:
Posted: 20th Aug 2011 17:05 Edited at: 20th Aug 2011 17:05
Quote: "But, if you are saying that you have successfully compiled the game, and it won't load as a game, then that is certainly an issue."


Exactly. I CAN build the game. PLAYING it is a different issue. From there is where the FPSCGame.exe crashes when it hits 1.85gb - 2gb memory used.

I understand most people here don't have more then 2gb, but this is the age of expansion. Today the standard is at least 4gb.
I'd like to think that we should have the option to go as high as 4gb. Although, that wont be seen anytime soon.

Whoever said that Intel graphics fail, obviously never owned a Core i5.
cds1234
User Offline
Joined: 30th Apr 2011
Location:
Posted: 21st Aug 2011 02:34
You may want to create a new post with this, as I think there is something you can edit in the game 'init' to free the memory limitation. What I don't know is if it will still hit the 2gig limit in 32 bit Windows, which if that is the case, is not resolvable inside FPSC.
Out of curiosity, it is a single level within the game that has too many resources, which is loaded when going to play, or does it really load all of them at the start? I always assumed that the .exe would only load a level's worth of data to start, and at the winzone call, would then load the next.
I hope the init thing helps!
Also, I'm building quite a huge game as well. Hopefully spreading resources out over many levels won't end up a mess.
ASTECH
User Offline
Joined: 18th Jul 2007
Location:
Posted: 21st Aug 2011 15:02
Quote: "it is a single level within the game that has too many resources, which is loaded when going to play"


FPSCGame.exe loads each individual level. It doesn't load all the levels at 1 time.

Whoever said that Intel graphics fail, obviously never owned a Core i5.
Northern
User Offline
Joined: 5th Nov 2010
Location: Brazil
Posted: 22nd Aug 2011 00:02
Hello Wolf,

I think any effort to improve the quality of the FPSC documentation and help people to achieve better results in their games are very welcomed.

Congratulations, great tutorial.

Cheers.

Northern

Login to post a reply

Server time is: 2016-04-30 20:44:15
Your offset time is: 2016-04-30 20:44:15