RenderMan & RISpec >> 3Delight: indirectdiffuse()

by Giuseppe Randazzo » Thu, 20 Oct 2005 03:02:58 GMT

Hello to all,
I'd like to use the indirectdiffuse() shadeop
of 3dl, but I don't have any example to start.
Is it possible with this function to obtain nice
GI effects like VRay or Maxwell renderer?
(and without multiple photon map/beauty pass like Prman/pixie ?)
I tried in a naive attempt like this..

surface
indirect( float Ka = 1, Kd = 1; float samples=32)
{
normal Nf;
Nf = faceforward( normalize(N), I );
Oi = Os;
Ci = Cs * ( Ka*ambient() + Kd* indirectdiffuse(P, Nf, samples) );
Ci *= Oi;
}

.. with a directional light as main light source.
all surfaces was marked for "trace",
but ALL was solid black!..
..hem I doubt that something could be wrong.. :)
Any help?
thanks in advance.

G.





RenderMan & RISpec >> 3Delight: indirectdiffuse()

by owenr » Sat, 22 Oct 2005 03:23:51 GMT


Hi Giuseppe,

In case you don't know, 3Delight now recognizes the Ns (shading normal
of the surface being illuminated) variable inside light shaders, so you
might want to try indirectdiffuse() in a light shader to automatically
produce colour bleeding when standard surface shaders, such as "matte",
are used.

However, there is a valuable lesson to learn here in your experiment
with indirectdiffuse() in a surface shader.
You say the scene contains one lightsource, a directional light.
I will make an important assumption that you are attaching the
experimental shader to all geometry in the scene.
The shader provides no self-illumination and has no function, such as
diffuse(), to gather direct illumination from the lightsource, so
nothing will be illuminated by your directional light, so there will be
no light to be gathered by the indirectdiffuse rays, so all objects
will be rendered black.
One solution is to change:
Ci = Cs * ( Ka*ambient() + Kd* indirectdiffuse(P, Nf, samples) );
to:
Ci = Cs * ( Ka*ambient() + Kd*(diffuse(Nf) + indirectdiffuse(P, Nf,
samples)) );

I hope that's right because I don't have 3Delight installed at the
moment.

Owen

RenderMan & RISpec >> 3Delight: indirectdiffuse()

by Giuseppe Randazzo » Sat, 22 Oct 2005 07:46:57 GMT

Hi Owen,
Your explanation has been precious!
I'm running now a test render with the modified shader
and it works well!! 3Delight is fast and with a low
grain level, I will implement the light version,
thanks again,

Giuseppe
///////////////////////////////////////////////////
surface
indirect( float Ka = 1, Kd = 1; float samples=16;)
{
normal Nf;

Nf = faceforward( normalize(N), I );

Oi = Os;
Ci = Cs * ( Ka*ambient() + Kd*(diffuse(Nf) + indirectdiffuse(P, Nf,
samples)));
Ci *= Oi;
}
///////////////////////////////////////////////////


"owenr" < XXXX@XXXXX.COM > ha scritto nel messaggio

Similar Threads

1. indirectdiffuse in 3Delight lightsource shader - problem? - RenderMan & RISpec

2. Lightsource shader using indirectdiffuse for 3Delight?

The 3Delight documentation suggests using indirectdiffuse() in a 
lightsource shader, but I'm unable to get it to work - I just get 0 
returned.

This is my lightsource shader:

light idlight(
   color lightcolor = 1;
   float intensity = 1; float samples = 64; float __nonspecular = 1; )
{
	normal shading_normal = faceforward( Ns, I );

	illuminate( Ps + shading_normal )
	{
		Cl =  indirectdiffuse( Ps, normalize(shading_normal), samples ) * 
lightcolor * intensity;
	}
	
}

If I use the other form of indirectdiffuse, with an envmap, it works.

Any ideas?

Simon.

3. ANN: 3Delight 9.0 and 3Delight For Maya 5.0 - RenderMan & RISpec

