Page 1 of 3

Transparent Image Based Emiters Behaviour

Posted: Sat Dec 08, 2012 3:45 am
by Ernesto
Hello,

Here I have compiled a series of images, in order to make a test:

The first image, shows a glass (not AGS) and two prismatic lightsources.
In the second image they were set as "hidden from secondary rays"
In the third image, the lightsources were set as "hidden from camera"
In the fourth they were set both as "hidden from camera" and "hidden from secondary rays"

Up to here everything seems to work as expected.

Image

In the 5th image the glass material was replaced by a transparent emiter material based in image (mxi)
In the 6st image the two emiters were set as "hidden from camera" and "hidden from secondary rays"

But in the last image, we can see part of the back lightsource through the transparent material.

E

Re: Transparent Image Based Emiters Behaviour

Posted: Sat Dec 08, 2012 10:50 pm
by Ernesto
Tom has solved this too.
As far as I understand it was the way the emiter material was build...
I can copy step by step his sample and got it working... but cannot explain how or why.

Tom´s working material:
Image

Wrong Material:
Image


I tried several times to create such a material from scratch unsuccesfully.
But If I modify Tom´s version, changing the maps, it works ok!
As the following:
Image

Evidently I am missing something but cannot find what...


Ernesto

Re: Transparent Image Based Emiters Behaviour

Posted: Sat Dec 08, 2012 11:47 pm
by Ernesto
Well I give up!
Here i am posting the two materials:

The one at the left is NOT working, I tried to copy Tom´s version from scratch unsuccesfully.
The material at the right is Tom´s version (of course working perfectly) at which I deleted the displacement layer to make it simplier, and make easier the comparison, and changed the maps.

Image

I wonder the diference.
A few moments later: the only difeence I could find was the atenuation units in one case nm and in the other m. So I edited the wrong material to match the right material but it didn´t worked.

E

Re: Transparent Image Based Emiters Behaviour

Posted: Sun Dec 09, 2012 2:22 am
by tom
Because, what you call "Hidden from secondary rays" is actually "Hidden from Reflections/Refractions" as clearly denoted in Studio UI. In the failing material the base BSDF is ghost (T=255 and Nd=1) but, in the suggested material I intentionally use a high attenuation dielectric (T=254, Atten=high and Nd=1). Doing so makes hiding something from reflections/refractions available. In short, seeing something through ghost is not a refraction because ghost is a special condition for the engine. Ghost is hidden from "hidden from" :)

Re: Transparent Image Based Emiters Behaviour

Posted: Sun Dec 09, 2012 4:36 am
by Ernesto
Ahhhhhh! :shock:
Thanks for the crash course on Materials!
I wish I could be a better student

E

Re: Transparent Image Based Emiters Behaviour

Posted: Sun Dec 09, 2012 9:41 pm
by Ernesto
I have one more question for you Tom:

I have tried two diferent versions of your material, one using mxi as emiter texture, and other using a plain emiter instead.
Both materials based in your construction works much better compared to all I have tried before in V2.7
For instance in the maya preview scene it renders transparent as it should be, while the other materials I have tried rendered black, making preview more difficult.
Both materials works perfetly when a hidden from camera and hiden from secondary rays object is behind them.
Nevertheless I have found a diference between the plain emiter vs emiter texture:
The material and object channels works diferent:
In the first case (plain emiter) it renders invisible in both the object and material channels as it should be.
In the second case (image based emiter) it renders as an opaque object in the material and objects channels.

This seems to be related to the fact that in the second case the material is NOT totally transparent, since it seems to be receiving light from other sources as a kind of glass. I can see also reflections and refractions that deforms what is behind such a material.
I am having strange artifacts like black shapes on the surface in which this material is assigned.
Additionally it takes ages to clean the noise, and to render any detail that should be see through it.
Now that I am rendering more detailed images I can see that It really looks bad!
I am sure there should be a way to create such a material without those problems...

In the following image, you can see the artifacts (yellow arrows) and the hard to render areas corresponding to the image emiter transparency (Red Arrows)

Image

In Maxwell V1.7 your version of such a material worked in a diferent way. I was having certain opacity, but the material channel and the object channel rendered almost totally transparent (with the exception of the most dense sparks area) . I assume that the transparency in Maxwell V1.7 was similar to the first case of transparent emiters not based in images. In V 1.7 I had not artifacts nor strange deformations due to refractions being produced inside the object with the transparent emiter material.

The next series of images were created with V 1.7 using Tom´s materials.
They are not perfect, but they rendered without noise nor artifacts.
All these samples were rendered at SL 12, but there is not the strong noise that appears in V2.7.

Image

Image

Image


I wonder if you could give me a hint on how to achieve a similar behaviour as the first case, but using image based emiters.
The main problem seems to be the transparency.
Thanks in advance

