Русский New site

Advanced search

[ New messages · Forum rules · Members ]
Page 5 of 6«123456»
Forum » SpaceEngine » Mods and Addons » Shader programming (Questions and answers about shader programming)
Shader programming
JackDoleDate: Sunday, 24.01.2016, 19:13 | Message # 61
Star Engineer
Group: Local Moderators
Germany
Messages: 1737
Status: Offline
Currently my supergiants look like this:

MNL Cygni




Attachments: 0392221.jpg(137Kb) · 2449662.jpg(327Kb) · 9755154.jpg(175Kb) · 0751413.jpg(222Kb) · 7597482.jpg(95Kb) · 8830498.jpg(203Kb) · 6122236.jpg(206Kb) · tg_sun.zip(2Kb)





Don't forget to look here.



Edited by JackDole - Sunday, 24.01.2016, 19:15
 
JackDoleDate: Sunday, 24.01.2016, 22:47 | Message # 62
Star Engineer
Group: Local Moderators
Germany
Messages: 1737
Status: Offline
I started from scratch, and it now looks like this:



Parallel view


No sunspots.


If I install sunspots, it looks like this:



Parallel view


I think the first is better.

Attachments: 4725085.jpg(109Kb) · 1176616.jpg(159Kb) · 1953111.jpg(125Kb) · 2526950.jpg(179Kb) · NoSunSpots.zip(2Kb) · SunSpots.zip(2Kb)





Don't forget to look here.

 
DoctorOfSpaceDate: Monday, 25.01.2016, 08:54 | Message # 63
Galaxy Architect
Group: Global Moderators
Pirate
Messages: 3599
Status: Online
Nice edits JackDole, will check them out.




Alright with your edits combined with my own I have fixed the darkening issue in the star hills and corrected the sunspots to be more chaotic without losing surface details.

Some tweaking to the surface details might help

Shaders are attached






I have also found a way to make the hills any size one could want while keeping the proper coloring



Attachments: tg0sun0glow.glsl(3Kb) · tg0sun0height.glsl(4Kb)





Intel Core i7-5820K 4.2GHz 6-Core Processor
G.Skill Ripjaws V Series 32GB (4 x 8GB) DDR4-2400 Memory
EVGA GTX 980 Ti SC 6GB
 
JackDoleDate: Monday, 25.01.2016, 13:09 | Message # 64
Star Engineer
Group: Local Moderators
Germany
Messages: 1737
Status: Offline
I have made a mistake in the IF statements for differentiating between giant stars and ordinary stars. :(

The expression:
Code
    if ((dunesMagn == 1.0) || (hillsMagn == 1.0))       // Changed sun shader

must be:
Code
    if ((dunesMagn >= 1.0) || (hillsMagn >= 1.0))       // Changed sun shader


I had the values for "dunesMagn" and "hillsMagn" from the editor, there go those values only to 1. In fact, the value may be greater than 1, at least in "dunesMagn".



Quote DoctorOfSpace ()
I have also found a way to make the hills any size one could want

Do you mean that?



Okay, maybe somewhat exaggerated. dry



I have the variable "flatterer" renamed to "flatHills", which expresses better its function. I also have the variable used in a different position. I think that works better.

Before


After




My current version:

Without Freckles:


With freckles:



Although I otherwise freckles may well, I am still of the opinion, the star without freckles looks better.

Attachments: 0640484.jpg(157Kb) · 6324099.jpg(126Kb) · 5178182.jpg(137Kb) · 3726524.jpg(151Kb) · 4567827.jpg(216Kb) · V0.3.zip(2Kb)





Don't forget to look here.



Edited by JackDole - Monday, 25.01.2016, 20:05
 
DoctorOfSpaceDate: Tuesday, 26.01.2016, 00:09 | Message # 65
Galaxy Architect
Group: Global Moderators
Pirate
Messages: 3599
Status: Online
I think with how it is now anything you want can be done with it so perhaps a few different release versions can be setup and put in their own thread.




Intel Core i7-5820K 4.2GHz 6-Core Processor
G.Skill Ripjaws V Series 32GB (4 x 8GB) DDR4-2400 Memory
EVGA GTX 980 Ti SC 6GB
 
aimeilianDate: Saturday, 30.01.2016, 22:34 | Message # 66
Observer
Group: Newbies
United States
Messages: 9
Status: Offline
Some wonderful work here :)

