pageswap fog problem

If you feel like you're up to the challenge of building your own Ages in Blender or 3ds Max, this is the place for you!

pageswap fog problem

Postby Justintime9 » Mon Nov 23, 2009 12:55 pm

Now that I've fixed my waveset reflection, I've noticed that there's an annoying black fog on the horizon of my age. As many of you know, my age uses a page swap. There are two separate fog settings, one for each page. In order to change to black fog in the daytime to blue (to blend the sky and water on the horizon), I changed the daytime fog settings, but left the nighttime fog black (the sky is black so it'll blend right in.)

There was only one problem, when I changed the fog settings for the day, and linked back in, the fog in the daytime was still black, as well as the night. Now, there are fog setting in both of the two python files; "MyAge.py" and "SwapButton.py"

Here's the fog settings for the "MyAge.py" file:

Code: Select all
# emacs-mode: -*- python-*-
from Plasma import *
from PlasmaTypes import *
SDLName = 'SwapPageZefora'
sPages = ('ZeforaDay',
 'ZeforaNight')
sFog = ([1,
  1000,
  1],
 [1,
  1000,
  1])
sColors = ([0.106,
  0.176,
  0.193],
 [0.0,
  0.0,
  0.0])
sWavesets = ('RpondWav',
 'RpondWavN')


Here's the fog settings from my "SwapButton.py" file:

Code: Select all
 'ZeforaNight')
sFog = ([1,
  1000,
  1],
 [1,
  1000,
  1])
sColors = ([0.106,
  0.176,
  0.193],
 [0.0,
  0.0,
  0.0])
User avatar
Justintime9
 
Posts: 1188
Joined: Sat Sep 29, 2007 5:37 am

Re: pageswap fog problem

Postby D'Lanor » Tue Nov 24, 2009 5:23 am

In order to see the fog color you need to have fog first. The default values in this script are the PyPRP defaults which do not create any visible fog effect. The fact that you can see the horizon is further evidence that there is no fog.
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: pageswap fog problem

Postby dendwaler » Tue Nov 24, 2009 10:07 am

Have you checked your "init" settings?
In the next example you can see for 2000 blender units after that distance the objects will turn to black .
If your age is bigger then change the value "2000" to what ever is needed.

example:
#--Fog settings--
#Graphics.Renderer.SetYon float yon
#Visibility distance
Graphics.Renderer.SetYon 6000

#Graphics.Renderer.Fog.SetDefLinear float start, float end, float density
#Fog depth
Graphics.Renderer.Fog.SetDefLinear 1 2000 1
#Graphics.Renderer.Fog.SetDefExp2 float end, float density
#Graphics.Renderer.Fog.SetDefExp2 100000 20

#Graphics.Renderer.Fog.SetDefColor float r, float g, float b
Graphics.Renderer.Fog.SetDefColor 0 0 0

#Graphics.Renderer.SetClearColor float r, float g, float b
Graphics.Renderer.SetClearColor 0 0 0
Those wonderfull Worlds are called " Ages" , because that is what it takes to build one.



Watch my latest Video Or even better..... watch the Cathedral's Complete Walkthrough made by Suleika!
User avatar
dendwaler
 
Posts: 936
Joined: Mon Jun 22, 2009 10:49 am
Location: Nederland

Re: pageswap fog problem

Postby Justintime9 » Sun Nov 29, 2009 9:11 am

D'Lanor wrote:In order to see the fog color you need to have fog first. The default values in this script are the PyPRP defaults which do not create any visible fog effect. The fact that you can see the horizon is further evidence that there is no fog.


Well, when I first started my age (before the pageswap was added) there was a blue fog on the horizon by default, but after I added the pageswap, it turned black. But if that's not fog (you said by default there is no visible fog), then what is it that's on the horizon?

@ denwaler, I changed it to 2000, but all that did was make the amount of fog less.
User avatar
Justintime9
 
Posts: 1188
Joined: Sat Sep 29, 2007 5:37 am

Re: pageswap fog problem

Postby D'Lanor » Sun Nov 29, 2009 10:16 am

Justintime9 wrote:But if that's not fog (you said by default there is no visible fog), then what is it that's on the horizon?

Perhaps a transparency (or a hole) in your skydome which shows the underlying clear color of your age. The pageswap script does make the clear color the same as the fog color though.

Your color [0.106, 0.176, 0.193] is still a dark shade of gray so you wouldn't really see much difference with black.

Maybe you should investigate what your settings actually do before you ask for advice. The offline KI has /fogcolor and /fogdensity commands to preview your settings in real time.
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: pageswap fog problem

Postby Justintime9 » Mon Nov 30, 2009 3:41 pm

Ah, I took at closer look at my daytime fog and it is indeed different than the night (Gray rather than black.) I did a bit of testing as density goes, and found the correct settings.

My only question now is how to get the exact color I want for the horizon. I got my [0.106, 0.176, 0.193] triplet by taking a screenshot of my age, and in MS paint, using the eyedrop tool to find the color I want, and then checking the RGB of it.
Is there an easier way to figuring it out? Apparently that was wrong, because my supposed blue color came out dark gray :P
User avatar
Justintime9
 
Posts: 1188
Joined: Sat Sep 29, 2007 5:37 am

Re: pageswap fog problem

Postby D'Lanor » Mon Nov 30, 2009 5:35 pm

I found a small free tool that can show RGB values in the 0 to 1 range. Just Color Picker

Choose RGB [0,1] from the dropdown box and hover your cursor over the color you need.
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: pageswap fog problem

Postby Jojon » Tue Dec 01, 2009 2:59 am

Justin: Is it possible that you did not even know that the fog settings require normalised values? It kind of looks like you've inserted the integer values you got out of MSPaint as they were, with a "0." prepended.
To make a 0-to-255 range 0-to-1, you'll have to divide the RGB values by 255, giving you: 0.416, 0.69, 0.757, which is still not a saturated blue, but more so than the dark colour you had first. :7
Jojon
 
Posts: 1116
Joined: Sun Sep 30, 2007 5:49 am

Re: pageswap fog problem

Postby Justintime9 » Tue Dec 01, 2009 2:11 pm

That seemed to have done the trick. (that program will come in very handy :D)
@ Jojon, that must've been the main thing I was missing. Where did you guys learn to "normalize" the values? It isn't in the tutorials...
User avatar
Justintime9
 
Posts: 1188
Joined: Sat Sep 29, 2007 5:37 am

Re: pageswap fog problem

Postby Paradox » Tue Dec 01, 2009 7:27 pm

Justintime9 wrote:That seemed to have done the trick. (that program will come in very handy :D)
@ Jojon, that must've been the main thing I was missing. Where did you guys learn to "normalize" the values? It isn't in the tutorials...


There are a few ways of representing colours in the computer world. One is with RGB values from 0-255 in decimal, another is using hexadecimal notation ranging from 0-FF (common on webpages),and another is using floating point number ranging from 0.0-1.0 (common in games and graphics).

Plasma expects all colours to be floating point values ranging from 0.0 - 1.0.
Paradox
 
Posts: 1295
Joined: Fri Sep 28, 2007 6:48 pm
Location: Canada

Next

Return to Building

Who is online

Users browsing this forum: No registered users and 6 guests