Planetside Software Forums

General => Terragen Discussion => Topic started by: Mohawk20 on October 29, 2008, 06:55:19 AM

Title: Fake Stones / Fake Holes
Post by: Mohawk20 on October 29, 2008, 06:55:19 AM
Once we got the water shader, people wanted to make Crystals from the fake stones. Matt told us that wasn't a good idea because the fake stones are part of the planet, so you would create holes seeing into the planets black core.

I thought of a solution, just duplicate the planet with all shader except the fake stones shader, and that's what will be visible through the crystals.

But then I had another idea... what if you make the second planet a bit smaller, and give the fake stones an opacity of 0 with the default shader as surface shader. If you add a cloud layer close over the surface, wouldn't you get great shafts of light shining up?
Or if you then give the stones their opacity back, and add translucency, or transparency? I tested it!

Due to upload restrictions here, I'll redirect you to the thread on Ashundar that has all the images in it: http://www.ashundar.com/index.php?topic=4556.msg36057#msg36057
Title: Re: Fake Stones / Fake Holes
Post by: rcallicotte on October 29, 2008, 10:18:19 AM
Wow.  This is making my brain work.  Thank you for that, mister.   ;D
Title: Re: Fake Stones / Fake Holes
Post by: Mohawk20 on October 29, 2008, 11:56:19 AM
Gladly!

I'll be trying a lot of different things, but first I want to get those rays!
Any help with that would be appreciated.
Title: Re: Fake Stones / Fake Holes
Post by: bigben on October 29, 2008, 04:37:50 PM
If you have holes and want rays, wouldn't you use a lightsource in the centre of the planet rather than making a "light" planet?
Title: Re: Fake Stones / Fake Holes
Post by: Mohawk20 on October 29, 2008, 06:12:16 PM
Having a planet with a surface layer with a luminosity of 100 should have the same result, shouldn't it?
Title: Re: Fake Stones / Fake Holes
Post by: bigben on October 29, 2008, 09:21:58 PM
Not really. It would be much more diffuse, with the light orginating at the surface and spreading outwards.  A "sun" placed at the centre of the planet would have much more directional light passing through the holes, which is what you'd need to get rays.
Title: Re: Fake Stones / Fake Holes
Post by: Mohawk20 on October 30, 2008, 04:30:13 AM
What should the radius be? I'll make the intensity as high as possible and see what happens.
Title: Re: Fake Stones / Fake Holes
Post by: dandelO on October 30, 2008, 07:32:09 AM
Try '1', so it's just visible. Use the strength levels for brightness.
I suppose you could set a new cloud layer to the planet, level it at 0m above the surface - depth and density=1, and use the fake stones shader, inverted, as it's density function, un-check 'enable primary' in the cloud layer to fake the shadow/ray casting. A cheap and quick way to fake it, cloud shadows still cast without using a ray-traced atmosphere.
Title: Re: Fake Stones / Fake Holes
Post by: Mohawk20 on October 30, 2008, 07:43:40 AM
I can't get any light in my scene... I placed the light in the center of the planet, so maybe it's too far down, but with a strength of 1e+100 it should illuminate half the universe, shouldn't it?

Thanks for the idea Dandel0, but I don't want to fake it, it should just work like in the real world...
Title: Re: Fake Stones / Fake Holes
Post by: Ogre on October 30, 2008, 02:16:19 PM
I have been lokking into something similar.  I found I need a light source centered at the planet center of a slightly smaller radius with a strength of 1e+014.
Title: Re: Fake Stones / Fake Holes
Post by: Mohawk20 on October 31, 2008, 03:30:14 AM
I've hit a bug I can't get out of... All renders stay black, no matter haw much light there is in the scene from this POV (even without clouds and the sun from above), and how minor the changes from the last working render. The only difference was the distance between the outer planet and the inner planet and the light source.

If I change those values back, the render stays black. The preview won't start rendering if I unpause it either. Something is very wrong here...
Title: Re: Fake Stones / Fake Holes
Post by: Mohawk20 on November 02, 2008, 10:28:43 AM
Under 480x360 it renders, first image below being last in the ray test, as I can't figure it out with a non-rendering scene...

Below that first render of a follow-up series of diamonds. Fakestones with water shader, IOR at 2.4.
Second planet is a duplicate without fakestones for ground under diamonds. Added brighten an blur effect as overlay in postwork to bring out the glow in the diamonds.

