Compile time for lightmaps V 1.00

Compiling time explained for changing the lightmaps scale V 1.00 Requires knowledge about lightmap (scales) and mathematics!

I don't know wheather you ever wondered how changing the lightmap scale would affect the compiling time of VRAD exactly; properly you just knew that "as lower the scale is as longer it takes" before. I'm going to explain now it more detailed so you can calculate the compiling time.


Formula:

Calculating the VRAD compile time:

tn = to * sf²

Calculating the sf factor in the formula:

sf = sfo / sfn

Both put togehter in one formula:

-> tn = to*(sfo/sfn)²


Explanation:

First about the variables used:

tn new compile time
to old compile time
sf factor of change in the light map scale
sfo old lightmap scale factor
sfn new lightmap scale factor

First of all, it is possible that the result of the formula is differnt from the real compile time because there are other processes in the background using CPU or the old compile times are inaccurate (they are rounded, so 0.5 seconds would be 1 second.). And the formula only works if you change the lightmapscale of everything in the map, but - of course - the same formula works for parts of the map too (I'll explain that later in the tutorial).

Anyway now about the formula. You need to compile the map first on your old settings and keep the lightmap scale factor in mind otherwise you are not able to calculate the new compile time. First you divide the old light map scale (sfo) through the new light map scale (sfn), than you simly muliply the value you get (sf) with it self (sf² means [sf * sf]). Once you done that just multiply your old compile time with sf² and you will get the new compile time. You can find examples at the bottom of the tutorial. Anyway watch out you always use seconds not minutes to calculate the new time because they might be a (very) big differnce. And please keep in mind that 5,50 minutes are not 5 minutes and 50 seconds; it is 5 minuntes and 30 seconds. Example for that problem you can find at the bottom too.

Some might be wondering now why they need to do it that way, it's quite easy explained. You need the old compile time and light scale as a refernce for the new ones. The new lightmap is required because the differnce between the new and old lightmap is related to the difference between old and new compile time. I give a example for that relation:

Old compile time was: 20 sec New compile time is: 80 sec Old lightmap scale was: 16 New lightmap scale is: 8

Old compile time was: 20 sec New compile time is: 320 sec Old lightmap scale was: 16 New lightmap scale is: 4

You learn im maths (and use it a lot in physics Oo) how to get a formula out of this...

You might still do not know why you need to multiply sf with it self; the simple answer is "2D". The lightmap is applied to a face which has 2 variables, width and length. The light map is a square so you can imagine there are a lot of little quare the lightmap is applied on the face. If you reduce the scale by the half you will reduce the length of each side by half so the square would get 2 * 2 times smaller than the orignal one. It's the same if you reduce the scale by a fourth: 4 * 4 times smaller squares. And the Compile time is releated to the size of the squares in the first place, so a 4 times smaller lightmap scale would be a increase in the compile time by 16 times.

Last but not least, the compile time may be differnt from what you calculated because the programms running in the background may take more or less CPU and so the programm can't compile with the same CPU power as before. In addition, the calculation formula only works if you change the lightmap scale of everything, but the rule the formula is based on works for anychange. So keep in mind that a reduction of the lightmap scale from 16 to 1 increases the compile time for the part of the map by 256 times.


Expamples:

1st

Old Compile time was: 20 seconds Old Scale Factor for everything was: 64 New Scale Factor for everything is: 16

so the new compile time would be: x=20 sec * (64/16)² x=20 sec * 4² x=20 sec * 16 x=320 sec

If you want to know the amount of minutes spent, just do this: x=320 sec / 60 x=5, 3.. min

You properly don't like the ,33333... now so you just change it back: x=0,33333. x= 1/3

y=60sec * 1/3 y=60sec/3 y=20 sec

So it would be 5 minutes and 20 seconds.

2nd

Another example: Old Compile time: 20 minutes, 10 seconds Old Scale Factor: 16 New Scale Factor: 32

New compile time: x= (2060+10)(16/32)² x= 1210 * (0,5)² x= 1210 * 0,25 x= 302,5

Means 5 minuntes and 3 seconds.


Version Histroy:

V 1.00 - release

Oh noes! You're not a Member!

Want access to cool stuff? As a member you can:

  • Post. Give the submitter your thoughts on this Tutorial.
  • Say Thanks. Show your appreciation by sending the submitter points.
  • Stamp Posts. Let other posters know what you think of their posts.
  • Rate. Give this Tutorial a rating out of 10.
  • Flag. Alert moderators and warn members of a problem with this Tutorial.
  • Vote. Vote the submitter for the Monthly Awards.
  • Subscribe. Get notified when this submitter submits again.

Interested? Register or Login

Comments

  • B-Phoenix's Levels
    • P1: Beggar
      Points: 261
    • C1: Member
    • A5: Veteran
      Account Age: 5 years
    Posted 4 years ago

    Pros: well thought out Improvements: none

    Bananite
  • Omega_K2's Levels
    • P2: Drudge
      Points: 1,076
    • C1: Member
    • A6: Elder
      Account Age: 6 years
    Posted 5 years ago

    Unless its a Turion X2 it isn't possible.

    It's me, Mario :P
  • Whisky's Levels
    • P1: Beggar
      Points: 796
    • C1: Member
    • A6: Elder
      Account Age: 6 years
    Posted 5 years ago
    Posted by Omega_K2
    Posted by Whisky Well i got this problem, i have made a map env_spot and env_light and cubemaps, but the compiling time takes more than one houre and 30 seconds! os there ANY way to keep detail but faster compiling time?
    If you want to keep detail you'll have to try third party compiler. If you have a dual core or quad core processor and the compiler says "1Thread" you could add the compile options (advanced/expert mode) -threads 2 (Dual core) or -threads 4 (Quad core). Also if you test some stuff use the Fast compile mode. Saves a lot of time.

    Thanks, i got AMD Turion Btw, and i used fats compiling :) but the walls (combine texture form half-life) look a bit to bright and shiny :( could i use turion to compile with treath 2?

    User Title
    God's seen campy bean.
  • Omega_K2's Levels
    • P2: Drudge
      Points: 1,076
    • C1: Member
    • A6: Elder
      Account Age: 6 years
    Posted 5 years ago
    Posted by Whisky Well i got this problem, i have made a map env_spot and env_light and cubemaps, but the compiling time takes more than one houre and 30 seconds! os there ANY way to keep detail but faster compiling time?

    If you want to keep detail you'll have to try third party compiler. If you have a dual core or quad core processor and the compiler says "1Thread" you could add the compile options (advanced/expert mode) -threads 2 (Dual core) or -threads 4 (Quad core).

    Also if you test some stuff use the Fast compile mode. Saves a lot of time.

    It's me, Mario :P
  • Whisky's Levels
    • P1: Beggar
      Points: 796
    • C1: Member
    • A6: Elder
      Account Age: 6 years
    Posted 5 years ago

    Well i got this problem, i have made a map envspot and envlight and cubemaps, but the compiling time takes more than one houre and 30 seconds! os there ANY way to keep detail but faster compiling time?

    User Title
    God's seen campy bean.
  • Ironmad's Levels
    • P2: Drudge
      Points: 4,844
    • C1: Member
    • A6: Elder
      Account Age: 7 years
    Posted 6 years ago

    Any preent screens? dont even know what this is

    User Title
    Eat Pizza
  • Jomann's Levels
    • P1: Beggar
      Points: 792
    • C1: Member
    • A6: Elder
      Account Age: 6 years
    Posted 6 years ago

    Im glad your a math wizard cuz i sure aint

    Mapper
  • Omega_K2's Levels
    • P2: Drudge
      Points: 1,076
    • C1: Member
    • A6: Elder
      Account Age: 6 years
    Posted 6 years ago

    My first tutorial in English (I've written some in German some time ago). I am sorry about bad grammar, spelling or word usage because I am still learing English in school, lol.

    It's me, Mario :P

Credits

Submitter
Omega_K2's Levels
  • P2: Drudge
    Points: 1,076
  • C1: Member
  • A6: Elder
    Account Age: 6 years
Omega_K2 (Creator/Co-creator)
Studio
Studio
The Official ZombieMod Studio
Key Authors
Omega_K2
Unknown

Rating

10.0/10
Based off 1 rating(s)

Additional Info

Genre
Other/Misc
Difficulty Level
Advanced

Stats

Post Count
8
ViewCount
2,156
Date Added
6 years ago
Date Modified
2 years ago

Share

Embed Code
Code to use:

More embeddable images

Bookmark and Share