Planetside Software Forums

General => Terragen Discussion => Topic started by: nvseal on January 10, 2008, 07:58:01 PM

Title: Functions: Circles and such
Post by: nvseal on January 10, 2008, 07:58:01 PM
I have an idea that I would like to try that requires circles (not filled), lines, and squares (again, not filled) for surfacing purposes (as fractals). The problem is that I don't know how to generate something like that. To mak sure you understand what I'm looking for, I want to use them as factal for a surface shader so I can add luminosty and fake "cities" on th dark side of planets. Is there anyone who can give me a hand on this one, maybe point me in the right direction?
Title: Re: Functions: Circles and such
Post by: Harvey Birdman on January 10, 2008, 08:09:36 PM
Setting up a little network to draw the shapes would be simple enough, but I don't understand what you mean by you mean by 'using them as fractals'. I mean, you can do pretty much whatever you want with the output of the numeric network...
Title: Re: Functions: Circles and such
Post by: old_blaggard on January 10, 2008, 08:11:43 PM
I'm guessing you mean that you want to use them as blendshaders?
Title: Re: Functions: Circles and such
Post by: nvseal on January 10, 2008, 08:13:17 PM
Sorry, I wan't clear. I mean to use them as the fractals for surface shaders.
Title: Re: Functions: Circles and such
Post by: Harvey Birdman on January 10, 2008, 08:19:12 PM
These may get you going in the right direction, if I understand correctly and if you hadn't seen them.

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


http://forums.planetside.co.uk/index.php?topic=2428.msg23878#msg23878
Title: Re: Functions: Circles and such
Post by: nvseal on January 10, 2008, 08:47:37 PM
That's getting close. However, interms of the circles I'm more looking more than circle placed on the planet rather than "latitude" lines, if you get what I mean.
Title: Re: Functions: Circles and such
Post by: Virex on January 11, 2008, 05:49:15 AM
Well, the trick with a circle is that the distance between the ring and the center is the same eveywhere. So pick a spot for the center, a radius and then use a conditional shader and a get position shader to compare the distance. I'll try to draw up a litle network to make rings once can get to a pc with TG2.

If you want to generate multiple circles procedualy, you'll need to get someone who knows more maths then me though  :-\
Title: Re: Functions: Circles and such
Post by: Seth on January 12, 2008, 11:09:56 AM
crop circle incoming ?
Title: Re: Functions: Circles and such
Post by: Mr_Lamppost on January 12, 2008, 10:03:04 PM
Are you looking for a circular region defined from an arbitrary origin?

What I am working on (If I ever get out of here and do any work :-) ). Is a function to define arbitrary circular masks. 

I will publish as son as I getbthechance.
Title: Re: Functions: Circles and such
Post by: Virex on January 12, 2008, 10:10:55 PM
Here's a simple one. It creates a circle with a radius of 1/radius (the node one) and a center defined by the X, Y and Z nodes. You can then use the conditionall shader to either use only the rim, the inside or the outside. Using only the rim might not yield very good results. Instead try defining a ring by using 2 nodes with diferent radiuses and a second conditional shader.