View topic - prism and light scattering

prism and light scattering

Post here general questions about usage of YafaRay and about the Blender Exporter UI

prism and light scattering

Post Sat Sep 12, 2009 6:23 pm

i did a small scene in blender with a prism and tried to get the raindbow effecft on the face of a cube


now i'v added some area light on each side to give some ambiant lignt


what else can i do to get the color onf the rainbow through the prosm onto the cube?

there should be a way but not easy to get i guess

appreciate any help on this

Thanks
happy blendering
Attachments
z1.JPG
rickyblender
 
Posts: 66
Joined: Sun Dec 28, 2008 8:15 pm

Re: prism and light scattering

Post Sat Sep 12, 2009 8:29 pm

You need to add some dispersion to your prism material (http://www.yafaray.org/documentation/us ... rial#Glass).

Here's a quick test with directional light (Direct lighting + caustics, 1.000.000 photons, dispersion power=0.2, IOR=1.4):

Prism2.png
Quick and dirty example

I can post the .blend if you wish.
IkariShinji
 
Posts: 176
Joined: Tue May 05, 2009 6:57 pm

Re: prism and light scattering

Post Sun Sep 13, 2009 3:34 pm

i would definitively like to ahve a sample file
and it could also be used by other peoples i guess

this has been ask a few times in blender's forum this year
causeit canot be done in blender only yafaray

which is great


your pic looks very nice prism effect

thanks for the help
rickyblender
 
Posts: 66
Joined: Sun Dec 28, 2008 8:15 pm

Re: prism and light scattering

Post Sun Sep 13, 2009 4:14 pm

And here's your .blend. I didn't find the file from yesterday, so I rebuilt it from scratch.
Result therefore looks a little bit different...
Prism.zip
Prism.blend
(309.89 KiB) Downloaded 846 times
IkariShinji
 
Posts: 176
Joined: Tue May 05, 2009 6:57 pm

Re: prism and light scattering

Post Sun Sep 13, 2009 7:45 pm

thanks

i'll try to study how to withnthis file

and tried to make a new oneand post it here
so people can have another way to render it

hopefully before tudady thsi week

happy blendering
rickyblender
 
Posts: 66
Joined: Sun Dec 28, 2008 8:15 pm

Re: prism and light scattering

Post Sun Sep 13, 2009 8:10 pm

i did a first test
i addes s port light to light up the prism
and also a gen lamp to light the scene a little

see pic


i got this white dot near the rainbow don't know why?

also the rainbow does not have any mauve or violet
any idea why it's not giving much blue/violet light ?


Thanks
Attachments
zpr2.jpg
rickyblender
 
Posts: 66
Joined: Sun Dec 28, 2008 8:15 pm

Re: prism and light scattering

Post Sun Sep 13, 2009 8:31 pm

As far as the white dot is concerned: This is the bottom portion of the directional light beam. It shines through because the prism is hovering a little above the ground. Lower the prism to have it "lying" directly on the bottom of the box and the white dot disappears.

I think the violet tones are hard to see because of the overall brightness of your scene. The violet is subtle, it perishes under the scene's lighting. You could try to increase the power of the directional lights to enhance the effect.
IkariShinji
 
Posts: 176
Joined: Tue May 05, 2009 6:57 pm

Re: prism and light scattering

Post Mon Sep 14, 2009 2:41 pm

ome more detail

any special reason why you set 2 spot light instead on one to generate the
color rainbow ?

i got to try to set a lens to look at it

don't know if that will work fine !

thanks
rickyblender
 
Posts: 66
Joined: Sun Dec 28, 2008 8:15 pm

Re: prism and light scattering

Post Mon Sep 14, 2009 3:08 pm

These are no spot lights, but directional lights, which means that they produce parallel light rays.
If I had used only one of them (parallel to the floor) I would only have got the prismatic effect on the wall, but not on the floor. So I use two directional lights: One produces the rainbow pattern on the wall, the other (slightly tilted downward) the rainbow pattern on the floor.
IkariShinji
 
Posts: 176
Joined: Tue May 05, 2009 6:57 pm

Re: prism and light scattering

Post Tue Sep 15, 2009 9:44 am

IkariShinji wrote:These are no spot lights, but directional lights, which means that they produce parallel light rays.
If I had used only one of them (parallel to the floor) I would only have got the prismatic effect on the wall, but not on the floor.


It sounded a little strange, so I made some tests to try to get the whole effect using only one light.
I founded that using a bigger radius for the directional light it is possible to get the diffusion both on the wall and on the floor.

Of course you have to put the light in a box bigger than the diameter of the light if you don't want it to light all the room.

Here are the file and the image.
Attachments
Prism-MarcoA.zip
(275.16 KiB) Downloaded 614 times
Prism-MarcoA.jpg
Last edited by MarcoA on Wed Sep 16, 2009 7:15 am, edited 1 time in total.
User avatar
MarcoA
 
Posts: 390
Joined: Mon Aug 27, 2007 2:19 pm
Location: Italy

Re: prism and light scattering

Post Wed Sep 16, 2009 12:19 am

Here are some shots i was working on recently and the .blend
The Outline of the Prism is done by rendering the prism to RGBA with wire and Shadeless settings on in the blender internal renderer and then layering the images in Gimp
Th camara is orthographic
Attachments
prism.zip
(46.62 KiB) Downloaded 597 times
finished split.png
finished.png
LAG
 
Posts: 3
Joined: Mon Sep 14, 2009 3:01 pm

Re: prism and light scattering

Post Wed Sep 16, 2009 2:45 am

@ MarcoA

you idnicated that the file was included but i don't see

can you upload please

i would like to study what you did - very interesting way of doing it

and nice render too

Thanks
rickyblender
 
Posts: 66
Joined: Sun Dec 28, 2008 8:15 pm

Re: prism and light scattering

Post Wed Sep 16, 2009 7:16 am

rickyblender wrote:@ MarcoA

you idnicated that the file was included but i don't see


Sorry, that's because I tried to upload the unzipped file.
I edited the original post and added the file.

Thank you.
User avatar
MarcoA
 
Posts: 390
Joined: Mon Aug 27, 2007 2:19 pm
Location: Italy

Re: prism and light scattering

Post Wed Sep 16, 2009 6:42 pm

thanks Marco

nice rendering

how come you can see the render being done may be 10 times before getting the last render?


it giving a very strong color rainbow effect - very nice render


now i still don't udnerstand why we don't see more violet or purple color at the end of the spectrum

i mean this light source shold show some purple color but we don't see it ?
any idea why it's not showing this violet color in rainbow ?


happy blendering
rickyblender
 
Posts: 66
Joined: Sun Dec 28, 2008 8:15 pm

Re: prism and light scattering

Post Thu Sep 17, 2009 8:17 am

rickyblender wrote:thanks Marco
how come you can see the render being done may be 10 times before getting the last render?


I'm playing with adaptive sampling tecnique as explained in the guide. :wink:


it giving a very strong color rainbow effect - very nice render


Thank you! :oops:


now i still don't udnerstand why we don't see more violet or purple color at the end of the spectrum


I think that the result is not so different by the actual sunlight spectrum as showed, for example, here:

http://commons.wikimedia.org/wiki/File: ... _prism.jpg
Image

The sunlight is full of red and yellow light and poor in blue and violet:
Image

I also tried to apply volumetrics but I discovered that the white light is scattered, while the light getting out from the prism is not. :cry:
User avatar
MarcoA
 
Posts: 390
Joined: Mon Aug 27, 2007 2:19 pm
Location: Italy

Next

Return to General Questions and Blender Exporter UI



Who is online

Users browsing this forum: No registered users and 3 guests