Page 1 of 1

Godrays! How?!

Posted: Thu Mar 06, 2014 12:11 pm
by NVN
Hi there!

plz help me...i would like sunbeams\godrays like this picture.
http://render.otoy.com/newsblog/wp-cont ... neFog4.jpg

how can i get it?
I use the C4D Plugin

what i know to get volumetrics is:

1.My Camera inside of a sphere with inverted normals
2.My scene inside of a box with a fog Material.

but i dont get any godrays.....

Re: Godrays! How?!

Posted: Thu Mar 06, 2014 7:21 pm
by TBFX
NVN wrote:1.My Camera inside of a sphere with inverted normals2.My scene inside of a box with a fog Material.
Hi NVN,

Actually in Octane you need to have your camera outside your fog volume geometry with the normals pointing out. Also for an entire scene full of fog you can just place a small plane just in front of the camera with it's normal pointing toward the camera, attach your fog shader to this and so long as it fills the view it will render fog for the whole scene.

It looks like that image however used a volume that was only a certain height to get that low lying mist look. Also I'm not sure about the C4D plugin but in the Maya plugin we only just got access to the phase function in the scattering medium node (haven't tested it yet) which is useful for back lit fog effects like this.

T.

Re: Godrays! How?!

Posted: Fri Mar 07, 2014 11:00 am
by NVN
thx ...
i think its in c4d the same like Maya.
But with this method i get only a fog....no godrays..

Re: Godrays! How?!

Posted: Fri Mar 07, 2014 6:21 pm
by ROUBAL
Hi NVN,
For my own, I put the camera Inside a sphere. Normals of the sphere are pointing inward, meaning that the Medium (fog material) is outside the sphere. The fog material is applied to the sphere.
In the node graph, the camera and the sphere share the same Position node. So, when moving the camera in the 3D space, the sphere remains parented to it.

Adjusting the scale of the sphere allows to set up the distance where the fog starts to be visible from the camera.

Every parameter counts. Use the Direct Light Kernel. I haven't got a result so far with other kernels (they make the atmosphere very dense).

The shader of the sphere must be of Specular type, Index = 1.000. Opacity = 1.000. Fake sShadosw parameter seems to have few importance, maybe none at all.
First, set to Zero the alpha of the Medium material (your sphere material). And then, put your sun (Daylight system or other light source) at a place where you think that the rays should appear. It should be behind some sharp objects making neat shadows.

Once it is done, set again the alpha of the sphere material to 1.

If you are using the Daylight system, the turbidity of the sky should be around 2.5-3.5. This turbidity is mixed with the Scattering effect.

You can click everywhere in the screen, the selected material is the material of the sphere (if there is nothing in the sphere volume). So it is easy to switch to its settings.

In my example, the sphere diameter is set to 20 (20m).

Leave absorption to 0.000. you will play with it later if it can bring an interesting effect for you (darken : night effect for example).

Start with very low Scattering values :0.01 or 0.02 often work fine.

Scattering direction is very important and defines a direction in which the diffracted light onto the atmosphere reaches your eye. So it is different than the actual direction of the rays.

Scale ajusts the strength of the effect in combination with Scattering.

When the effect is OK, if you want to see more the background, the global effect can be also adjusted by reducing the density of the atmosphere with the Opacity slider of the material.

This also reduces the visible rays.

Finally, you can play a bit with contrasts using the Gamma of the Imager.

Re: Godrays! How?!

Posted: Fri Mar 14, 2014 9:23 pm
by Layla_Bressler
It is possible to do that inside 3ds max with the plugin?

Need badly god´s rays on my recent work...

Thx a lot

Layla

Re: Godrays! How?!

Posted: Fri Mar 14, 2014 9:59 pm
by aoktar
http://render.otoy.com/customerdownload ... amples.zip

for c4d samples,
pls check tree-fog-bepeg4d and octanefog folder