Meanwhile I have started tentatively poking around at some of the planet shaders, specifically tg_terra_color.glsl and tg_common.glsl. I have enough programming experience to sort of follow what's going on in these files (and their dependencies), but one thing eludes me:

Where and how are sea colours applied? wacko

I'm hoping to add a little colour variation to the oceans (think plankton blooms), but I can't find a single place that actually applies what appears to be the sea colour (mareParams.x).

I'm sure I'm missing something obvious, but if anyone can point me in the right direction I would be very appreciative!

My hope is to add an extra sea colour parameter that would generate some cloud-like noise on oceans. After all, one can customise the colour of "plants" so why not do the same for our friendly sea critters? smile

Cheers,
 
DoctorOfSpaceDate: Saturday, 30.01.2016, 22:40 | Message # 67
Galaxy Architect
Group: Global Moderators
Pirate
Messages: 3599
Status: Online
Quote aimeilian ()
Where and how are sea colours applied?


Shaders in the cache folder and palette file.

Basically means modifying them is pretty much impossible beyond changing their overall color in the palette file.





Intel Core i7-5820K 4.2GHz 6-Core Processor
G.Skill Ripjaws V Series 32GB (4 x 8GB) DDR4-2400 Memory
EVGA GTX 980 Ti SC 6GB
 
aimeilianDate: Saturday, 30.01.2016, 22:49 | Message # 68
Observer
Group: Newbies
United States
Messages: 9
Status: Offline
Quote DoctorOfSpace ()
Basically means modifying them is pretty much impossible


Well, that's a bummer. But thanks for the prompt reply! At least I wasn't missing anything obvious (I think).
 
DoctorOfSpaceDate: Saturday, 30.01.2016, 22:53 | Message # 69
Galaxy Architect
Group: Global Moderators
Pirate
Messages: 3599
Status: Online
Quote aimeilian ()
But thanks for the prompt reply!


No problem. I too wanted to modify water shaders before but sadly learned that even if you do modify them or any other cached shaders it won't work for anyone else due to name differences. sad





Intel Core i7-5820K 4.2GHz 6-Core Processor
G.Skill Ripjaws V Series 32GB (4 x 8GB) DDR4-2400 Memory
EVGA GTX 980 Ti SC 6GB
 
KludDate: Tuesday, 09.02.2016, 12:18 | Message # 70
Astronaut
Group: Users
Russian Federation
Messages: 71
Status: Offline
Due to the number of exhaust effects may be increased in the future, I have tried to do something similar to the exhaust of the Dragon 2. The screenshot can be seen this effect and a small bright "Fusion" effect for nozzle.



Code
#ifdef TYPE_CHEMICAL// like  Dragon 2
float   exhaustDensity(vec3 pos)
{
    // Cylindric coordinates of the point
    float r2 = 1.0 / dot(pos.xy, pos.xy);
    float r = sqrt(r2);
    float l = 0.5 - 0.5 * pos.z;

    // Noise to modulate exhaust core
    vec3 npos = pos;
    npos.z *= 0.005 * EyePosTime.w * (1.0 - step(0.5, l)) + 0.02 * EyePosTime.w * (step(0.5, l));
    npos.xy += EyePosTime.w;
    float l1 = 0.5 - 0.5 * sin(pos.z * 8.0 * (4.0 - pos.z) + 0.4 * noise(npos));

    // Exhaust intensity
    float core = 0.5 * smoothstep(0.50, 3.0, (r2 - 4.0) * (l1 * (1.0 - l1) + 0.05)) * pow(mix(2.0, 0.0, sqrt(sqrt(l1 * (1.0 - l1) + 0.01) - 0.01)), 3.0);
    float mask = 0.5 * smoothstep(0.0, 2.0, r2 * 0.5 * (0.35 - l + 0.05)) * l;
    float envelope = 1.5 * smoothstep(0.8, 3.0, (r2 + 0.8 * noise(npos)) * (l + 0.05)) * clamp(pow(mix(-8.0, 2.0, sqrt(sqrt(1.0 - l + 0.5 * noise(npos) + 0.01) - 0.01)), 3.0), 0.0, 2.0);    
    float mask1 = 1.5 * smoothstep(0.0, 3.0, (l + 0.05)) * (1.0 - step(0.5, l)) + 1.5 * smoothstep(0.0, 3.0, (1.0 - l + 0.05)) * (step(0.5, l));
    
    return 2.0 * core *  mask + envelope * mask1;
}
#endif


Also changed the noise for the main effect "Chemical".
Code
#ifdef TYPE_CHEMICAL
float   exhaustDensity(vec3 pos)
{
    // Cylindric coordinates of the point
    float r2 = 1.0 / dot(pos.xy, pos.xy);
    float r = sqrt(r2);
    float l = 0.5 - 0.5 * pos.z;

    // Noise to modulate exhaust core
    vec3 npos = pos;
    npos.xy *= 4.0;
    npos.xy += EyePosTime.w;
    npos.z *= 0.02 * EyePosTime.w;
    float Noise = 4.0 * smoothstep(0.0, 1.0, l) * noise(npos);

    // Exhaust intensity
    float core =  0.6 * smoothstep(0.5, 3.0, (r2 + 0.8 * noise(npos)) * (l + 0.05)) * clamp(pow(mix(2.0, 0.0, sqrt(sqrt(l + Noise + 0.01) - 0.01)), 3.0), 0.0, 2.0);

    return core;
}
#endif

Attachments: 1448709.jpg(274Kb)


Edited by Klud - Tuesday, 09.02.2016, 12:20
 
JackDoleDate: Tuesday, 09.02.2016, 13:24 | Message # 71
Star Engineer
Group: Local Moderators
Germany
Messages: 1737
Status: Offline
Klud,

have you ever worked with the black hole shader?

I have thought about whether it would be possible to incorporate a ship engines jet in the black hole shader to produce jets for black holes.

But HarbingerDawn has shown
Quote HarbingerDawn ()
Have some jets
that it is much better with comet tails.

Perhaps the comet tail shader could be combined with the black hole shader.

For me, this is, I fear much too complicated.





Don't forget to look here.

 
HarbingerDawnDate: Tuesday, 09.02.2016, 15:49 | Message # 72
Cosmic Curator
Group: Administrators
United States
Messages: 8714
Status: Offline
Holy -! Klud, that engine effect looks AMAZING!




All forum users, please read this!
My SE mods and addons
Phenom II X6 1090T 3.2 GHz, 16 GB DDR3 RAM, GTX 970 3584 MB VRAM
 
raptor_x_xDate: Wednesday, 10.02.2016, 02:02 | Message # 73
Observer
Group: Newbies
United States
Messages: 4
Status: Offline
I loved the shader for giant stars, thanks smile
 
JackDoleDate: Wednesday, 10.02.2016, 08:53 | Message # 74
Star Engineer
Group: Local Moderators
Germany
Messages: 1737
Status: Offline
Quote raptor_x_x ()
I loved the shader for giant stars

The official release page for the shaders is here.





Don't forget to look here.

 
KludDate: Wednesday, 10.02.2016, 15:48 | Message # 75
Astronaut
Group: Users
Russian Federation
Messages: 71
Status: Offline
Quote JackDole ()
Perhaps the comet tail shader could be combined with the black hole shader.


It is necessary to look into this and to experiment, then it will be clear.
 
Forum » SpaceEngine » Mods and Addons » Shader programming (Questions and answers about shader programming)
Page 5 of 6«123456»
Search: