C# Class ProbeSHEncoder.EncoderForm

Inheritance: System.Windows.Forms.Form
Mostra file Open project: Patapom/GodComplex

Private Properties

Property Type Description
GetRegKey string
GetRegKeyFloat float
GetRegKeyInt int
InitializeComponent void
LoadCubeMap void
MessageBox void
MessageBox void
MessageBox void
MessageBox void
SetRegKey void
batchEncodeToolStripMenuItem_Click void
buttonComputeFilling_Click void
buttonCompute_Click void
buttonReset_Click void
checkBoxSHDynamic_CheckedChanged void
checkBoxSHEmissive_CheckedChanged void
checkBoxSHNormalized_CheckedChanged void
checkBoxSHOcclusion_CheckedChanged void
checkBoxSHStatic_CheckedChanged void
checkBoxSetIsolation_CheckedChanged void
encodeFaceProbesToolStripMenuItem_Click void
floatTrackbarControlAlbedo_ValueChanged void
floatTrackbarControlLambda_ValueChanged void
floatTrackbarControlNormal_ValueChanged void
floatTrackbarControlPosition_ValueChanged void
integerTrackbarControlK_ValueChanged void
integerTrackbarControlLightSamples_ValueChanged void
integerTrackbarControlSetIsolation_ValueChanged void
loadProbeToolStripMenuItem_Click void
radioButtonAlbedo_CheckedChanged void
radioButtonDistance_CheckedChanged void
radioButtonEmissiveMatID_CheckedChanged void
radioButtonFaceIndex_CheckedChanged void
radioButtonNeighborProbeID_CheckedChanged void
radioButtonNormal_CheckedChanged void
radioButtonSH_CheckedChanged void
radioButtonSetColor_CheckedChanged void
radioButtonSetDistance_CheckedChanged void
radioButtonSetIndex_CheckedChanged void
radioButtonSetNormal_CheckedChanged void
radioButtonSetSamples_CheckedChanged void
radioButtonStaticLit_CheckedChanged void
saveResultsToolStripMenuItem_Click void

Public Methods

Method Description
EncoderForm ( ) : System

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

Private Methods

Method Description
GetRegKey ( string _Key, string _Default ) : string
GetRegKeyFloat ( string _Key, float _Default ) : float
GetRegKeyInt ( string _Key, float _Default ) : int
InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

LoadCubeMap ( FileInfo _POMCubeMap ) : void
MessageBox ( string _Text ) : void
MessageBox ( string _Text, MessageBoxButtons _Buttons ) : void
MessageBox ( string _Text, MessageBoxButtons _Buttons, MessageBoxIcon _Icon ) : void
MessageBox ( string _Text, MessageBoxIcon _Icon ) : void
SetRegKey ( string _Key, string _Value ) : void
batchEncodeToolStripMenuItem_Click ( object sender, EventArgs e ) : void
buttonComputeFilling_Click ( object sender, EventArgs e ) : void
buttonCompute_Click ( object sender, EventArgs e ) : void
buttonReset_Click ( object sender, EventArgs e ) : void
checkBoxSHDynamic_CheckedChanged ( object sender, EventArgs e ) : void
checkBoxSHEmissive_CheckedChanged ( object sender, EventArgs e ) : void
checkBoxSHNormalized_CheckedChanged ( object sender, EventArgs e ) : void
checkBoxSHOcclusion_CheckedChanged ( object sender, EventArgs e ) : void
checkBoxSHStatic_CheckedChanged ( object sender, EventArgs e ) : void
checkBoxSetIsolation_CheckedChanged ( object sender, EventArgs e ) : void
encodeFaceProbesToolStripMenuItem_Click ( object sender, EventArgs e ) : void

This tool builds the additional vertex stream for each primitive that will attach the best probe ID (as a U16) to a vertex so the vertex shader has a single entry point into the probes network Most face indices have already been rendered in the probe cube map and the batch processing tool took care of selecting the most important probe for these faces, but some faces don't have probe information. Maybe they have been occluded by other faces (shadowing) or are too small to be rendered in the cube map. For these special faces, we need to propagate probe IDs from valid faces until the entire mesh is filled with valid probe IDs. We proceed primitive per primitive since they are all disconnected so no propagation would be possible cross primitives unless we could reconnect split vertices, but I don't want to do that. Maybe it will become necessary at some point but for the moment I don't care. Some primitives may lack probe ID completely (!!), for these I choose to assign the ID of the nearest probe, which may be a bit dangerous, especially if we're dealing with probes that are standing right behind the primitive for example. In that case, perhaps using a scoring scheme that depends on both distance and orientation would be better? Let's see that when the problem arises...

floatTrackbarControlAlbedo_ValueChanged ( Nuaj _Sender, float _fFormerValue ) : void
floatTrackbarControlLambda_ValueChanged ( Nuaj _Sender, float _fFormerValue ) : void
floatTrackbarControlNormal_ValueChanged ( Nuaj _Sender, float _fFormerValue ) : void
floatTrackbarControlPosition_ValueChanged ( Nuaj _Sender, float _fFormerValue ) : void
integerTrackbarControlK_ValueChanged ( Nuaj _Sender, int _FormerValue ) : void
integerTrackbarControlLightSamples_ValueChanged ( Nuaj _Sender, int _FormerValue ) : void
integerTrackbarControlSetIsolation_ValueChanged ( Nuaj _Sender, int _FormerValue ) : void
loadProbeToolStripMenuItem_Click ( object sender, EventArgs e ) : void
radioButtonAlbedo_CheckedChanged ( object sender, EventArgs e ) : void
radioButtonDistance_CheckedChanged ( object sender, EventArgs e ) : void
radioButtonEmissiveMatID_CheckedChanged ( object sender, EventArgs e ) : void
radioButtonFaceIndex_CheckedChanged ( object sender, EventArgs e ) : void
radioButtonNeighborProbeID_CheckedChanged ( object sender, EventArgs e ) : void
radioButtonNormal_CheckedChanged ( object sender, EventArgs e ) : void
radioButtonSH_CheckedChanged ( object sender, EventArgs e ) : void
radioButtonSetColor_CheckedChanged ( object sender, EventArgs e ) : void
radioButtonSetDistance_CheckedChanged ( object sender, EventArgs e ) : void
radioButtonSetIndex_CheckedChanged ( object sender, EventArgs e ) : void
radioButtonSetNormal_CheckedChanged ( object sender, EventArgs e ) : void
radioButtonSetSamples_CheckedChanged ( object sender, EventArgs e ) : void
radioButtonStaticLit_CheckedChanged ( object sender, EventArgs e ) : void
saveResultsToolStripMenuItem_Click ( object sender, EventArgs e ) : void

Method Details

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
return void

EncoderForm() public method

public EncoderForm ( ) : System
return System