A personal introduction

Started by DutchDimension, May 23, 2011, 11:53:16 AM

Previous topic - Next topic

Kadri

Quote from: DutchDimension on June 01, 2011, 11:01:33 AM
...
Hi Oshyan, the mesh I tested this with was but a simple Maya pSphere. I also noticed the partly faceted shading happening on the native Terragen Rock object. Despite having 'Use smooth normals' enabled for both.
...

Danny , i think your problem is something like this :

http://forums.planetside.co.uk/index.php?topic=7862.0

DutchDimension

Quote from: Kadri on June 01, 2011, 11:10:37 AM
Danny , i think your problem is something like this :

http://forums.planetside.co.uk/index.php?topic=7862.0

Hi Kadri! Thanks for posting that. Yes, that is exactly the aberration I see happening in my tests. Always present in the 'Terminator'.
And now that I think about it, I remember coming across this problem with mentalrayForMaya as well, many years ago. The solution offered there is to slightly shift the shadow ray up from it's originating point on the surface along it's normal (as was mentioned in the Blender article). Here is a link describing the mi attribute:

http://www.lamrug.org/presentations/oct2004/mental_ray_for_maya_dynamic_attributes.htm
(Scroll down about two thirds of the way to mi rayOffset).

But to be honest, I haven't had need for this control inside Maya for many years. I guess largely because most of the time I have mental ray dynamically subdivide my meshes into sub-pixel micro polygons at render time, which really is the best solution. (By the way, would my assumption be correct if I said this also happens to Terragen terrain, but not for imported meshes?)

Looking at the dates of those threads (2008), it seems to be quite a long standing problem in Terragen. I can only hope Matt or Jo will eventually include a fix, as the errors are rather unsightly and limits what one can do with imported geometry.

Anyway, glad we managed to establish that it's naught to do with import/export settings or geometry normals.  :)

Many thanks!
Danny


Kadri


Danny , i can not say anything systematic , but I have a project now (in fact coincidentally the old unfinished one in the above link) and the object renders very nice mostly.

There are only a couple round surface parts that render bad.
I switched from ray trace to micro polygon render in TG2 (for newbies leave the "Ray trace object"  box in the render settings empty) and the problem was gone.

So there are differences (there are obviously differences as displacement etc too) in this aspect.
But what kind , i think only Matt knows for sure!

I think mostly (maybe always) switching renderer's as i said above and changing the normals of the object in a program like Poseray or so does fix it.
I have a suspicion that some users don't see it because with textures and a little high subdivided object it is sometimes difficult to see ;)

TheBlackHole

The "terminator problem" is an issue in all raytracers, including Mental Ray, POV, and the raytracer in Terragen. http://www.povray.org/documentation/view/3.6.1/193/
They just issued a tornado warning and said to stay away from windows. Does that mean I can't use my computer?

JimB

Area lights can often get rid of the terminator problem in Mental Ray. Set up a massive ginormous area point light and put it all the way out as far as the real sun would be. Infinite lights are rubbish.  ;)

(Only my opinion)
Some bits and bobs
The Galileo Fallacy, 'Argumentum ad Galileus':
"They laughed at Galileo. They're laughing at me. Therefore I am the next Galileo."

Nope. Galileo was right for the simpler reason that he was right.

DutchDimension

TheBlackHole: it sure is.

JimB: I honestly can't remember the last time I encountered the problem in MentalRay even with 'Directional (Infinite) Lights'. Must be at least 6-7 years if not more.
The area light trick sounds expensive.

Meanwhile, back in Terragen, has anyone ever combined a 'Reflective Shader' with a 'Default Shader' through a 'Merge Shader' node set to 'Add' in the 'Colour Merge Mode'? With the reflection settings of the 'Default Shader' turned to zero the 'Merge Shader' can then neatly "composite" the contribution of the 'Reflective Shader' on top.
I prefer the extra attributes available in the 'Reflective Shader' over those in the 'Default Shader's' 'Specular' tab, as it offers quite a bit more control.
It sounds great and works very well if it wasn't for the fact that the 'Reflective Shader' appears to perform very very slowly indeed when assigned to OBJ geometry (a dense Oak tree in this case). Even with the 'Number of Samples' setting under the 'Quality' tab turned down to just 1. I guess the 'Reflective Shader' has more maths to perform, but even so, it's magnitudes slower than I would expect. So much so that I abandoned this particular set up and went back to the 'Default Shader'. Interestingly enough, I found the speed good when assigned to a simple Terragen Sphere object. This leads me to wonder about the maximum amount of Reflection recursion and trace depth that the 'Reflective Shader' (or Terragen) works with? In MentalRay, there are controls there to limit recursions in order to keep render times in check, I couldn't find any such controls in Terragen. Could this play a part here?

