Planetside Software Forums

General => Terragen Discussion => Topic started by: N-drju on January 30, 2017, 12:04:16 PM

Title: Planetary rings from default shader?
Post by: N-drju on January 30, 2017, 12:04:16 PM
I keep wondering what is the best method of creating planetary rings of debris around the planets. This has been asked many times through but now that there is TG3... well, even 4, perhaps we should re-explore this topic?

One thing that you most probably can't do is to use regular objects put in orbit around the planet. That is, unless you are running NASA supercomputer. :P Populating a planetary ring with simple objects like rocks will literally render trillions of them which no computer can handle... That's pretty disappointing though given there is a nice option that allows you to create "free-floating" objects. :( Pity that is not too memory-friendly.

For now, I have explored the possibility of creating planetary rings with disks with default shaders. It's very simple and all you need is a default shader with PF as an opacity mask. Then, you can get something that resembles a disk of debris around the planet:

[attach=1]

The trouble though is that from a greater distance (suppose, if you look at a ringed planet from the surface of another) you can see only the part of the ring that crosses the planet's surface. The rest is covered in the background's darkness.

I'm wondering what else I can find to make real nice planetary rings. That's the first time I even try to use it! Seems fun, so I'll be looking into this.

_________________________________________________

Hm, just tried the in-built rock object and you actually can have a manageable population made this way. The distance between instances just needs to be considerably higher. I'll see how it plays out.
Title: Re: Planetary rings from default shader?
Post by: luvsmuzik on January 30, 2017, 01:49:38 PM
I have a "planet with asteroid rings" preset file share from TG3 that was free a long time ago on TG download site. Would it be okay to share this in File Sharing? Or do you want to explore this all by your ownself?

Oh well, here it is either way.
Title: Re: Planetary rings from default shader?
Post by: N-drju on January 30, 2017, 02:11:17 PM
One doesn't exclude another. :) I'm just interested how such mega-features are handled by the program. There have been numerous topics about this feature but none of them really has any definite answers to be perfectly honest...
Title: Re: Planetary rings from default shader?
Post by: cyphyr on January 30, 2017, 02:50:36 PM
I created a bunch of ringed worlds last year using the native rock object and Very large (I mean massive!) cloud layers.
Ring-03 to Ring-07 use cloud layers and Ring-10 to 14 use native rock populations Ring 17 uses both.
I'll upload the source files to the file shareing section so people can play.
I don't thing they took that long to render, maybe half an hour or so.

Link in the file sharing section to drop box
http://www.planetside.co.uk/forums/index.php/topic,22772.new.html#new
Title: Re: Planetary rings from default shader?
Post by: N-drju on January 30, 2017, 04:16:59 PM
Wow, clouds? That's an approach you don't see everyday. :) But... can you actually tilt the cloud layers like you can with discs or SSS, or do you need to roll the camera to have those rings at an angle? You know, sometimes you need the camera to stay put. Especially when the ringed planet is just a background to the scene and not it's center part...

I for that matter require a planetary ring that can be tilted itself as I plan for a planet in a background of an already prepared scene. Planetary rings that work only horizontally are not suitable for such a purpose.
Title: Re: Planetary rings from default shader?
Post by: cyphyr on January 30, 2017, 04:32:57 PM
I hadn't thought about that and it appears you can not tilt the "cloud rings". They are restricted in the y axis which I guess can't be changed ...
Title: Re: Planetary rings from default shader?
Post by: N-drju on January 30, 2017, 05:01:41 PM
No problem! I have just found a different approach that effectively solves this issue. :)

Instead of rolling and tilting your camera you can use the Terragen in-built disc object as an "anchor" for the rocks and level the camera!

Disc object is very versatile - you can set its radius and also its thickness without even using any masks. Disc object's center coordinates need to be in the center of the planet of course (well, duuuh... ::) .)

All that you need to do is to tilt discs to your own liking. This might be tricky given the fact that discs use axis settings rather than standard XYZ modifiers. With a little bit of trial-and-error it is easily set though. Once you have that in place, all that remains is to remember about the settings that I have marked in red in that, rather crude I guess, test image I have made. I just might improve it later, but you can have a look at a "beta" version:

[attach=1]

And the camera has 0 degree roll and 0 degree pitch! :)
Title: Re: Planetary rings from default shader?
Post by: Kadri on January 30, 2017, 05:29:39 PM
Quote from: cyphyr on January 30, 2017, 04:32:57 PM
I hadn't thought about that and it appears you can not tilt the "cloud rings". They are restricted in the y axis which I guess can't be changed ...

Martin (Dandelo) had a method for that i think. It is somewhere here around in the forum.

Edit: This thread i think: http://www.planetside.co.uk/forums/index.php/topic,8989.msg96996.html#msg96996
Title: Re: Planetary rings from default shader?
Post by: cyphyr on January 30, 2017, 06:08:50 PM
Quote from: N-drju on January 30, 2017, 05:01:41 PM
No problem! I have just found a different approach that effectively solves this issue. :)

