WIP on lighting set up Script

The approach I took to the formula is, I create a optimum scene with the litith energy set properly… Then it’s simply a matter of translating the lamp settings as a function of the scene size.

well hope it can render well with proper light level to give a nice picture!

let me know when you have new version!

i will try to find the 2 lamps set up to increase the contrast with one lblue amp hemi i think and another point lamp brownish
i have a file somewhere but don’t remember where it is on my HD !

happy 2.5

by the way some clean up needed i think
at top of file there are 2 sets of module import
i think only one is really needed

so select only required modules to clean up a little !

and you can change the filename to something more appropriate may be
like lightsetupv1.py

v1 for version 1 so we can follow vesions and not erase any old file!

thanks

[ATTACH]128148[/ATTACH]ok a file ehre for light box
see file

tell me what you think this could become another light set up may be

i found the high constrast light set up be back later this afternoon!

happy 2.5

i look at this wiki page for a light set up for area lights

http://wiki.blender.org/index.php/Doc:2.4/Books/Essential_Blender/11.1.Lighting:_Hands_on

now almost at the end of page right above the Ambiatn occlusion part it uses an area light with a texture call branche
but i cannot find this texture any idea how to add this texture ?

Thanks happy 2.5

It looks like that tutorial has long been forgotten, as well as the blend file that had the texture in it.

Haha… I can help you…
I just remembered I bought that crappy book years ago, and shelved it because all the directions where missing steps…

here is the blend file from the CD…

nice for the objects may be we can re use it !

but problem is that the lamp with texture is not there!

do you have another file with the lamp for area + Lamp texture
casuemi cannot find this texture called Branches !

it’s possible it’s been remove from 2.49
cause this was way before that i guess in the 1800 may be!LOL

thanks

i began doing sort of a summary of what this could become
tell me what you think

#############

high constrast light set up

1 - First high constrast light set up

First lamp Brownish

Hemi lamp E = 1 R = 0.385 G = 0.212 B =0.212

Hemi lamps are like Sun lamps in that their location doesn’t matter
only their orientation. Hemi lamps do not cast shadows.

Second lamp Bluish

Point Lamp E =1.0 R = 0.509 G = 0.677 B =0.851

2 - From wiki page

First lamp Brownish

Hemi lamp E = 0.4 R = 0.385 G = 0.212 B =0.212
Turn off specularity

Second lamp Bluish

Area lamp
E = 0.25 R = 0.385 G = 0.212 B =0.212
Enable Ray shadow in lamp panel
samples - 4

Note:

Area lamps are directional, so we you need to point it wiht a constraint at the vase /object.
So first select the Lamp, then Shift-RMB select the vase or any other object and press Ctrl-T.
Choose “TrackTo Constraint” from the menu that pops up.
A lamp that is tracked this way will even automatically follow an animated object.

3- Lamp with Lamp Texture Branches

First lamp

Area lamp
E = 0.25 R = 0.385 G = 0.212 B =0.212
Enable Ray shadow in lamp panel
samples - 4

5- Ambient occlusion

Ambient occlusion approximates the lighting conditions of an overcast day, where light comes equally from all directions

Circle 16 light to fake AO ???

6- Day light

Cloudy day
Overcast day
sun set sun rise
Clear night
Overcast night

7- Fluorescent light

8- Camera studio #2 with 3 Area light and wall

see thread here

http://wiki.blender.org/index.php/Doc:2.4/Books/Essential_Blender/11.2.Lighting:_Discussion

9 - Indirect lighting in 2.5 radiosity

10- Environment light in 2.5

11 -Volumetric light in 2.5 / Volume light

Theather light set up with volume smoke

12 - Clay rendering

References

General light set up

http://www.luxology.com/store/SLIK/

Wiki

http://wiki.blender.org/index.php/Doc:2.4/Books/Essential_Blender/11.1.Lighting:_Hands_on

http://wiki.blender.org/index.php/Doc:2.4/Books/Essential_Blender/11.2.Lighting:_Discussion

Exposure and range

http://wiki.blender.org/index.php/Doc:Manual/Lighting/Exposure

Sky dome

http://wiki.blender.org/index.php/Doc:Tutorials/Lighting/Sky_Dome_Radiosity

http://wiki.blender.org/index.php/Doc:2.4/Books/Essential_Blender/11.1.Lighting:_Hands_on
http://wiki.blender.org/index.php/Doc:2.4/Books/Essential_Blender/11.2.Lighting:_Discussion

Speudo area
http://wiki.blender.org/index.php/Doc:Tutorials/Lighting/Pseudo_Area_Light

Ligth set up Meta Andoco

http://home.elka.pw.edu.pl/~mskrajno/tutorials/lighting/general/General.html

##############

THanks happy 2.5

The Textures there, you just have to unpack it…
Here you go…

Attachments


It sounds like allot of work! But it will be great once it’s all said and done!

ok so this is not a special procedural texture it’s an iamge texture added to the lamp! WOW
Thanks for the texture

i found the 2 lamps brown and bluish to enhance contrast

see pic for iceberg in this case it is set inside a sphere which is another type of lgith set up which we could have also!

[ATTACH=CONFIG]128185[/ATTACH]

happy 2.5

no texture image i found it
when you add an emi la,p seems there are other procedural texture for lamps only i guess
see pic and the branches texture is there WOW i forgot about theses!
have to check if theses exist in 2.5 too