dandelO

#21
Hi, Danny.

The reflective shader with 'ray traced reflections' checked is very much slower to render on complicated geometry than without it checked.
It might be worth noting that the output of the reflective shader, I'm sure I've read here, is equivalent to the default shader's specular settings, when 'ray traced reflections' isn't used in it.

The only use for the sample count input in the reflective shader is if you use any 'reflection softness' factor. If this setting is set to '0' then the sample quality tab has no effect in a reflective shader.

At default reflection sample settings, adding any 'reflection softness' gives a very 'stepped' appearance to the soft reflections. At full(and you can exceed this limit by using the type-box, if required, but here I just mean 'full' quality on the slider), it isn't much better, although the render times are very much longer. The reflection softness feature is very glitchy and the time required to render it really isn't worth waiting for, in my opinion.

You can, however, use a noise function, or other manual input, to break up the reflection hardness on your own, as I did in this older thread from a while back; http://forums.planetside.co.uk/index.php?topic=11326.0

In a line; Avoid 'reflection softness' and samples.

Martin.

Tangled-Universe

Good question, I'm curious to know this as well. Controlling this in an exact way by numbers would be great.

Anyway, here's what I know/understand so far:
The reflective shader uses raytraced reflections and the default shader doesn't.
The default shader's reflectivity function is the exact same as the reflectivity shader, only with "raytraced reflections" disabled.
It just uses reflectivity of direct light, whatever the technical name is for that.

Every raytraced reflection/refraction and such is being controlled centrally in the renderer by the "render subdivions" settings node.
You can access this node by pasting the following code straight into the internal network of your rendernode:

<terragen_clip>
   <render_subdiv_settings>
   </render_subdiv_settings>
</terragen_clip>

Upon opening you see a couple of settings and ray detail multiplier is the one you need.
By default it is 0.25 so it already reduces the actual raytracing by a factor of 4.
You can reduce it further to make your leafs/trees render faster. However, I think it's not worth it.
I actually believe I tried it some time ago and it didn't look that much better than regular "default shader" shading.

This setting also controls the amount of subdivisions of geometry of raytraced surfaces, which would be underwater surfaces for instance.
So at default 0.25 and with render detail 1 the underwater surface will have a final detail of 0.25 x 1 = 0.25.
Increasing this multiplier allows for better underwater geometry/shading.

In all cases increasing this value will increase rendertime, so use it wisely.
Hope this clears things up a bit.

Cheers,
Martin

JimB

#23
@ DutchDimension, I was half joshing, hence the smiley. Been using MR for a long time so have developed my own prejudices  ;)

Added:
QuoteThe area light trick sounds expensive.

Not point lights. Spot lights, yes, but I hate spot lights more than I hate infinite lights  ;) ;)

Glad to see another matte painter getting to grips with TG2, by the way. Check out Dandelo's tests with animated vegetation.

http://forums.planetside.co.uk/index.php?topic=12191.0
http://www.youtube.com/watch?v=go58vFmryN8
Some bits and bobs
The Galileo Fallacy, 'Argumentum ad Galileus':
"They laughed at Galileo. They're laughing at me. Therefore I am the next Galileo."

Nope. Galileo was right for the simpler reason that he was right.

Matt

#24
Quote from: DutchDimension on June 12, 2011, 05:45:34 PM
Meanwhile, back in Terragen, has anyone ever combined a 'Reflective Shader' with a 'Default Shader' through a 'Merge Shader' node set to 'Add' in the 'Colour Merge Mode'? With the reflection settings of the 'Default Shader' turned to zero the 'Merge Shader' can then neatly "composite" the contribution of the 'Reflective Shader' on top.

