sidebar features
sidebar content

Go Back   Blender Artists Forums > General Forums > Python & Plugins

Reply
 
Thread Tools
eeshlo's Avatar
eeshlo eeshlo is offline
Member
 
Join Date: Mar 2002
Posts: 1,075
This is the texture plugin I mentioned in the Yable thread. I will just repeat the included readme here:

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



This is a Blender texture plugin to render colors of the sky as lit by the sun. The same algorithm as in yafray is used.

There are two versions, one with and one without python (no script, no python necessary, this is something different). Which one you use depends on what you want to do, if you only want to render the sky and can live with the fact that you have to change the sun position with two parameters, then the version without python is the best choice. If however you like to use an object or a light to position the sun, then the version with python might be a good choice.

Using python (again, nothing to do with a script, you don't need a full python install for this, it only uses the Blender module) in a texture plugin is something that might not have been done before, although I think it is mentioned in one of the tutorials by carsten wartmann.

Since this is a texture plugin, you can of course use it anyway you want, however it was designed to be used as a World texture.
To do this the settings have to be as follows:
After adding a new world to your scene, add a new texture, goto the texture button section (F6) and click plugin, then 'Load Plugin', and find and load the plugin you want to use.

Then go back to the world buttons section and select the 'Real' button, disable 'Blend' (on the left). Since we want the color of the plugin only, to the right, disable 'Blend' and enable 'Hori'. This does not mean you have to do this, you can of course mix blends and other textures if you want to do that. But this way you get the pure colors as calculated by the plugin.



The plugin parameters, they are the same as in yafray.
'Turb' (turbidity) controls the density of particles in the air, the lower, the clearer the sky, the higher, the more particles, and the more the sunlight will be scattered, which affects the overal skycolor. The default is 4.0.
'Gamma' and 'Exp' (exposure) control the basic brightness of the sky, but in Blender this is not as sucessful as in yafray, besides brightness, it can also have an effect on the colors of the sky, a sort of 'bleaching' effect, making it less colorful. Don't forget that you can also use Blender's contrast & brightness sliders in the texture button section.

The next two buttons control the position of the sun, 'Sun_v' controls the vertical rotation from the horizon (90 degrees is exactly the horizon, higher, below the hoziron), and 'Sun_h' controls the horizontal rotation. Both parameters are in degrees.

The last two buttons are available in the python version as well, but in this case, they won't be used when you have an object in your scene which is called 'sunsky_SUN'. If you only want to set the position of the sun, this object can be any object. In case the object is a lamp, the plugin will also change both the color and energy of the lamp as if it was the actual sun in the sky at that position.
For this to work, the object must be called 'sunsky_SUN'.
NOTE: the plugin can only register changes in the objects position when the frame has changed, also by rendering, or by changing any of the texture plugin parameters.

There is now a set of variation parameters available, these control various aspects of the skycolor. See the tooltips for descriptions. These can be set to extreme values which can easily overflow the calculations, which means that colors will come out completely wrong (sometimes negative), so be careful with them. The default value of 1 for all means that no colors are changed.
A: controls the brightness of the horizon colors.
B: controls the 'spread' of the horizon color.
C: controls brightness of the sun, setting this to a negative value will make the sun a black blob.
D: controls the apparent size of the sun, the higher, the smaller the sun will be. Light will also be more concentrated at the sun position.
E: controls the amount of 'backscattered' light, larger values generally add more red around the sun position, negative values removes it.

The python version of the plugin has an extra button: 'G&E on Lamp", when this is enabled, gamma and exposure calculation will also be done for the sunsky_SUN lamp, most of the time this might not be very realistic, in case you find the light too dark, try changing the Blender distance (Dist) setting for the lamp.

Then finally, the python version of the plugin will only work in Blender versions 210 to 225, which use python version 2.0. For the windows version of 'funblender', which was compiled with python2.2, there is a separate version in the zipfile (win32/funblender directory), this can ONLY be used with funblender, no other blender versions.

And another note, for windows, to my knowledge, except for NikolaTesla20's compiled version of Blender2.25, the official 2.25 versions will not load plugins. The only way to load a plugin is to save a file using the plugin in an older Blender version (like 2.23) and load it in 2.25.
2.25 for Linux works correctly.

Jan 29, 2003,
Alfredo 'Eeshlo' de Greef
mail:eeshlo@yahoo.com


-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Of course the only use for this is finding good parameters for yafray, any other use is strictly forbidden!!
............................................
There is no excellent beauty that hath not some strangeness in the proportion.

Sir Francis Bacon (1561 - 1626)
#1   Old 23-Jan-03, 22:09   
Reply With Quote


paradox's Avatar
paradox paradox is offline
 
Join Date: Mar 2002
Location: Utah
Posts: 1,171
Very nice I just played with the plugin today a little and see lots of possiblitys. I tried basic sky and also added another texture to the world besides the plug-in , that texture being clouds and the effect was nice. Still testing and exploring possiblitys but must say well done again eeshlo another nice script/plug-in tool for us to use.
Paradox
............................................
I listen to the beat of a different drummer.
#2   Old 24-Jan-03, 04:30   
Reply With Quote
H@dj's Avatar
H@dj H@dj is offline
 
Join Date: Nov 2001
Location: Superior,Wisconsin (USA)
Posts: 214
Hi eeshlo,

thanks for the great plug_in ,

BTW, your picture looks great!

dale
#3   Old 24-Jan-03, 08:18   
Reply With Quote
Tol's Avatar
Tol Tol is offline
Member
 
Join Date: Mar 2002
Location: Czech republic
Posts: 356
Great work man! And thanx alot- great helper to my blends and great material for my next article in my job :-)
#4   Old 24-Jan-03, 13:37   
Reply With Quote
Bapsis's Avatar
Bapsis Bapsis is offline
Member
 