Ernesto

Re: Transparent Image Based Emiters Behaviour

Posted: Mon Dec 10, 2012 1:36 pm
by tom
Ernesto wrote:For instance in the maya preview scene it renders transparent as it should be, while the other materials I have tried rendered black, making preview more difficult.
As I said, the preview engine does not support all these features. It's better from now on you should only rely on the production engine for the advanced transparency effects.
Ernesto wrote:Nevertheless I have found a diference between the plain emiter vs emiter texture:
The material and object channels works diferent:
In the first case (plain emiter) it renders invisible in both the object and material channels as it should be.
In the second case (image based emiter) it renders as an opaque object in the material and objects channels.
It's not about emitter being plain or image based. The difference comes from making it out of ghost or dielectric. If T<>255 and Nd<>1 it will not be invisible in Material and Object Id channels. So at worst case, you need to hide them and make a separate Id pass, easily.
Ernesto wrote:This seems to be related to the fact that in the second case the material is NOT totally transparent, since it seems to be receiving light from other sources as a kind of glass.
Right on.
Ernesto wrote:I can see also reflections and refractions that deforms what is behind such a material.
Weird. It's not possible if Nd=1.00
Ernesto wrote:I am having strange artifacts like black shapes on the surface in which this material is assigned.
It's possible when the geometry is not planar. Because, it's basically a glass with Nd=1 and any secondary ray bounce on itself will be regarded as an outgoing ray. It's like making a glass cube with missing faces and expect it to render correctly.
Ernesto wrote:Additionally it takes ages to clean the noise, and to render any detail that should be see through it.
Now that I am rendering more detailed images I can see that It really looks bad!
It's quite normal because, in opposite to the ghost, it additionally calculates reflection and refraction on these surfaces.
Ernesto wrote:In Maxwell V1.7 your version of such a material worked in a diferent way. I was having certain opacity, but the material channel and the object channel rendered almost totally transparent (with the exception of the most dense sparks area) . I assume that the transparency in Maxwell V1.7 was similar to the first case of transparent emiters not based in images.
Old channels were not taking everything correctly into account. Since then, so many revisions have been done.
Ernesto wrote:In V 1.7 I had not artifacts nor strange deformations due to refractions being produced inside the object with the transparent emiter material.
I do not expect such a difference between versions. Could you illustrate this case with a simple scene?

Re: Transparent Image Based Emiters Behaviour

Posted: Mon Dec 10, 2012 10:38 pm
by Ernesto
tom wrote:
Ernesto wrote:In V 1.7 I had not artifacts nor strange deformations due to refractions being produced inside the object with the transparent emiter material.
I do not expect such a difference between versions. Could you illustrate this case with a simple scene?
Yes, I did already. It is the image with the big black title Artifacts.

tom wrote:
Ernesto wrote:I can see also reflections and refractions that deforms what is behind such a material.
Weird. It's not possible if Nd=1.00
I know it should be impossible, but You can see it for yourself in the same image with the yellow arrows. It is in the 3rd and fourth arrow, counting from left to right. I can see that it works OK in V1.7, but not in 2.7. I would like at least the same performance but not a worse performan in the newer version.

tom wrote:
Ernesto wrote:For instance in the maya preview scene it renders transparent as it should be, while the other materials I have tried rendered black, making preview more difficult.
As I said, the preview engine does not support all these features. It's better from now on you should only rely on the production engine for the advanced transparency effects.
I was not refering to the Maxwell preview, but to the Maya shaded scene window
tom wrote:
Ernesto wrote:Additionally it takes ages to clean the noise, and to render any detail that should be see through it.
Now that I am rendering more detailed images I can see that It really looks bad!
It's quite normal because, in opposite to the ghost, it additionally calculates reflection and refraction on these surfaces.
Independently if it is normal or not, In V1.7 there is no noise, but in 2.7 there is a strong noise.
I wish the new version to be an improvement of the previous and not the oposite
The noise I am talking about in the sparks material, was not present in V1.7 at all! You can see it in this image created with V1.7, it is only SL 12 and has no noise as you can see arround the blue sparks material:
Image
On the contrary In V2.7 I rendered up to SL 16 and it still showed strong noise and incomplete (dark) area in the sparks material area.
tom wrote:
Ernesto wrote:I am having strange artifacts like black shapes on the surface in which this material is assigned.
It's possible when the geometry is not planar. Because, it's basically a glass with Nd=1 and any secondary ray bounce on itself will be regarded as an outgoing ray. It's like making a glass cube with missing faces and expect it to render correctly.
I am talking about the diference between V1.7 and V2.7, I am having the problems in the second but could render best in the first. I would like V2.7 to work the same or better, but not worse than V1.7

Could we have it fixed?

Ernesto

Re: Transparent Image Based Emiters Behaviour

