Jump to content
The Dark Mod Forums

Better Night Skies


rich_is_bored

Recommended Posts

I'll be coming back to it when I get my new skybox working! I'm sure the issues can be resolved to make it look as good as it did in attempt #1 while getting rid of the regular patterns. I spotted a bug in the flies distribution code while looking at your original -- it only uses one of its random number sequences in error instead of 2, although fixing that alone doesn't cure the patterns.

 

I've tracked the load time issue.

Link to comment
Share on other sites

I solved the distribution problem in my own way. I used a no draw material as a particle emitter, slapped it on a patch and threw it in the skybox. The patterns are gone.

 

About a week ago I was trying to find scientific data about the color of the night sky to produce a cube map without any other features. This is where I left off with that although it's still not quite right...

 

HFQX2nc.png

 

I stopped shortly there after because the color banding was ridiculous, unavoidable because it's so dark, and I got sidetracked looking for ways to dither it. You can't see it here because this is one of the six sides of the cubemap but in game it's awful.

 

At any rate, I look forward to seeing what you've got cooking.

  • Like 1
Link to comment
Share on other sites

It's not crashing. What's happening is the estimation of the particle effect's bounds is taking almost forever. The engine runs a Monte Carlo simulation during map load, trying 1000 random configurations for each particle and calculating the bounds of the particle effect at every frame. These particles have a life of a million seconds, so multiplying that out, it's a lot of calculations.

 

I've been meaning to look for a way to short-circuit that calculation anyway. I've clocked this process taking up 10% of map load time in particle-rich maps. There must be a more efficient way to estimate max bounds. You'd think it'd be trivial to calculate the maximum from max size and speed and time... but maybe that would produce frequent and vast overestimates, which'd cause a performance hit through particles being drawn unnecessarily. The reason why the engine wants to know the bounds is so it can work out in which visleafs a particle could possibly be seen.

 

Any ideas? If we stick with simulation as the only method, I guess we could limit the number of samples to a sensible amount, which'd fix this example. We could also provide a manual override in the particle decl.

Can you post the code here or point me to the file/method it is defined in? Monte Carlo is a bad choice here, as it calculates every single timestep. But for the boundaries we only need the last one.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

Can you post the code here or point me to the file/method it is defined in? Monte Carlo is a bad choice here, as it calculates every single timestep. But for the boundaries we only need the last one.

 

Sure. It's idDeclParticle::GetStageBounds. Feel free to claim the tracker off me if you want to fix it.

 

It runs 1000 tests, each one testing the position of a random particle quad for each frame of the particle stage's life. Equivalent to testing 1k random quads at each frame. Like you say, it's the "each frame" bit that's causing the problem for long-lived particles. And it's done once for every particle stage, not once for the whole emitter.

 

We can't just use the last frame. There are probably particles that shrink over time instead of growing. My thought was to use a set number of samples spread over the particle lifetime.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
    • The Black Arrow

      Hope everyone has the blessing of undying motivation for "The Dark Mod 15th Anniversary Contest". Can't wait to see the many magnificent missions you all may have planned. Good luck, with an Ace!
      · 0 replies
×
×
  • Create New...