4. [3Delight] bucketorder-Bug?

Hi,

if i use the Option "render" with bucketorder, the Image saved on Disk is
always corrupt. Am i doing something wrong, or is this a bug?

Option "render" "string bucketorder" "circle"
Display "image.tif" "file" "rgb"
Display "+image.tif" "framebuffer" "rgb"

Greetings,
nurdogan


5. [3Delight] Convert Texture in a RIB-File - RenderMan & RISpec

6. [3Delight] External call

Hi,

I call 3Delight trough a C++ Code via "renderdl test.rib". Since now, i used
JPG for the textures and everything was ok. (Even if i start "renderdl
test.rib" manually with the dosbox) Now, i thought about to support
alpha-textures and changed the Texture-Output-Format in my C++Code to TIF.
Now, when i call "renderdl test.rib" via the C++ Code, an error message
coming up, that tell me something like: "tdlmake.exe has an unhandled
exception....". But when i call the same File with "renderdl test.rib"
manually through the Dosbox, it works without any problems. A strange
problem i couldnt solve.

Greetings,
Nurdogan




7. ANN: 3Delight 8.0 (Midnight Express) - RenderMan & RISpec

8. ANN: 3Delight 8.5 and 3DFM 4.5

Hello,

3Delight 8.5 and 3Delight For Maya 4.5 are available for download at
www.3delight.com. Here is a list of the most important  features and
improvements:

3Delight For Maya
  * Introducing the 3Delight Relationship Editor. This new
    user interface replaces the now deprecated Shader
    Manager and Attribs Node Manager and makes it much
    easier to view, assign and modify 3DELIGHT shaders and
    attributes, in a centralized location. The usability
    of shader and attribute collections is substantially
    improved thanks to this same feature and one can
    inspect, for each pass and at a glance, what
    attributes and shaders are in effect.
  * Introducing "Pass Templates" It is now possible to
    save a given render pass as a template and create new
    passes based on existing templates.
  * A new "round edge" features enables automatic edge
    rounding of sharp geometric features. Using this
    feature, one can round edges at render time (such as a
    table edge) instead of performing a costly
    modeling-time operator.
  * Added a icing cameraattribute in the geometry
    attributes node (in the ulling and Dicing
    section). This features is useful to stabilize popping
    displacement during animation.
  * Updates to HyperShade:
       - The "useBackground" node is fully supported.
       - Checker node with much better anti-aliasing.
       - 3D texture nodes now use texture reference
         objects if these are exported.
  * Scene export has been optimized and runs twice as fast
    for certain scenes.
  * The following MEL bindings have been added: `RiBound',
    `RiDetail', `RiDetailRange', `RiOrientation' and
    `RiShadingInterpolation'.

3Delight Performance
  * An overall speed increase of 20% is to be expected on
    all scenes thanks to SSE2 optimizations.
  * Ray-tracing speed on displaced surfaces has been
    substantially improved. The increase can reach tenfold
    with large displacement.
  * Cubic curve primitives take up to 20% less memory and
    can render up to 50% faster when using Ray-tracing.
  * Improved performance of RIB reading on Windows to
    match that of other operating systems.
  * Procedurals generated through `RiProcRunProgram'
    require much less peak memory, especially for very
    large primitives.

Improvements to multi-process rendering include:
  * Multi-machine rendering is fully supported on Windows
    platforms.
  * Baking 3D point-clouds using many machines is now
    possible.
  * "Ri Filters" are supported in multi-host rendering.
  * Improved behaviour with unresponsive or crashing
    rendering hosts.

Pipeline & API
  * Array support has been added to the Ptc API. This also
    means that `texture3d()' and `bake3d()' accept array
    parameters.
  * Helper functions have been added to the Display Driver
    API.

Shader Compiler
  * 3Delight now supports co-shaders (as per RSL 2.0) and
    completes the implementation of shader objects.

Thanks,
  -- aghiles

www.3delight.com