Disable Imposter Transition Code Where?
by Steve Acaster · in Torque 3D Professional · 04/05/2012 (6:39 pm) · 7 replies
I was about to disable the transition (the screen wipe effect complained about here) between last LOD and imposters ... and then found that I didn't have the code snippet (thought I had it bookmarked but I think that I might have had it in an old project since deleted). Search didn't turn up anything useful, though I do remember someone posting the code in the forums not so long after the hoo-hah.
Anyone got the code fix in their project or the correct thread bookmarked?
Anyone got the code fix in their project or the correct thread bookmarked?
About the author
One Bloke ... In His Bedroom ... Making Indie Games ...
#2
04/05/2012 (8:17 pm)
Yeah, that disables the "fizzle" for everything, can't remember if that was the original fix (but I expect that it probably was). Cheers.
#3
04/05/2012 (10:37 pm)
There was this Resource about a year ago -- was this what you had in mind? It modifies the fizzle shader directly effectively removing the fizzle completely.... though there was a suggested set of "magic numbers" that might help it look better.
#4
In the game/shaders folder --- not in the source, no wonder I couldn't the right bit when looking! Sean h, and I'd gone and looked through the resources of a few likely candidates too ...
Yeah, in the comments there's a mod version that adds horizontal fade to Torque's stock vertical, and it looks much nicer.
Bookmarked for the next time I forget!
04/06/2012 (6:44 am)
That was what I was thinking about, SilentMike! In the game/shaders folder --- not in the source, no wonder I couldn't the right bit when looking! Sean h, and I'd gone and looked through the resources of a few likely candidates too ...
Yeah, in the comments there's a mod version that adds horizontal fade to Torque's stock vertical, and it looks much nicer.
Bookmarked for the next time I forget!
#5
For example, in game\shaders\common\torque.hlsl
08/15/2012 (1:21 am)
The default transition code fades 'diagonal'. If you add another 'angle' to it you'll get a bit more 'noisy' (natural) effect and more pixels will be transparent even faster.For example, in game\shaders\common\torque.hlsl
void fizzle(float2 vpos, float visibility)
{
float2x2 m = { vpos.x, 0.916, vpos.y, 0.350 };
float2x2 n = { vpos.x, 0.350, vpos.y, 0.916 };
clip( visibility - frac( determinant( m ) ) );
clip( visibility - frac( determinant( n ) ) );
}
#6
08/15/2012 (1:35 am)
It's too bad this effect is not applied on the imposter steps. This would be a great improvement. The 'popping' effect between the various angles (steps) is almost too ugly to mention. When creating forests, imposters need to show up much closer which increases the 'popping' effect enormously.
#7
ts/tsShape.cpp, about line 51
...Resulting in a sudden change from model to imposter (just like any other detail level change). Depending on your perspective this may be the best-looking option and could have some small performance gain (vs rendering both at once in some cases).
This also gives you the option of leaving the actual fade effect for some other situations and skipping it when transitioning to/from imposters.
I realize this is a very old thread, but I was trying to disable this effect and ran into the discussion in my search. Thought this might help someone at some point.
05/01/2014 (12:59 pm)
If you remove this effect entirely the engine will still render the imposter and model at the same time for a short period before the actual transition size of the imposter is reached. If you don't want that to happen you can remove the imposter fade period here instead:ts/tsShape.cpp, about line 51
F32 TSShape::smAlphaInBillboard = -1.0f; // was 0.15f; F32 TSShape::smAlphaOutBillboard = -1.0f; // was 0.15f;
...Resulting in a sudden change from model to imposter (just like any other detail level change). Depending on your perspective this may be the best-looking option and could have some small performance gain (vs rendering both at once in some cases).
This also gives you the option of leaving the actual fade effect for some other situations and skipping it when transitioning to/from imposters.
I realize this is a very old thread, but I was trying to disable this effect and ran into the discussion in my search. Thought this might help someone at some point.
Torque Owner Alfio Saitta
Collateral Studios
At the end of:
try to comment:
U can find the fizzle effect code at the EOF of the torque.hlsl in the shaders/common/ folder