[ATTACH=CONFIG]128187[/ATTACH]

strange things is that in first file i did i could not get theses textures

but in the file you gave me i was able to get it !

try it in 2.49

this gives nice shadows on the objects

thanks

[ATTACH=CONFIG]128207[/ATTACH]here is one light set up for 2.5

clay rendering
see pic i can add this one fast
but how do you set up the sky ?

i found a script by someone else
byt not updated to 545 so
here is the file

this would be a nice addition if we include credit at top
and should be easy to add

happy 2.5

began to modify the clay script
but having some prob with some ID error in function which i;m not certain how to debug!
may be you can help!


 
# ##### BEGIN GPL LICENSE BLOCK #####
#
#  This program is free software; you can redistribute it and/or
#  modify it under the terms of the GNU General Public License
#  as published by the Free Software Foundation; either version 2
#  of the License, or (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software Foundation,
#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
# Modified by Rickyblender for version 34545
# and added in tool pro for new Light setp up script
#
 
 
import bpy
 
from bpy.props import BoolProperty
 
 
bpy.types.Scene.Clay = BoolProperty(
  name="Active Clay", 
  description="Use Clay Render")
 
bpy.context.scene.Clay  = False
 
 
 
 
def search():
 mats = bpy.data.materials
 print (' mat =',mats,' len =',len(mats))
 for j in mats:
  print (' mat[',j,'] =',j)
 
 
 Find = False
 id = None
 
 for m in mats:
  if m.name == "Clay_Render":
   id = m
   Find = True
   print (' mat for render  =',m)
   break
 return id
 
 
def create_mat():
 id = search()
 if id == None:
  id = bpy.data.materials.new("Clay_Render")
  print ('id  in create mat  =',id)
  #diffuse
  id.diffuse_shader = "OREN_NAYAR"
  id.diffuse_color = 0.800, 0.741, 0.536
  id.diffuse_intensity = 1
  id.roughness = 0.909
  #specular
  id.specular_shader = "COOKTORR"
  id.specular_color = 1, 1, 1
  id.specular_hardness = 10
  id.specular_intensity = 0.115
 
 
 
class RenderButtonsPanel():
 bl_space_type = 'PROPERTIES'
 bl_region_type = 'WINDOW'
 bl_context = 'render'
 
class RENDER_PT_Clay(RenderButtonsPanel, bpy.types.Panel):
 bl_label = 'Clay Render'  
 
# bpy.types.Scene.Clay = BoolProperty(name='Active Clay', description='Use Clay Render', default=False)
 
 def draw_header(self, context):
  layout = self.layout
  layout.label(text="", icon='MATERIAL')
 
 def draw(self, context):
  layout = self.layout
  sd = context.scene
  rnd = context.scene.render
  rnl = rnd.layers.active
 
  create_mat()
 
  split = layout.split()
  col = split.column()
 
  col.prop(sd, "Clay",)
 
  col = split.column()
 
  id = search()
  col.prop(id, "diffuse_color", text="Clay Color:")
 
  App_Clay = context.scene.Clay
  if App_Clay:
   rnl.material_override=id
  else:
   rnl.material_override=None
 
def register():
 pass
 
def unregister():
 rnd = bpy.context.scene.render
 rnl = rnd.layers.active
 rnl.material_override=None
 pass
 
if __name__ == "__main__":
 register()
 
 
 

get error at 63 in function

File “render_clayrj1.py”, line 95, in draw
File “render_clayrj1.py”, line 63, in create_mat
RuntimeError: Writing to ID classes in this context is not allowed: Clay_Ren
Material datablock, error setting Material.diffuse_shader
location:<unknown location>:-1

didi not know that could get ID error in function !

i tested first function and work ok
then in second one get eeor when assigning mat !

Thanks happy 2.5

did another test on the function for adding mat and it’s working fine
but not in the script
problem may be with the new panel!

now we don’t need to do it that way we can aadd the clay button inside our own tool pro panel instead!
so no need to add a panel in render panel !

then it should work fine i guess
i’ll try to work again tomorrow morning to add a new menu item for this clay render !

happy 2.5

this seems like it’s going work out nicely :D,

here, i had a quick look at your clay script here’s the change :smiley: now it adds clay render to materials :smiley: but doesn’t set them???


def create_mat():
    id = search()
    if id == None:
        id = bpy.data.materials.new("Clay_Render")
        #diffuse
        Material.diffuse_shader = "OREN_NAYAR"
        Material.diffuse_color = 0.800, 0.741, 0.536
        Material.diffuse_intensity = 1
        Material.roughness = 0.909
        #specular
        Material.specular_shader = "COOKTORR"
        Material.specular_color = 1, 1, 1
        Material.specular_hardness = 10
        Material.specular_intensity = 0.115

i know i did another sript for this mat setting and it works fine
so there is another error may be cause of panel error

but in any case i think we gone put this new button inside the tool panel instead tolmorrow

anyway here is the new version with the new menu clay added in

happy 2.5

ok added some more menu selection for daylight sub menu
so when you select day light it will show another sub menu for type of day render you want
have a look

note clay is not implemented yet has to transfert button and mat setting to the tool pro panel tomorrow

happy 2.5

ah cool :D, how did you get the types of menu/ buttons/ sliders etc…?