Daz NSRT - first Raytracer (17.08.2019)

Jul 22, 2018
190
126
223
https://f95zone.to/threads/nsrt-0-9-0-dev-release.273670/

Thank you, for your wanted help recreation & Saki_Sliz .
Now i Fix some problems, and work on the Opacity/Transparent Map and Reflections...

I need help for Color-Calculation
If i hit a Triangle with lower Transpanrent and than a Trinagle with non Transpanrent...how i should calculate???

Thank you
Opacity/Transparent test : Specular + Ambient Occlusion + Shadow + Bump Map + Opacity
opatest.png

Specular + Ambient Occlusion + Shadow + Bump Map


saod.png
Ambient Occlusion

Test with Shadow
aos.png
Second Test
ao.png

First Test
AO01.png



r2.png
r1.png

r0.png
A
 
Last edited:

recreation

pure evil!
Respected User
Game Developer
Jun 10, 2018
6,349
23,344
871
I don't know how to calculate them, but here is a nice article about that explains the difference of the maps quite well:
I've rad it a while ago and it made me understand the difference between them and when and for what to use which map.
 
Jul 22, 2018
190
126
223
I don't know how to calculate them, but here is a nice article about that explains the difference of the maps quite well:
I've rad it a while ago and it made me understand the difference between them and when and for what to use which map.
THX, the Part with the Bump map, was helpfull !!!!
 

Saki_Sliz

Well-Known Member
May 3, 2018
1,403
1,023
162
whoa, you got Ambient occlusion in?! that is something I have wanted to play with, at least with texture generation. what are you using for code? are you making custom shaders like open shader language, or are you coding in things raw like with C or something similar?
 
Jul 22, 2018
190
126
223
whoa, you got Ambient occlusion in?! that is something I have wanted to play with, at least with texture generation. what are you using for code? are you making custom shaders like open shader language, or are you coding in things raw like with C or something similar?
writen all in C#.....I don´t use Directx or Opengl....I load all Vertices, build the Trinagles....Genarate a world of Boxes to add vertices-Ids in it...for fast rendering....and the send the rays...
 
Jul 22, 2018
190
126
223
//Ambient Occlusion
float amount = 0.5f;
float end = 0.5f;
for (float xx = -end; xx <= end; xx+=amount)
{ for (float yy = -end; yy <= end; yy += amount)
{ for (float zz = -end; zz <= end; zz += amount)
{
Vector3 dir = NearestInersection.Normal + new Vector3(xx, yy, zz);
Ray aotray = new Ray((NearestInersection.Position + Vector3.Multiply(NearestInersection.Normal, 0.0000001f)), dir);
RenderPixel(new object[] { aotray, x, y, thread, RayOption.AO, NearestInersection, currentBound + 1 });
}
}
}