Posted: Tue Dec 11, 2012 12:02 pm
by tom
Please try adding a very small thickness to your emitter geometry. So, they will be closed volumes and we can expect less or no problems after doing it.

Re: Transparent Image Based Emiters Behaviour

Posted: Tue Dec 11, 2012 5:08 pm
by Half Life
The noise you are seeing on the bottom sections can be easily avoided by using a opacity mask for the layer (only revealing the emitter portion of the material/geometry) -- this way the "caustic" calculations noise would not be an issue.

Here's an example material to play with -- I've used these types of materials often for special FX without a hitch: https://dl.dropbox.com/u/41250852/lightning4.zip

Best,
Jason.

Re: Transparent Image Based Emiters Behaviour

Posted: Tue Dec 11, 2012 5:18 pm
by Ernesto
tom wrote:Please try adding a very small thickness to your emitter geometry. So, they will be closed volumes and we can expect less or no problems after doing it.
Tom, They are already closed polygonal models.

Jason, considering that the material construction is as shown in this image:
Image
Do you mean adding an opacity map in the BSDF component (transmitance box) in the same layer as the emiter? Or in the layer itself? Or perhaps in the weight of the BSDF?

Ernesto

Re: Transparent Image Based Emiters Behaviour

Posted: Tue Dec 11, 2012 5:40 pm
by Half Life
Where is says "Layer 100 N" -- that is the layer level. Put a opacity mask in there (white for areas you want emitter effect to appear, black for everything else -- grey values represent partial opacity)... really you don't need image based emitter often (if it is just a single color effect) because this technique will work fine with simple emitter material -- see here for more info: http://www.maxwellrender.com/forum/view ... 56#p337656

Best,
Jason.

Re: Transparent Image Based Emiters Behaviour

Posted: Tue Dec 11, 2012 5:47 pm
by Ernesto
Half Life wrote:Where is says "Layer 100 N" -- that is the layer level. Put a opacity mask in there (white for areas you want emitter effect to appear, black for everything else -- grey values represent partial opacity)... really you don't need image based emitter often (if it is just a single color effect) because this technique will work fine with simple emitter material -- see here for more info: http://www.maxwellrender.com/forum/view ... 56#p337656

Best,
Jason.
Thank You so Much Jason,
I will try this tonight.
E

Re: Transparent Image Based Emiters Behaviour

Posted: Wed Dec 12, 2012 3:27 am
by Ernesto
Dear Jason,

Your idea helped to improve the image based transparent emiter!

As soon as I placed the mask, almost all the artifacts dissapeared. Specifically all the artifact on the masked area disapeared, although in the unmasked area we can still find some of them. See in the lower image, at the yellow arrows. Unfortunately the noise was very heavy as previously. Just to give you an idea I rendered up to SL 17 in 22 hours, and the noise was still there. So playing arround (without any logical reasoning) with the settings, I found that Excludding from global ilumination, all the poligonal objects, where the sparks material were assigned, it resulted in a drastic reduction of the noise. As soon as this was done, I could render up to SL 12 with a better result compared to the previous state. I really do not know yet the consequences of this, but will try to find them out if any.

Image

As you could see in the central image, corresponding to the material channel mask, the sparks contour is showing now. This is a significative improvement in relationship to the previous state, where all the object appeared blocking totally what was behind, although they were suposedly transparent. In fact what we can see is that the sparks material is not transparent in the unmasked area, as it was expected.
This causes some shadows arround the sparks, but they cannot be noticed because of the strong intensity of those light sources.
Additionally it is possible to see a strong noise area in those places as result of some kind of refraction or reflection that is going on, although it was supposed not to happen.

In the following viewpoint some other artifact are visible, but only in the unmasked areas.
Image

Just to compare with the behaviour of transparent emiters not based in images, I can tell that the BALL at the left is surrounded by a transparent emiter that is not visible at all in the material channel. Such a behaviour would be expected in the sparks material case.
All this trouble seems to be produced by the Image Based emiters. Jason suggested to use the idea of the Opacity Mask in the layer, to create a simple emiter material, that could possibly work as expected.

This will be the next attempt.

Tom, thanks for your help! I have sent a simplified scene, corresponding to the last state.
I am sure you will find out something interesting, as ever.
Anyway with these last two improvements I am closer to what I had in version 1.7

Here I am pasting a screen capture of the last material with the opacity mask Jason suggested:
Image

Ernesto

Re: Transparent Image Based Emiters Behaviour

Posted: Wed Dec 12, 2012 1:51 pm
by Half Life
Try enabling force fresnel...

What I would probably do myself is use your current HDR image (the emitter) as the opacity mask (just reduce saturation) and then change the emitter element to use a standard "colored" emitter (instead of image-based)... this should give you better predictability between the render channels and a more variable output when using color multilight.

Best,
Jason.