Instead of rolling and tilting your camera you can use the Terragen in-built disc object as an "anchor" for the rocks and level the camera!

Disc object is very versatile - you can set its radius and also its thickness without even using any masks. Disc object's center coordinates need to be in the center of the planet of course (well, duuuh... ::) .)

All that you need to do is to tilt discs to your own liking. This might be tricky given the fact that discs use axis settings rather than standard XYZ modifiers. With a little bit of trial-and-error it is easily set though. Once you have that in place, all that remains is to remember about the settings that I have marked in red in that, rather crude I guess, test image I have made. I just might improve it later, but you can have a look at a "beta" version:

[attach=1]


And the camera has 0 degree roll and 0 degree pitch! :)


I think when I was making these experiments the goal was to have something I could fly through. Althoiugh as you say the disk is very versitile I don't think it will look so good "up close and personal" as it were ...

Of course the rock object versions sit on a displaced plane (could equally be a disk) and can hence be rotated to suite.
Title: Re: Planetary rings from default shader?
Post by: Dune on January 31, 2017, 02:33:02 AM
How about a huge displacable cube, flattened to almost zero, and 'populated' with fake stones masked by rings and an opacity mask to mask out the no-stone areas? Just an idea. I don't know how large you can make the cube to remain workable, and if you can make it workable.
Title: Re: Planetary rings from default shader?
Post by: cyphyr on January 31, 2017, 04:24:51 AM
It should work with a cube just as well as with a plane, any displaceable object should work as a surface for the rock objects to sit on.
Title: Re: Planetary rings from default shader?
Post by: Dune on January 31, 2017, 06:41:54 AM
Of course, I wasn't thinking; plane is displacable too.  :-[
Title: Re: Planetary rings from default shader?
Post by: TheBadger on February 04, 2017, 08:15:35 PM
Quote from: Kadri on January 30, 2017, 05:29:39 PM
Quote from: cyphyr on January 30, 2017, 04:32:57 PM
I hadn't thought about that and it appears you can not tilt the "cloud rings". They are restricted in the y axis which I guess can't be changed ...

Martin (Dandelo) had a method for that i think. It is somewhere here around in the forum.

Edit: This thread i think: http://www.planetside.co.uk/forums/index.php/topic,8989.msg96996.html#msg96996

Didn't you make a control set up for me that made moving the rings easy, Kadri? pretty sure you fixed a problem for me on that  ;) Anyway its way harder than in should be.
Title: Re: Planetary rings from default shader?
Post by: Kadri on February 04, 2017, 08:43:58 PM
Quote from: TheBadger on February 04, 2017, 08:15:35 PM
Quote from: Kadri on January 30, 2017, 05:29:39 PM
Quote from: cyphyr on January 30, 2017, 04:32:57 PM
I hadn't thought about that and it appears you can not tilt the "cloud rings". They are restricted in the y axis which I guess can't be changed ...

Martin (Dandelo) had a method for that i think. It is somewhere here around in the forum.

Edit: This thread i think: http://www.planetside.co.uk/forums/index.php/topic,8989.msg96996.html#msg96996

Didn't you make a control set up for me that made moving the rings easy, Kadri? pretty sure you fixed a problem for me on that  ;) Anyway its way harder than in should be.

This thread? I just had a quick look.
Only 3 years ago but i don't remember what the problem and the solution was :) Have to read it later ones again.
http://www.planetside.co.uk/forums/index.php/topic,17502.0.html
Title: Re: Planetary rings from default shader?
Post by: TheBadger on February 04, 2017, 08:57:08 PM
yeah, that project anyway, not sure if you posted the answer there or in another ring thread though.

I just remember that it was very much more complex than I thought something like that should be. Your solution did work perfectly though.

I downloaded Richard's files in sharing because he did something in them that I can use to finally finish that project now. ;D 8)

Ha! only 3 years to finish. Thats an improvement for me!
Title: Re: Planetary rings from default shader?
Post by: Kadri on February 04, 2017, 09:02:49 PM

