WIP on lighting set up Script

studying other scripts and addons!

ok here is another version with added some menu items and some operators also
but the new light set up are not workng yet !
to be done later

how do you get rid of a file in post?

use the last version 12 only

i added several menu items
with operator but not completed yet
still ahve to complete the operator for the sub menu for day ligth set ip

happy 2.5

one trick for layers

layers = [False]*19
layers[0] = True

or this

layers=[True]+[False]*19

it’s a bit shorter i guess

and begin to add the HC 1 and HC2 function
but having problem with cube ?
see file here

sorry file has become too big to load up !
load it tomorrow

ok from here then

i got error for object name
can you correct that

and i tried to change the 3 spot lights
with layers can you check if it works ok
and then change all the others
may be this layers var should be made global then it can be used in all functions!

happy 2.5

ok i’ve run over most of the script removing indentation error’s and a little change to the part that checks for the domain, and put in the changes you want, i didn’t make the layers thing global as im not sure how that works, but hey it all works now :D. i just removed that part for the obj name it works just the same without it :smiley: because you still get the warning if it’s not selected.

ok thanks

what is a drop box?

how did you shrink it so small
i tried compress that on 2.5 and got over 900 KB ?

thanks

@ricky dropbox is a sharing app you put the files in the dropbox folder and if you connect with other people you have instant sharing and you can link to a file for sharing over the internet as well.

its well worth downloading

DROPBOX

drop box is a cool way to share and store big files online, you start of with 2GB for free and can specify who may access those files and who not.
(edit: darn, too late xD)

no problem,

well it’s a program, just google dropbox, once installed it make’s a folder in my doc’s where you can just drop files in and it uploads to your personal storage online, im using the free version witch gives me 2gb storage space, you can also work on the files in that folder because it checks the files for any changes when the dropbox program is runniing.
(edit: double darn, lol)
im not sure why it compressed i don’t know how in 2.5, must have been the changes i made?

1 - Optimum program
the way i did theses multi level menus
works but may not be the best way

the scritp for pie menu has a way of doing it but in the viewport not in tool pro panel
but i don’t understand it enough to modify it and make it work in tool pro panel!
if you know how let me know !

sorry i’m not really a programmer and still learning how to !

2 - the Box domain you did is good for internal lighting like inside a box
which stop the influence of the Wolrd colors and Environment
but you cannot really do this for Daylight or outisde lighting scene
cause you need to have the sky and world color change objects colors!

3- today i’ll continue on the 2 HC1 and HC 2 functions to try to complete theses

can you have a look on the other one for Clay rendering and daylight sub menu
i uploaded file or script for it

this clay script is adding a new sub panel in render panel
now don’t think we need that we can add buttons in tool pro panel only
so can you

a) try to make clay work in last built which would be nice to update the old script and
you can open a new thread in python forum to let people have it updated to 545!

b ) modify clay it so we can use it in our ligth set up script with tool pro panel only

c ) i already added a new sub menu for daylight
can you see if you can make at least add the operators works for this sub menu
but we don’t need the box domain for theses cause this is outside with light from world

i think i added enough options that we cover basically most of the light setup in 2.5
but if you think of any other hey let me know!

that will make a very nice addons for 2.5

i just saw that you change the layers var
it’s a lot shorted then before nice trick LOL

Thanks happy 2.5

i think i may know what the clay render needs,fix it so it change’s material settings first, then i make the entire clay script a function, import the script into the lightsetup script and make a instant clay material button :D. ill try :smiley:
im messing around with lights setups so if i come up one you haven’t got and i feel is good i let you know, or better yet ill give you the setup :D.

there ae so many different ligth wt up we annot add all of them
so as long as we have some good ones it’ll be good and enough i guess!

i set the proper color for the 3 spot light ones

amd also almost done the HC1 and HC2

but need more infor on wiki page data

what is wiki page API for lamp data?

how to set
no specularity

area lamp
how to set sample = 4
here we can set angle in the add lamp command i guess

also 3 point spots light
adjust the angle minimum to cover scene ! but how

moving nicely

i’ll begin this afternoon to look at the set up for the different day light scenes

like the rabbit let’s keep going !LOL

Thanks Happy 2.5

lamp angles

if we say that the scene is at 0,0,0 at the origin
now if you locate a lamp let say at 0,5,10

do you remember how you calculate the euler angles to set the lamp angles?

Thanks

i use the api pdf for 2.5 but it doesn’t show everything for some things you can hover the mouse over and it shows a description in bold and below shows the python code for it.

anyway to set area lamp sample> AreaLamp.data.shadow_ray_samples_x = 4

to set specular> whateverthelampis.data.use_specular = False or True

for spot lamp size use > SpotLamp.spot_size

this clay render thing is getting more complex, i’ve made a preset script for the clay using your settings and now i have to get the clay render script to change the preset oh what fun.

as with lamp angles i probably go about it in the wrong way but here’s how i do it…
add lamp > position > alt-r > rotate > press ‘n’ and from that menu put the location/rotation for that lamp in the script and test.

there is a way to calculate the angle from location with mathutil i’ll try to find it !

by the way i began to write up a tutorial for this
like intro to lamps type and also added some description of basic light set up
for noobies!

when it is advance enough i’ll sent you a copy and you can add some idea smay be

but i’m doing it with openoffice can you read theses files or need to save as doc may be?

Thanks happy 2.5

Drago2010uk

i’have added you name in the script contributers cause you help a lot here!

happy 2.5

oh cool thanks :D, i have open-office i was about download it then i remembered i have linux as well which has it.

not certain i have this one

api pdf for 2.5
do you have link for this ?

Thanks

http://www.blender.org/documentation/blender_python_api_2_56_0/ i just download the pdf version.

some progress has been made with the clay render, a clay render check box now appears and the clay color it changes the clay material color. just need some switching so all objects use the clay material when checked and go back to what it was when not checked.

wait
don’t forget clay is usually used with few objects with no materials

so don’t see this as being usefull for complicated scene
only simple objects not mat then clay makes sense
looks at the yafaray tut on clay rendering for ideas

should i load up lastest update file i have

today i take a break in about 2 hours and enough for this weekend

happy 2.5

hang on ill show you what i have give me like 10mins and ill update this post!

EDIT: link removed

[ATTACH]128382[/ATTACH]isorry 'm not a BGE guy
sorry never really use it a lot still have to learn this part of blender !

her eis latest ver 15 with HC1 and HC2 wokring
but still have to erase theses
but now the color Energie seems ok

can you add to operator clay the function for simple clay so we can try it in menu!

thanks happy 2.5