Currently running render has no duplicate planet and a light in the core. Fakestones are a lot higher for better visibility...
Title: Re: Fake Stones / Fake Holes
Post by: Mohawk20 on November 03, 2008, 11:06:08 AM
Evolving that last scene I made a great discovery.
(And I got my rays, sortof!)

In below image, I changed the fakestones tallness to 7, and added the core light again.
The light from the core is actually being redirected by the water shader on the fakestones. And you can see the light is not exactly in the center of the planet, but somewhere near to the surface.

It took more than 30 hours to render this.

I adjusted the exr output file in Photomatix to get below result, but it shows best what the water shader does to the light from below...
(Shame of the purple pixels bug though, that's from the Photomatix program, not TG2)


I never knew the TG software was thát good!
Bravo Matt!!
Title: Re: Fake Stones / Fake Holes
Post by: dandelO on November 03, 2008, 11:27:49 AM
I've been frustrating myself with this. I can't get casting atmosphere rays through object surfaces. I'm using the opacity input of a default shader with high density fake stones as the function(this should turn the surface into a mask). The holes are there but no light casting through them is happening, with or without ray-traced atmospheric shadows. I've even inverted the whole thing so the scene is upside down to see if it works when illuminating from above instead of below, nope.
I've tried planes, spheres and planets with lights, suns and simple luminosity. Nope.

This one above is working somewhat, Mohawk. I'm a bit confused as to where the light is coming from but at least it's casting. It seems to be due to the water shader on the stones though, I can't work it with the only opacity function. Like you say, it should be able to be done without all this. Good job getting this far...
Title: Re: Fake Stones / Fake Holes
Post by: Mohawk20 on November 03, 2008, 12:46:54 PM
The light is coming from Light Source 01, placed some distance below the planet's surface (so, inside the planet).

My guess why the opacity trick isn't working is because the opacity option is bodgy.
It can only do white or black, which is odd in itself. But I think the problem lies there, that the object is still whole, and we can see the stuff behind it just because some parts of the surface are not being rendered. It's not like the opacity creates holes that are actually parts of the scene.

To prove this would be true is to create an object of a sphere with holed, and load it into TG2 and put a light in it and see if it casts shadows then...


Any thoughts on this Matt?
Title: Re: Fake Stones / Fake Holes
Post by: Ogre on November 03, 2008, 01:39:22 PM
A solid object made holey using and image mask for transparency.

While playing with this topic I also noted that once I past a certain size for the radius oif the light source it just blacked out. I kept the illumination per meter squared the same as smaller size tests but even if the light source surface showed it cast no light. Once I set the light source illumination above 1e+035 it want black.
Title: Re: Fake Stones / Fake Holes
Post by: Mohawk20 on November 03, 2008, 02:34:04 PM
That's what I found as well, about the light. I had to dial the brightness down to render the scene a few times...

And that wall looks nice, now for some fog?
Title: Re: Fake Stones / Fake Holes
Post by: MortalSphere on October 22, 2009, 07:28:35 PM
Have you guys given up on the the whole crystal thing?  I've just been looking to see if anyone had gotten crystal shapes down pat.  I wanted to do the same thing as you guys just without out the transparency.
Title: Re: Fake Stones / Fake Holes
Post by: dandelO on October 22, 2009, 08:03:57 PM
For crystals I'd go for a fake stone shader(s), set as the surface of the crystal on a seperate plane object, just beneath the original terrain, to get crystal forms. poking through the surface. Or apply the fake stone crystal shader to a sphere and distort its shape with fractal displacement.
A rock object also works well because of its ability to be scaled and the number of faces edited but you cannot add displacement to that. A transparency shader(edited water shader with no wave/patch/roughness parameters and high decay distance of the colour of the crystal will work.

The fake stones shader idea is better in my opinion.

EDIT:

Is it really a year since this topic? Bloody hell!
Title: Re: Fake Stones / Fake Holes
Post by: Mohawk20 on October 23, 2009, 04:00:26 AM
Quote from: dandelO on October 22, 2009, 08:03:57 PM
Is it really a year since this topic? Bloody hell!

I was thinking the same thing!
I wouldn't even know where to start if I was to take this up again.
Problem with this tread for me was the render times and the things that didn't work...