Join Date: Apr 2002
Location: BC, Canada 'eh!!!
Posts: 1,355
Very nice atmosphere in that landscape pic, awesome job!!!

Could this be used to make a moonlight glow, a well light night sceen? It looks like it could do that pretty well.

Thanks for your effort and work, i know all of us Blender users appreciate it!!!

Matt


Blend on, and blend well!!!
#5   Old 25-Jan-03, 06:16   
Reply With Quote
dreamsgate's Avatar
dreamsgate dreamsgate is offline
Member
 
Join Date: Mar 2002
Location: Nampa, Idaho, USA
Posts: 1,797
Very cool, I can't wait to play with it.
............................................
Managing Editor Blenderart Magazine:
blog | E-shops | My Squidoo Lenses | personal webpage
#6   Old 25-Jan-03, 16:45   
Reply With Quote
eeshlo's Avatar
eeshlo eeshlo is offline
Member
 
Join Date: Mar 2002
Posts: 1,075
Quote:
Originally Posted by Bapsis
Could this be used to make a moonlight glow, a well light night sceen? It looks like it could do that pretty well.
Might be a bit hard, the model is specifically for daylight, try putting the sun way below the horizon like right under your scene, you will get a very blue sky, not really very realistic. You probably will get better results just creating something with blender gradients, that is what I used to do to simulate skies.

Also remember this plugin just creates the sky color, the (procedural) clouds in the picture were just put there by me, not the plugin.

The sun is a halo spot pointed at the camera. The plugin set the color of the lamp.
............................................
There is no excellent beauty that hath not some strangeness in the proportion.

Sir Francis Bacon (1561 - 1626)
#7   Old 25-Jan-03, 18:18   
Reply With Quote
@ndy's Avatar
@ndy @ndy is offline
Member
 
Join Date: Feb 2002
Posts: 1,100
WOW
<sniff>
thank you for making a small dumb blenderhead very happy...
</sniff>


.andy
............................................
artificial3D | elephants dream | big buck bunny
#8   Old 26-Jan-03, 13:07   
Reply With Quote
eeshlo's Avatar
eeshlo eeshlo is offline
Member
 
Join Date: Mar 2002
Posts: 1,075
I updated the plugin with 5 extra parameters, also corrected a bug in updating the lamp for the python version. One bug remains which I cannot do much about, when doing an animation, the color of the lamp will always be a frame behind the position, but generally as long there are no large jumps in position you shouldn't really notice this.

Quote:
Originally Posted by @ndy
thank you for making a small dumb blenderhead very happy...
So does that mean you think I'm large and intelligent?

Anyway, don't be too impressed, this plugin is almost completely copy&paste code, courtesy of a very informative thread on gamedev.net, I have to thank Yann.L for his great explanations and 'greeneggs' for the example code I used for this.
I'm no way near as knowledgable as some seem to think I am sometimes...
............................................
There is no excellent beauty that hath not some strangeness in the proportion.

Sir Francis Bacon (1561 - 1626)
#9   Old 29-Jan-03, 22:45   
Reply With Quote
Manuel Manuel is offline
Member
 
Join Date: Mar 2002
Location: Italy
Posts: 626
This is a very useful plugin (for example in architectural works)...
Thanks!!!


