tS4.3 CustomShader API useless?

Smart people ~ Great Scripts
Post Reply
zzador
Petty Officer Second Class
Posts: 29
Joined: 06 Sep 2019, 08:47
Type the number ten into the box: 10

tS4.3 CustomShader API useless?

Post by zzador »

Hello everybody,

I experimented with the customshader SDK and trueSpace 4.3 over the weekend and my initial ideas are pretty much dead now. I wanted to create a metal shader (reflective shader) with real soft-reflections. I studied the 2 documents (customShader API & tsxAPI) pretty deep and came up with a satisfying shader...up to the point where I moved another object between the light and the metal object and the highlight was still visible on my metal object. That was the moment when it doomed me: There is no shadow-test-function within the whole API. Internal shaders seem to have the ability to query if there is an object between a light and the current shading point but custom shaders have not...or at least it is not documented. The same goes for the current "raydepth" as I didn't want to spawn multiple rays at every raydepth but just at the first depth. For that however I got a good workaround as I just need to look if the direction to the camera equals the incident direction. That way I can distiguish between primary ray and secondary ray. But for the light occlusion problem I still have no solution. Is the custom shader api really that broken? In the year 1999 raytracers were already well researched and the same goes for shader-pipelines (Pixar's Renderman had already more than 15 years on it's back). Did caligari just forgot these important features back then or are they just not documented?
I've seen things, you people wouldn't believe...
the rise & fall of MS-DOS. The birth of Windows 3.11. Professional 3D Software getting usable in the late 90s and getting unusable again around 2010. Telephones with a dial and so much more...
zzador
Petty Officer Second Class
Posts: 29
Joined: 06 Sep 2019, 08:47
Type the number ten into the box: 10

Re: tS4.3 CustomShader API useless?

Post by zzador »

Solved! It seems the "***Term"-Functions do check for light occlusion. So all lighting should be done by this functions. Softreflections working perfectly now.
I've seen things, you people wouldn't believe...
the rise & fall of MS-DOS. The birth of Windows 3.11. Professional 3D Software getting usable in the late 90s and getting unusable again around 2010. Telephones with a dial and so much more...
Post Reply