Topic Development / Developer's Corner / Completing lights branch - integration into object rendering

Also I don't believe in waiting on branches.

> Also I don't believe in waiting on branches.
Point taken.
> My suggestion about the lighting of sprites and normal maps on sprites seem to be mutually exclusive though.
Well, one easy possibility would be: If an object has a normal map, then the normal map is used, and otherwise the intensity-only lighting.
I have implemented normal maps for sprite graphics, and tried it out with the firestone. Just place a file called Normal.png with the same dimensions as Graphics.png in the object definition. The firestone normal map itself was generated with a small script, and can certainly be tweaked somewhat more. The second screenshot compares the looks of a fire stone (with normal map) and a loam (without normal map). When a sprite does not have a normal map, only the light intensity is now applied, and the light direction is ignored.
Nice. And yes, that sounds like what I was using for the normal calculation as well. Nothing set in stone here - we just need to find something that looks good but doesn't cost us too much on the GPU.
Yeah - the idea was that the sun would basically guarantee that Sky was always illuminated. Still can't figure out the technical details though. With the current code we'd need some other kind of special case for Sky, I feel...
Also note that the normal calculation only happens at triangle points (with linear interpolation in between). This unfortunately means that the fade is different depending on how far away the beam end is. If somebody wants to fix this - this would require splitting the main ray triangle into a triangle (until the point where normals max out) and a quad for the homogeneous parts. That should then give a "circle" around the Clonk as it should be.
Also have been working a bit on fixing the issue with the rounding artefacts. You'd just need to blend the old state over the frame buffer, I think. Simple in theory, but my OpenGL-Fu isn't good enough to figure out how. I *think* this requires
> * The clonk is now also lightening up the sky right behind it, like it would light up tunnel. Maybe that should not happen.
Yeah - the idea was that the sun would basically guarantee that Sky was always illuminated. Still can't figure out the technical details though. With the current code we'd need some other kind of special case for Sky, I feel...
Also note that the normal calculation only happens at triangle points (with linear interpolation in between). This unfortunately means that the fade is different depending on how far away the beam end is. If somebody wants to fix this - this would require splitting the main ray triangle into a triangle (until the point where normals max out) and a quad for the homogeneous parts. That should then give a "circle" around the Clonk as it should be.
Also have been working a bit on fixing the issue with the rounding artefacts. You'd just need to blend the old state over the frame buffer, I think. Simple in theory, but my OpenGL-Fu isn't good enough to figure out how. I *think* this requires
glTexEnv
, but that's marked with a "use shaders instead", so I got side-tracked trying to generalise shaders yet again...

openclonk-debug.exe!std::vector<C4BltVertex,std::allocator<C4BltVertex> >::operator[](unsigned __int64 _Pos) Line 1141 C++
openclonk-debug.exe!C4PXSSystem::Draw(C4TargetFacet & cgo) Line 346 C++
openclonk-debug.exe!C4Viewport::Draw(C4TargetFacet & cgo0, bool fDrawOverlay) Line 246 C++
openclonk-debug.exe!C4Viewport::Execute() Line 336 C++
openclonk-debug.exe!C4ViewportWindow::PerformUpdate() Line 179 C++
openclonk-debug.exe!C4Window::RequestUpdate() Line 1051 C++
openclonk-debug.exe!C4ViewportList::Execute(bool DrawBackground) Line 753 C++
openclonk-debug.exe!C4GraphicsSystem::Execute() Line 136 C++
openclonk-debug.exe!ViewportWinProc(HWND__ * hwnd, unsigned int uMsg, unsigned __int64 wParam, __int64 lParam) Line 315 C++
pixVtx
(and lineVtx
) has a size of 0.
Zapper had a fix for this, but apparently not committed? Should be fixed now.
Topic Development / Developer's Corner / Completing lights branch - integration into object rendering
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill