Shader programming
|
|
JackDole | Date: Wednesday, 25.11.2015, 17:51 | Message # 16 |
Star Engineer
Group: Local Moderators
Germany
Messages: 1742
Status: Offline
| Quote Klud ( ) We can get it: Very good, I knew that I have no clue.
However, it is not working properly in 3D mode. But the original shader does also not work properly here.
Original shader:
Don't forget to look here.
|
|
| |
Klud | Date: Wednesday, 25.11.2015, 19:20 | Message # 17 |
Astronaut
Group: Users
Russian Federation
Messages: 72
Status: Offline
| Little added. Although in stereo is not working properly as and other.
Code float exhaustDensity(vec3 pos) { // Cylindric coordinates of the point
float r2 = 1.0 / dot(pos.xy, pos.xy); float l = 0.5 - 0.5 * pos.z;
// Exhaust intensity
float core = 0.6 * smoothstep(0.5, 3.0, r2 * l) * pow(mix(2.0, 0.0, sqrt(sqrt(l + 0.0001))), 3.0);
return core; }
|
|
| |
JackDole | Date: Wednesday, 25.11.2015, 20:03 | Message # 18 |
Star Engineer
Group: Local Moderators
Germany
Messages: 1742
Status: Offline
| Something's not right yet, there are black squares at the end of the jets.
Don't forget to look here.
|
|
| |
HarbingerDawn | Date: Wednesday, 25.11.2015, 22:00 | Message # 19 |
Cosmic Curator
Group: Administrators
United States
Messages: 8717
Status: Offline
| Excellent work Klud!
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
|
|
| |
Klud | Date: Friday, 27.11.2015, 22:49 | Message # 20 |
Astronaut
Group: Users
Russian Federation
Messages: 72
Status: Offline
| Quote JackDole ( ) black squares at the end of the jets.
Try this:
Code float core = 0.6 * smoothstep(0.5, 3.0, r2 * l) * pow(mix(2.0, 0.0, sqrt(sqrt(l + 0.001) - 0.001)), 3.0);
|
|
| |
JackDole | Date: Friday, 27.11.2015, 23:58 | Message # 21 |
Star Engineer
Group: Local Moderators
Germany
Messages: 1742
Status: Offline
| Quote Klud ( ) Try this: Good. I had even found a solution, as I have examined the value of 'intensity' in the calling function to 0. But I think your method is better because it does not require additional changes elsewhere in the script.
Don't forget to look here.
|
|
| |
HarbingerDawn | Date: Saturday, 28.11.2015, 15:06 | Message # 22 |
Cosmic Curator
Group: Administrators
United States
Messages: 8717
Status: Offline
| Thanks so much for finding a solution, Klud
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
|
|
| |
Klud | Date: Saturday, 28.11.2015, 16:08 | Message # 23 |
Astronaut
Group: Users
Russian Federation
Messages: 72
Status: Offline
| Quote JackDole ( ) I had even found a solution, as I have examined the value of 'intensity' in the calling function to 0.
Very good, you can try different ways to improvement.
HarbingerDawn, looks naturally !
And little update:
Code float core = 0.6 * smoothstep(0.5, 3.0, r2 * (l + 0.05)) * pow(mix(2.0, 0.0, sqrt(sqrt(l + 0.001) - 0.001)), 3.0);
|
|
| |
Destructor1701 | Date: Saturday, 28.11.2015, 22:19 | Message # 24 |
Pioneer
Group: Users
Ireland
Messages: 533
Status: Offline
| Holy crap, Klud, JD, Harb!
GREAT, frickin' MIRACULOUS work!
|
|
| |
JackDole | Date: Saturday, 28.11.2015, 22:55 | Message # 25 |
Star Engineer
Group: Local Moderators
Germany
Messages: 1742
Status: Offline
| Quote Destructor1701 ( ) JD, That's all alone Klud's merit. I have also tried, but unfortunately without success.
Don't forget to look here.
|
|
| |
Klud | Date: Sunday, 29.11.2015, 22:47 | Message # 26 |
Astronaut
Group: Users
Russian Federation
Messages: 72
Status: Offline
| I feel the support of the community, so we can say - all involved.
|
|
| |
HarbingerDawn | Date: Tuesday, 01.12.2015, 16:16 | Message # 27 |
Cosmic Curator
Group: Administrators
United States
Messages: 8717
Status: Offline
| Yes, everyone deserves credit for their efforts, even if they did not succeed.
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
|
|
| |
n0b0dy | Date: Wednesday, 13.01.2016, 16:43 | Message # 28 |
Explorer
Group: Users
Pirate
Messages: 297
Status: Offline
| Quote DoctorOfSpace ( ) With a modified accretion disk shader it might be possible to add "real" jets
Maybe it's time for some shader programming magic by Klud, JackDole, and the good DoctorOfSpace
Edited by n0b0dy - Wednesday, 13.01.2016, 16:44 |
|
| |
JackDole | Date: Wednesday, 13.01.2016, 17:44 | Message # 29 |
Star Engineer
Group: Local Moderators
Germany
Messages: 1742
Status: Offline
| It may eventually be possible to change the 'AccretionDisk' function so that it produces instead a disk something like a jet. (I'm not saying that I can do it). But then we would have the same problem as in SE 0.974.7 with the black hole and the wormhole, either one or the other. The same solution we have found there to make the choice of function depends on the size, would not be possible here. We then need something like:
Code #ifdef ACCR_DISK // if ray hit the accreation disk, accumulate its emission and absorption AccretionDisk(rayPos, rayDir, rayDist, color, transm); #endif
only for a jet, ie:
Code #ifdef ACCR_JET JET(parameter1, parameter2, ...); #endif
This parameter 'ACCR_JET' but must be encoded in the SpaceEngine.exe.
Don't forget to look here.
|
|
| |
SpaceEngineer | Date: Wednesday, 13.01.2016, 19:45 | Message # 30 |
Author of Space Engine
Group: Administrators
Russian Federation
Messages: 4800
Status: Offline
| Quote JackDole ( ) It may eventually be possible to change the 'AccretionDisk' function so that it produces instead a disk something like a jet. (I'm not saying that I can do it). But then we would have the same problem as in SE 0.974.7 with the black hole and the wormhole, either one or the other. The same solution we have found there to make the choice of function depends on the size, would not be possible here. We then need something like:
Why? If black hole have a disk, then it must have a jet. One is impossible with another. Jet function could be added in the code in thr same way as the disk, and must blend with it correctly.
|
|
| |