Odd object behavior with reflective shader & internal light?

Started by dduane, May 28, 2010, 07:06:25 PM

Previous topic - Next topic

dduane

Hi all!

So I've been working on a render that features the superegg object that the excellent airflamesred kindly made for me. Below is a link to an early run at the superegg, basking in the sun on a nice sunny Martian afternoon:

http://www.petermorwood.com/images/Superegg_1.png

(Before this starts sounding too weird -- the scene is an illustration from this book:  http://amzn.to/WizOfMars )

That's a reflective shader wrapped around the basic object. I was considering doing an evening version of the same shot, with the superegg getting ready to do something unusual, and glowing a little. So I stuck a light source inside it, expecting -- because I had transparency turned down to 0 -- that there would be nothing much but some light "leakage" downward onto the stone surface due to the GI being turned on. Instead... I got the result linked to below.  (Please pardon the low quality render, but you get the idea.)

http://www.petermorwood.com/images/SupereggAndSphereWeirdness.png

What's going on here? What's with the little flecks of light all over the place? I've tried turning off shadow casting, ray traced shadows, just about everything but the light itself: no change. To make sure this wasn't some kind of problem with the superegg object, I created a plain sphere object in T2, wrapped an identical reflective shader around it, stuck an identical light inside it, and got the same result. While light does appear underneath them, it remains strangely granular even when rendered at 1. But it also kicks way out into the background, and I have no idea what it's doing up in the atmosphere ("glow in atmosphere" is turned off).

Is this some undocumented feature of the reflective shader? Or something simple that I'm missing? If anyone can throw some light (ahem) on this, I'd be grateful.  :)

Best -- Diane

Diane Duane | The Owl Springs Partnership | Co. Wicklow, Ireland
SF and fantasy fiction from the author via Amazon or https://ebooks.direct

dandelO

Hi, Diane. I can't see your screenshot, it says forbidden but, light sources in TG are very grainy for some reason. Your problem, I'd assume, lies there.
You might try putting a small sphere(the size of the light source you were using would be a good idea) inside the original reflective sphere and making its surface very luminous(this may mean manually typing higher values than the sliders limit of '1', you may need to go extremely high).  
If you have GI enabled, the luminosity of the object will be best observed on surrounding surfaces by increasing GI samples. I'd try GI relative detail = 2, GI samples = 4, to begin with. If this is not convenient, try using relative detail of '1' and sample quality of about '6'. The more samples, the better.

You should then see a nice glow on the surfaces around the luminous sphere. I think this should work. Keep us posted, I'll experiment with some settings myself and test this out, I'm not sure about the luminosity being completely enclosed inside of another sphere, sorry, your super egg, I mean. Back in a bit...


dandelO

Ok, without actually seeing what you're trying to achieve(I can see the site but not the image on it), you could try something like this;

I tried with a duplicated and slightly smaller object inside the other but, really, when adding luminosity that you want to make the surroundings glow with, you're losing out on all the outer reflective surface anyway because of the brightness overpowering it and, you'll also need a deal of transparency of the outer surface to see the glow beneath.
You could try simply replacing the reflective shader with a 'default shader' and giving it whichever colour you like for it's surface. Next, create a power fractal shader and edit its scales to ensure that they fit correctly to be discernible across the surface of the superegg, (no point putting scales in that are bigger than the object or you may end up with a completely covered/uncovered surface). Then, use the power fractal as the 'luminosity function' of the default shader.

You can make the luminosity any colour you like, here, I just picked a bright red to make it easily visible then, edited its value manually, to 30. That'll make the surroundings take on the colour of the luminosity(it really doesn't have to be such a high value to make the surroundings glow but, just for demo purposes).

Here's full coverage of luminosity:

[attachimg=#]

And, here's some negative 'colour offset'(-0.5) in the fractal function, leaving gaps in the luminous portion of the surface:

[attachimg=#]

Colour offset controls how much of each fractal colour is applied. Positive=more high colour, negative=more low colour.
Any colour-producing shader, or combination of multiple shaders, can be used as a function, you could even have multiple different luminosity colours. Also, don't forget that the 'Surface layer' also has a luminosity channel, and altitude/slope constraint tabs so you could control distribution of where you'd like it to appear.

Ha! I don't even know if this is of any use because I can't see your rendered image but, maybe it is. ???
Anyhow, the long and short of it is; never use the current TG lightsources as a means to illuminate surroundings/atmosphere, just use luminosity.

Here's the negative offset version as a clipfile: [attachimg=#]
The noise is stretched across the X and Z and there is no 'colour roughness' in the fractal, so as to make it a smooth, flowing surface.
I hope that's of some help. :)

dduane

Argh, apologies for the non-viewability of the images! (I forgot that we have some non-hotlinking language in the .htaccess of that website to keep the viewership from using up heaps of bandwidth linking to LJ icons and such.) I've changed the links in the original post -- they should be viewable now. Anyway, I'm doing another render of the full scene with the lighting problem and will post it in a while. (Probably a couple of hours. I'm rendering on a tiny netbook that has no processor speed to speak of: can't wait to get something with a little more oomph to it.)

In any case, thanks for the super advice above -- I really love the look of the negative color offset, must try that ASAP!

(ETA:)  Some added material here. First of all, here is a (slightly overbright) version of what I was trying to do with the superegg, and initially failing:



So now it's working and I'm not sure why... especially since I spent a lot of time last night and this morning tweaking the settings and rendering and re-rendering and re-re-re... you get the picture.

Settings on the egg on this were as follows: visible to camera, visible to other rays, cast shadows, doublesided surface, use smooth normals (flip normals *not* checked). Settings on the attached reflective shader: reflectivity 4 (just on this exposure: I wanted the egg proper a little / unnaturally brighter than in previous versions), reflection tint 4, transparency 0, index of refraction 1.5, slecular highlights on, Blinn-Beckman selected, highlight intensity 1, specular roughness 0.1, raytraced reflections on, reflection softness 0. Quality / samples, 16. (I take it this may not matter unless I specify a value for the reflection softness.)

As for the light inside the egg: source center is the egg's center: source radius is 5: color is 0.1669 (green):  strength 10000: visible object is checked: everything else is unchecked.  

...So at least that's working now.  By contrast, here is a much better render of the earlier failed attempt. I'll attach its .tgd below for comparison. (Who knows, this failure may be useful for something else some time, assuming I can work out what's going on.)



The faint blue highlight on the front of the objects is from the setting sun directly behind the POV. (Martian sunset again: blue down low, pink or dark red high above.)

Best!  D.
Diane Duane | The Owl Springs Partnership | Co. Wicklow, Ireland
SF and fantasy fiction from the author via Amazon or https://ebooks.direct

airflamesred

Turned out nice I do like the rocks. What are the settings for those?

dduane

That's part of the NWDA rock surface pack -- I just picked a likely corner of their terrain. Amazingly complex stuff -- I got a headache just looking at the network view.  :)
Diane Duane | The Owl Springs Partnership | Co. Wicklow, Ireland
SF and fantasy fiction from the author via Amazon or https://ebooks.direct