Forums

You are not logged in.

#1 2007-01-08 05:58:47

dinosalt
New member
Registered: 2007-01-08
Posts: 5

Reflection/refraction problem

Heloo!

I am trying to render a scene with raytraced reflections with 3Delight. I have either tried renderinf via Mayaman or 3delight for Maya. I set Raytrace "on" in Maya render settings and i keep all default Mayaman settings. On the other hand, GI is performed fine. Also a glass shader is not even see-through. I get just a black colour.

Any suggestion?

Offline

 

#2 2007-01-08 07:24:43

baopao
Member
From: milano
Registered: 2007-01-08
Posts: 249
Website

Re: Reflection/refraction problem

Try this...on 3DforMaya2 disable the flag "Doble Sided" on GeoAttribs of the glass object.

Offline

 

#3 2007-01-08 13:02:40

aghiles
3Delight Developer
Registered: 2007-01-03
Posts: 1081
Website

Re: Reflection/refraction problem

It would be great If you can send us a small RIB + shader so we can take a look at your problem. In 3Delight For Maya simply use "Save RIB" instead of "Render" in the render pass settings to save your scene into a file ...

Thanks,
- Aghiles.

Offline

 

#4 2007-01-08 14:12:54

dinosalt
New member
Registered: 2007-01-08
Posts: 5

Re: Reflection/refraction problem

Yes, for sure...
Rib/shader  translation was done by Mayaman, which normally should be sufficient.
http://rapidshare.com/files/10855866/re … t.rar.html

Offline

 

#5 2007-01-09 12:17:03

dinosalt
New member
Registered: 2007-01-08
Posts: 5

Re: Reflection/refraction problem

I also encountered such problem on 3Delight 5.0. I must be doing something very wrong. Is someone using 3Deligt along with Mayaman to help me?
My project will will blow to garbage unless i find some solution...

Offline

 

#6 2007-01-09 17:47:14

bertrand
Member
From: Vancouver
Registered: 2007-01-09
Posts: 324
Website

Re: Reflection/refraction problem

I can't help you with Mayaman, but I have raytracing working with 3DFM.

On your geometry that must be reflected, make sure that, in the DelightAttribsNode, the "visible to reflections" in the "visibility" section is checked.

And in your render pass, make sure that "raytrace max depth" is not equal to 0 ("quality" section).

And attach a surface shader that is reflective, to the proper surface. Note that the "hyperShade shaders" don't support raytracing in the current version (3Delight 6.0.4) unless you modify the script for their generation.

Hope it helps.

Bertrand

Offline

 

#7 2007-01-10 15:21:26

dinosalt
New member
Registered: 2007-01-08
Posts: 5

Re: Reflection/refraction problem

Thanks Bertrand for your reply.

if "hyperShade shaders" are not currently supporting raytracing, then should i use renderman shaders instead? I tried a simple blinn and it wont support raytracing (reflections/refractions) but yet it supports ambient occlusion. Lack of direct support of raytracing  can be quite a drawback...

Offline

 

#8 2007-01-10 17:53:06

bertrand
Member
From: Vancouver
Registered: 2007-01-09
Posts: 324
Website

Re: Reflection/refraction problem

I know, it is a shame 3DFM is not currently supporting the raytracing parameters of the surface materials. But I know Olivier is working on that and will come up with a nice implementation very soon.

In fact it is rather simple to modify the include files for raytracing support (with hyperShade shaders).
Go to your delight installation directory / maya / rsl. In there are the include files that the DL_translateMayaToSL.mel will use to create the rsl shader. You will find, for example blinn.h.
Open it.
The first section ("begin inputs") is used by the DL_translateMayaToSL.mel to know which parameters to use.
Add "float reflectivity" at the end of this section, just before "end inputs".
Now, in the procedure parameters, you fill find an "Inputs" section. Add "float i_reflectivity;" to this section.
Now, you can use the i_reflectivity in the code (which value will be taken from the "reflectivity" parameter). e.g.
if (i_reflectivity != 0)
    color reflectColor = trace (etc.);

Note that I haven't tried "only" that, so I am not sure it is that simple. The way I set it up, is that I also modified the DL_translateMayaToSL.mel to be able to customize my AOVs (add ambient, diffuse, specs, etc). But as I remember, this workflow should work.

Bertrand

Offline

 

#9 2007-01-11 09:37:21

bertrand
Member
From: Vancouver
Registered: 2007-01-09
Posts: 324
Website

Re: Reflection/refraction problem

It occured to me that you, or another reader, may not be familiar with RSL. So I thought I could provide a more detailed solution that you could copy-paste.

In your surface-type include files (anisotropic.h, blinn.h,lambert.h,phong.h and phongE.h),
1-insert before "end inputs":
    float reflectivity

2-insert before "    // Outputs:":
    float i_reflectivity;

3- insert before "o_outColor = i_color * (Ia + Id)  + Itr + i_incandescence + Is;":
    // reflectivity
    if (i_reflectivity != 0)
    {
        vector reflDir = reflect (In, Nf);
        color reflectColor = i_reflectivity * trace (P, reflDir);
        Is = Is + reflectColor ;
    }
   
Note that for the phong.h and phongE.h, the specular component (Is) is named differently. You will have to adjust that.

Note also that, if you assign, in the hyperShade, a texture map for the reflectivity parameter, and if this texture is a grayscale (which should logically be), you have to connect the R component to the reflectivity parameter. Not the outAlpha (by default). This will be fixed in the next release of 3DFM.

Offline

 

#10 2007-01-11 13:57:53

aghiles
3Delight Developer
Registered: 2007-01-03
Posts: 1081
Website

Re: Reflection/refraction problem

Hello!

dinosalt wrote:

... Lack of direct support of raytracing  can be quite a drawback...

This will be fixed in our next release which is scheduled in about two weeks.

- Aghiles.

Offline

 

#11 2007-01-12 04:15:31

dinosalt
New member
Registered: 2007-01-08
Posts: 5

Re: Reflection/refraction problem

thanks bertrand and all 3Delight Team, once more. I shall wait for  the next release.
Can you check the ribs created with Mayaman, i can't also get any reflections/refractions either with 3Delight 5.0 - 6.0 and i can guess out that there is some problem with raytracing and 3Delight in general.

What's more a maya glass shader translated by Mayaman 1.2.61 is rendered as black. Not even transparent.

Offline

 

Board footer

PunBB is © Copyright 2002–2005 Rickard Andersson

You are here: Resources » Forums
Follow us on Twitter
© 2006-2011 dna research. All Rights Reserved.
Trademarks & Copyrights Notices