A more realistic way to composite these two shaders is to have the Default Shader feed into the Reflective Shader's main input connection. For materials with a Fresnel effect (controlled with index of refraction), reflections are not purely additive. At glancing angles, not only does the reflection increase, but the light from the underlying surface also diminishes. Putting the Reflective Shader after another shader will diminish the underlying shader at glancing angles to give you this effect, similar to using built-in reflection in the Default Shader. The Reflective Shader puts a reflective coat on top of any shaders that are input to it.

(You can still get this effect using Merge Add as long as you leave some reflection component in the Default Shader but set the reflection tint to black. That way the Default Shader darkens itself at glancing angles and the reflection can be added on top for the correct result.)

Matt
Just because milk is white doesn't mean that clouds are made of milk.

DutchDimension

dandelO: Cool thread you've got going there and definitely a unique way of doing reflections. And thank you for posting about your experiences with the Reflective Shader. I'll have to further experiment with it, but for the moment I think I'll abandon using it on leaves.

Tangled-Universe: Good to know about the 'Render Subdivisions' node. It'll be very useful indeed when I get around to doing some lakes and streams with submerged vegetation drifting in them. Thank you for your input.
BTW, Is there any reason that this node is more or less hidden?

JimB: Another matte painter... well met. Where do you work Jim?
And yeah, those animation tests from dandelO look really promising. He's certainly blazing trails there.

Matt: Thank you for clearing that up. The difference between a node's main input connection and other means of blending/merging nodes is still a little vague to me (but it's slowly starting to make sense).
I was indeed attempting to create a fresnel like reflection. Akin to the BRDF of the mia_material_X_passes shader in Mental Ray. That particular shader has kind of spoiled me in that it's written to be automatically energy conserving. Reflection + Refraction + Diffuse can never be greater than 1.
I realize my way of adding the 'Default Shader' with the 'Reflective Shader' in such a careless manner totally disregarded the laws of thermal dynamics. :-[

Any word on ray trace recursions?

Cheers all!



Matt

#26
Quote from: DutchDimension on June 17, 2011, 07:41:06 PM
Matt: Thank you for clearing that up. The difference between a node's main input connection and other means of blending/merging nodes is still a little vague to me (but it's slowly starting to make sense).
I was indeed attempting to create a fresnel like reflection. Akin to the BRDF of the mia_material_X_passes shader in Mental Ray. That particular shader has kind of spoiled me in that it's written to be automatically energy conserving. Reflection + Refraction + Diffuse can never be greater than 1.

As any good shader should be :) TG's Reflective Shader is also energy conserving, as long as you keep to values less than 1 with reflectivity, reflection tint, transparency and diffuse. (If you enter anything larger then that's your choice.) As reflectivity increases the others are reduced (and "others" includes any shaders that are input to the Reflective Shader). As transparency increases, diffuse and input shaders are reduced.

Quote
Any word on ray trace recursions?

The limit is hardcoded, and it's quite low. I think it's 3 reflections. In any case, Terragen's ray traced reflections won't perform as fast as Mental Ray, so they're best avoided on geometry that's likely to create a lot of interreflection.
Just because milk is white doesn't mean that clouds are made of milk.

JimB

Quote from: DutchDimension on June 17, 2011, 07:41:06 PM
Where do you work Jim?

From home for anyone who'll have me. Jim Bowers, digital slut. Pleased to make your acquaintance.  ;)
Some bits and bobs
The Galileo Fallacy, 'Argumentum ad Galileus':
"They laughed at Galileo. They're laughing at me. Therefore I am the next Galileo."

Nope. Galileo was right for the simpler reason that he was right.

Njen

Quote from: Oshyan on May 31, 2011, 02:34:40 PM
We're working on a render "layers" (or "AOV") system already. This will definitely be available in a future release.

It's been a couple of weeks since I have checked in, but when I read this I got excited! Lack of AOV's is one of the main factors in the lack of desire to use TG2 at the VFX studio where I work, even though I am pushing hard :)

I can't wait!