PS: The plugin load problem will be fixed in Blender2.26 ??
#10   Old 30-Jan-03, 01:06   
Reply With Quote
klopes's Avatar
klopes klopes is offline
Member
 
Join Date: May 2002
Location: Zaragoza (Spain)
Posts: 111
Really funny, impressive... we small, ignominious worms envy your work :´( , thank you again!
............................................
-----------
Klópes
#11   Old 30-Jan-03, 15:33   
Reply With Quote
eeshlo's Avatar
eeshlo eeshlo is offline
Member
 
Join Date: Mar 2002
Posts: 1,075
Quote:
Originally Posted by Manuel
PS: The plugin load problem will be fixed in Blender2.26 ??
I have no idea, I don't know anything about Blender's future... I'm not a 'real' programmer as Andrea has told you... But from what I understand from posts on blender.org, I think it probably will be corrected.
............................................
There is no excellent beauty that hath not some strangeness in the proportion.

Sir Francis Bacon (1561 - 1626)
#12   Old 30-Jan-03, 19:35   
Reply With Quote
gorgan_almi's Avatar
gorgan_almi gorgan_almi is offline
Member
 
Join Date: Mar 2002
Location: Kent, UK
Posts: 1,015
kool script, thanx eeshlo

How did you make such realistic looking mountains by the way???


Keith. 8)
#13   Old 03-Feb-03, 16:32   
Reply With Quote
eeshlo's Avatar
eeshlo eeshlo is offline
Member
 
Join Date: Mar 2002
Posts: 1,075
Quote:
Originally Posted by gorgan_almi
How did you make such realistic looking mountains by the way???
I used my dynoise module, the landscape is actually the same one from my (very old) gallery, I didn't create a new one, I just scaled it a bit and duplicated a few times. Somebody else asked questions about it before, so I posted the actual (also very old) script I used to create it here:

http://www.elysiun.com/forum/viewtopic.php?t=8134
............................................
There is no excellent beauty that hath not some strangeness in the proportion.

Sir Francis Bacon (1561 - 1626)
#14   Old 03-Feb-03, 18:05   
Reply With Quote
gorgan_almi's Avatar
gorgan_almi gorgan_almi is offline
Member
 
Join Date: Mar 2002
Location: Kent, UK
Posts: 1,015
Thanks
#15   Old 03-Feb-03, 19:00   
Reply With Quote
ashsid ashsid is offline
Member
 
Join Date: Feb 2003
Location: Bratislava, Slovakia, Europe
Posts: 814
Eeshlo,

is sunsky plugin available somewhere on the net? Your iptic site has gone. If not, can you (or anybody else) send me that plugin? (e-mail ashsid@post.sk)

Thanks.
#16   Old 23-Apr-03, 07:07   
Reply With Quote
scorpius's Avatar
scorpius scorpius is offline
Member
 
Join Date: Mar 2002
Location: New Jersey, USA
Posts: 239
I'd also like to try this plugin. Is it still available?
............................................
Blender/Wings: Renderings, Plugins, & Tutorials
#17   Old 01-May-03, 01:33   
Reply With Quote
ada89's Avatar
ada89 ada89 is offline
Member
 
Join Date: May 2003
Location: Malaysia
Posts: 525
Can someone tell another mirror to download it, cause i am too late
............................................
Think
#18   Old 01-Jun-03, 00:02   
Reply With Quote
mthoenes's Avatar
mthoenes mthoenes is offline
Member
 
Join Date: Mar 2002
Posts: 402
Any one have a current link for the sunsky_texplugin.zip
............................................
BlendOn!
mthoenes
#19   Old 03-Jun-03, 14:24   
Reply With Quote
theeth's Avatar
theeth theeth is offline
Administrator
 
Join Date: Oct 2001
Location: Montreal, Canada
Posts: 10,939
I'll upload it somewhere tomorrow, if I don't forget until then, of course

Martin
............................................
Life is what happens to you when you're busy making other plans.
- John Lennon
#20   Old 03-Jun-03, 15:07   
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 17:47.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Logo and website design copyright © 2006 by froodee design bureau. All rights reserved.
Other Blender Sites
new icon Blender Homepage »
The official Blender homepage
new icon BlenderNation »
Fresh Blender News, Every Day
new icon Blenderart Magazine »
Blender articles, tutorials and images.
Blender Headlines
Featured Artwork
Short animation: Barrel by Phlopper
Woolly mammoth by sebastian_k
Photorealistic classic furniture by eMirage
Social BlenderArtists