Home   Help Search Login Register  

Author Topic: Sky texture modification.  (Read 2618 times)

0 Members and 1 Guest are viewing this topic.

Offline DMarkwick

  • Contributing Member
  • **
  • I'm a llama!
Sky texture modification.
« on: 29 Jan 2010, 03:09:55 »
One thing that bothers me, which I would absolutely LOVE to change, is the way the sky texture is always visible even in dense fog.


I'd like to be able to overlay an alpha-variable gray texture or something, the exact colour of the fog. Then the issue of trees & buildings "popping" into view suddenly would go away, as fog rendered objects are rendered in the fog colour at their furthest distance.

Anyone have ANY idea how or if this could be achieved?

Offline DeanosBeano

  • Addons Depot Staff
  • *****
  • SirDeanosbeano bstowed on me by sui ;)
    • Fraghaus
Re: Sky texture modification.
« Reply #1 on: 29 Jan 2010, 13:50:01 »

Hmm,
  I think i understand your problem but not sure what solution you are giving to solve it.
 Are you saying that when fog param is set ,the sky is visible and because the engine is trying to render the sky through the fog it causes the LOD system of trees and houses to fail and tus POP ?

questions if i understand correct
Is it the shadows casting on the particle system like in OFP arma1 that is the problem or genuine LOD problem ?

can you set all skys with a config ?
if yes then can you take the MRAK model from arma and a add hidden selections maybe ?
or let the exisiting ones be there but over ride only when foggy wit a new set of clouds or Mrak that suit fog colour ?

just a couple of ideas.
I love ofp

Offline DMarkwick

  • Contributing Member
  • **
  • I'm a llama!
Re: Sky texture modification.
« Reply #2 on: 29 Jan 2010, 19:30:53 »
Well, by way of an explanation of the problem, here is a link to a video I made displaying it:

http://www.vimeo.com/9071071

The first part shows no fog just to set the scene, the second part shows default max fog to display the problem, and the third part shows JTD max fog to show a *possible* solution.

Basically, it's currently a kludge, a workaround, a cheat :) I'm replacing the sky texture with a blank texture the exact colour of objects in deepest fog, so that when they "pop" into view they are the same colour as the sky & therefore invisible. Then as you move in the fog shading makes the objects stand out more & more. As a solution to this one problem, it's very effective, but I need to sort out how I can apply this practically without losing all the sky textures.

i.e., how do I selectively replace the sky texture when fog value > x amount?
« Last Edit: 30 Jan 2010, 00:39:55 by DMarkwick »

Offline kju

  • Members
  • *
    • PvPScene - The ArmA II multiplayer community
Re: Sky texture modification.
« Reply #3 on: 30 Jan 2010, 09:45:04 »
increase the drawing distance and lower the fog distance

Offline DMarkwick

  • Contributing Member
  • **
  • I'm a llama!
Re: Sky texture modification.
« Reply #4 on: 30 Jan 2010, 14:56:47 »
That wouldn't solve the problem that the sky is displayed "over" the fog though :)

Offline kju

  • Members
  • *
    • PvPScene - The ArmA II multiplayer community
Re: Sky texture modification.
« Reply #5 on: 31 Jan 2010, 08:46:47 »
How about an addon to disable the sky texture?

Offline DMarkwick

  • Contributing Member
  • **
  • I'm a llama!
Re: Sky texture modification.
« Reply #6 on: 31 Jan 2010, 16:32:21 »
I actually had that as a bug with my old graphic card :) you just get a white sky in that case. Also, I don't see how it would be any more dynamic than the current addon solution. Basically, it looks like I need a way to dynamically replace the sky texture with a custom one. Of course, I already have a released addon that replaces the sky texture, but it's the dynamic replacement ingame that's proving difficult/impossible.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Sky texture modification.
« Reply #7 on: 31 Jan 2010, 16:43:52 »
I guess one way to do this would be to create a absolutely massive object that would cover the entire sky, textured with the fog color texture.. :P
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline DMarkwick

  • Contributing Member
  • **
  • I'm a llama!
Re: Sky texture modification.
« Reply #8 on: 31 Jan 2010, 20:39:53 »
I tried it :D but there seems to be a fundamental limit to the size of p3d objects.

But in any case, I think I got it :) I've basically sequestered Weather 1 (clear sky) and given it a gray sky texture. I chose that one because of 2 things mainly:

1. Foggy days are generally mild days, not stormy, so it made sense to use that "end" of the weather spectrum.

2. The Overcast value ranges from 0 to 1, and the next weather "up" (very clear sky) comes into effect at Overcast value 0.07, so it seems to me that "clear sky" is actually quite a rare occurrence :)

Anyway, I got a test mission with various triggers that invoke different overcast values, and different fog value. And, I can *apparently* dynamically make the sky gray for very foggy situations :)

Also, I'm going to try & make an 8th weather level, so that the clear sky texture isn't actually lost. Make it active at Overcast > 0.01 or something, see how that goes.

Almost there ;)