-
Notifications
You must be signed in to change notification settings - Fork 7
Starfields and Nebulae Part 2
I will occasionally mention that a certain action will make a transform non-conformal or break angle-preservation. You don’t have to worry too much about the math behind this, what it means is that shapes are distorted by such transforms, i.e., stretched, squished, or skewed. When the effect is subtle, it can add nice filament-like structures to a nebula. However, as soon as you add stars, it will also stretch, squish, or skew your stars, resulting in oval or even long bent “stars”, which look very unnatural. Feel free to use this effect, if you like it, I mostly mention it so that when it happens and you want to get rid of you, you will know what to look for in your parameters.
We’ll start with the basic loop from last time, but before we jump into it, I’d like to point out something that some of you might have already noticed: the loop in the last tutorial was a bit more complicated than it needed to be. The bread and butter of any nebula are Affine and Spherical. he left shows the loop from the last tutorial. Since both Sphericals did the exact same thing last time, we could have used just one. However, this isn’t necessarily always true, so think of the right one as an extremely basic version, while the left side is a bit more versatile and will form the backbone of almost any loop that you will be using for star fields and nebulae.
Two Sphericals | One Spherical |
---|---|
With version 1.2 of IFSRenderer, a new parameter is introduced to Spherical: the Radius. A Spherical is just an inversion of the entire 3D space with respect to a sphere if the Offset = 0. A point that is 0.5 unit lengths from the origin will be moved to 2 unit lengths away with the same direction, i.e. the signs and ratios for the three spatial coordinates will remain the same. The smaller the radius, the smaller the sphere used for inverting, and the farther apart the transform will spread whatever is given to it. As a rule of thumb, a smaller radius will generate more diffuse structures, a larger radius will generate smaller and sharper structures.
As a rule of thumb, making a nebula using Affines and Sphericals is about balancing the parameters of the different nodes to achieve a look that you like. Here are some pitfalls that can be avoided, because they can lead to dead ends where nothing you tweak will make it look quite right again. Here’s a list of things that can go wrong:
- High values (much larger than 1) in the Translate portion of Affines can make it difficult to balance the rest of the nebula, especially when most other values are small.
- Choosing different values for the Scale portion of Affines (for example 1, 1, 2) will start distorting the nebula and make the Affine non-conformal.
- Adding large (more than about 20 degrees) to all three angles of the Rotate portion of an Affine can make it impossible to get any kind of filaments in the nebula and result in a dotty and a bit unnatural look. Though this can vary greatly depending on your exact parameters. It’s always good to start with only one or two angles.
- Picking a very small radius for a Spherical can make the nebula extremely diffuse and devoid of any structure.
- Picking a very large radius for a Spherical can cause the nebula to decay into small dots or copies of the entire thing.
- Setting the Offset of a Spherical to anything other than zero will add distortion and make it non-conformal.
- Any nebula that is also used to generate stars will cause elongated and even bent stars if any of the used transforms is non-conformal
Set the following values in the main window:
- On the left side, set your Field of View = 30
- On the right side, set the image size to 1000 x 1000, then click Preview
- Set Warmup = 70 Then open the editor and create the loop shown on the upper right image. Do not touch any values for the Spherical yet, the values for the two Affines are (it doesn’t matter which is which):
Translate | Scale | Rotate | |||||||
---|---|---|---|---|---|---|---|---|---|
Affine1 | 1.2 | 0.2 | 0.6 | 1 | 1 | 1 | 0 | 60 | 60 |
Affine2 | -1 | 0.4 | 0.6 | 2 | 2 | 2 | 60 | 60 | 0 |
Now let’s start playing around and explore the effect of the parameters.
#Useful Parameters and their Effects Let’s start with the radius of the Spherical. A smaller value for the Radius will cause the nebula to become increasingly diffuse, a larger value will make it sharper. You can easily shift the value into ranges where it won’t look like a nebula anymore. As a rule of thumb, you want visible structure but not obvious repetition. Keep in mind that the result is basically a fractal, so you can get stuff like spikes from repeating increasingly smaller shapes or spirals that look unnatural. Of course, feel free to use them anyway if you like the look!
Radius = 0.9 | Radius = 1 | Radius = 1.1 |
Radius = 0.5 | Radius = 0.1 | Radius = -0.2 |
Radius = -0.5 |
The image above shows an example for how the radius will influence the look of your nebula. The top three panels are probably the most interesting ones, and somewhere around Radius = 1 will be the best range. Values around 0.1 – 0.5 will not add interesting nebula elements, but together with a transform that generates stars, they can be used to generate a more uniform star field around the nebula, if desired. Now let’s have a look at the Offset parameter. This will make it non-conformal and add distortion! For the following images, the Radius = 1.
Offset = 0.01 | Offset = 0.025 | Offset = 0.05 |
Offset = -0.01 | Offset = -0.025 | Offset = -0.05 |
As you can see, the nebula is very sensitive to changes in Offset, and even small values will quickly distort it beyond looking like a natural nebula. It can be a neat trick to add a bit of structure, especially if the nebula is diffuse. Play around yourself to see the combined effects. Another simple trick to change the characteristic of a nebula is connecting nodes to themselves. This is done by right clicking and it will add an arrow looping back to the same node. For Sphericals, this will often make the nebula more diffuse, it’s a useful way to quickly get rid of unwanted structure. Of course, this can also be done on the Affines, which will often add structure. Or you can add connections between different nodes. Just play around to see what works, the effects aren’t always straightforward. If the effect is too extreme, click the arrow and adjust its weight to see if it looks nice with a lower weight.
Initial Nebula with Radius = 1 | Connect Spherical to itself |
Self loop with Radius = 1 | Self loop with Radius = -0.5 |
The neat property of this trick is that while it changes the overall sharpness of the nebula, it often doesn’t affect its larger structure much, so you can modify sharpness “in-place” instead of having it shift back and forth like changing the Radius or any parameters of the Affines will often do. Play with the weight of the arrow to explore different degrees of this effect.
On the right side, you can see an example of a loop that uses two different Sphericals. This allows to set a different Radius and Offset for each of the two, giving a bit more control over the look of your nebula.