:D
Title: Re: Planetary rings from default shader?
Post by: TheBadger on February 04, 2017, 09:10:45 PM
Oh man, I just read that thread. Now I miss Jo  :(
Title: Re: Planetary rings from default shader?
Post by: N-drju on February 05, 2017, 04:58:10 AM
From my trials I can see that painting a disc object just with PF is sometimes sufficient to have a nice looking planetary rings... if you look at them from a significant distance of another planet's surface. Something I'm doing right now.

Populating stones or rocks on discs is probably more realistic but from large distance it looks patchy and the ring lines are getting blurry and sparse. Colorful disc object with just a touch of luminosity (about 0.014) is not perfect but not too bad either. More RAM friendly too obviously... Even if stones in population are 25000 meters apart it eats up your memory real good.

Just my two cents. But obviously there are many methods. All of them equally good I'd say. :) Though some do not allow you to rotate rings freely like Badger said. At least not easily...
Title: Re: Planetary rings from default shader?
Post by: Ogre on May 14, 2017, 10:59:38 AM
http://www.planetside.co.uk/forums/index.php/topic,16100.msg156906.html#msg156906

Multiple rings at any angle.
Title: Re: Planetary rings from default shader?
Post by: billhd on May 18, 2017, 10:06:46 PM
I haven't been active but recently looked at this interesting thread.  I had done some experimenting with using fake stones on discs.  The trouble with discs is that the varying density of stones does not cast as ring shadows on the planet, the disc seems to be a one-way object with impinging light and wants to only cast a single shadow.  From this perspective you can't get "under" the rings and look up through them either.  This is from a while back so I had to look in the file to see that I used a glass shader on the disc to get transparency.  Trig functions make the ring structure as masks for the fake stones. Since I couldn't get proper shadows from the various stone densities I faked it with a few discs and soft shadows.  See pic.  I like Mr. Fraser's approach since he gets the explicit shadows on the planet and can get close up to the constituent particles.  But I like fake stones because you don't have to populate, they are fast.   By coincidence, I had recently thought to use a distance shader limited atmosphere for rings, but could not get the distance shaders to limit the atmosphere to a thin slice, and have had only primitive success with the cloud approach when that failed (was trying to apply the trig functions but it seems they don't map to the cloud slice the way they map to the discs). 

As an aside, real planetary rings look different from top or bottom with respect to the sunlit side because different particle/chunk sizes have different forward and backward light scattering properties.   -Bill
Title: Re: Planetary rings from default shader?
Post by: Dune on May 19, 2017, 01:17:31 AM
Interesting and a very convincing result! Strange that the fake stones don't make shadows, even if you set the disc object as 'do shadows'? Did you try 2 disc objects, one rotated 180ยบ, both with same fake stones distribution? In that case you may not need the lateral displacement of the stones. Really don't know if that would work.
Title: Re: Planetary rings from default shader?
Post by: billhd on May 19, 2017, 01:03:01 PM
Thanks Ulco, Kind words from a master.  I attached a simplified setup.  I was incorrect in recalling the "under rings" effect, there is indeed a transparency result - see the two renders from the attached tgd.  But even deleting the fake stones leaves a solid shadow of a transparent ring.  I also tried checking ray tracing options in the disc and render dialogs.    Even with this limitation, I think the technique can yield some satisfying results with fast render times.  If you or anyone else sees to exploring this shadow issue I would be keenly interested in any insight.
Title: Re: Planetary rings from default shader?
Post by: Dune on May 20, 2017, 03:53:51 AM
I've done a little experimenting on a small scale (3m planet), but the problem remains the disc shadow. With glass shader, or default shader as in this screendump, I can't get rid of that full shadow.
Maybe Matt can add some function to make the opacity of the default shader work on shadows of the object too. I don't know if an imported disc will do the same, I'll try.
Title: Re: Planetary rings from default shader?
Post by: Hannes on May 20, 2017, 08:32:01 AM
As far as I remember the fake stones are just some sort of displacement, no objects, so I guess it would be difficult to get shadows only from the "stones". Maybe some masking using the fake stones shader would work??
Title: Re: Planetary rings from default shader?
Post by: billhd on May 20, 2017, 12:04:53 PM
Thanks Dune and Hannes for looking, my understanding is that the fake stones are mesh displacements. I was thinking that a planar distance shader that masked the plane of the disc but not the stone displacements, but for a little vertical extent near the disc, could work, but have not tried it yet.  This would work for viewing from the stone-top direction.  I'll get to trying that reasonably soon.
Title: Re: Planetary rings from default shader?
Post by: Dune on May 20, 2017, 12:23:17 PM
It works if you use an imported disc and forced displacement. Check out my Planetary Rings thread.
Title: Re: Planetary rings from default shader?
Post by: billhd on May 22, 2017, 03:31:45 AM
Thanks, I had missed that.  Currently having difficulty seeing my imported disc but will eventually get it; have scaled, translated etc.
Title: Re: Planetary rings from default shader?
Post by: bobbystahr on May 23, 2017, 01:21:25 PM
Quote from: billhd on May 22, 2017, 03:31:45 AM
Thanks, I had missed that.  Currently having difficulty seeing my imported disc but will eventually get it; have scaled, translated etc.

Did you run it through PoseRay before importing it into TG? That's often helpful.
Title: Re: Planetary rings from default shader?
Post by: billhd on June 12, 2017, 04:47:35 PM
Thank you Bob, I currently only have a mac so I cannot run poseray.  Perhaps in the next 6-12 months I will expand to both operating systems.  Appreciate your suggestion.
Title: Re: Planetary rings from default shader?
Post by: N-drju on June 13, 2017, 03:13:17 AM
It all actually depends on what you are after. If for instance you just want planetary discs from the surface of another planet (and light not poking through the discs) all you really need is a colored disc object. Good for far away shots. It's no use to complicate matters when not necessary.