// This method is called to reset the texmap back to its default values. void Planet::Init() { // Reset the XYZGen or allocate a new one if (xyzGen) xyzGen->Reset(); else ReplaceReference(0, GetNewDefaultXYZGen()); // ReplaceReference(1, CreateParameterBlock(pbdesc, // PB_LENGTH, PLANET_PB_VERSION)); // if (paramDlg) // paramDlg->pmap->SetParamBlock(pblock); // Set the inital parameters // {10,20,80},{10,30,80},{10,40,90},{10,100,12}, // {100,80,12},{80,20,8},{100,80,50},{100,100,100} SetColor(0, Color(0.04f, 0.08f, 0.31f), TimeValue(0)); SetColor(1, Color(0.04f, 0.12f, 0.31f), TimeValue(0)); SetColor(2, Color(0.04f, 0.16f, 0.31f), TimeValue(0)); SetColor(3, Color(0.04f, 0.39f, 0.05f), TimeValue(0)); SetColor(4, Color(0.39f, 0.31f, 0.05f), TimeValue(0)); SetColor(5, Color(0.31f, 0.08f, 0.03f), TimeValue(0)); SetColor(6, Color(0.39f, 0.31f, 0.20f), TimeValue(0)); SetColor(7, Color(0.39f, 0.39f, 0.39f), TimeValue(0)); SetSize(40.0f, TimeValue(0)); SetIsland(0.5f, TimeValue(0)); SetPercent(60.0f, TimeValue(0)); SetSeed(12345, TimeValue(0)); blend = 1; // Set the validity interval of the texture to empty texValidity.SetEmpty(); }
void Noise::Init() { if (xyzGen) xyzGen->Reset(); else ReplaceReference( XYZGEN_REF, GetNewDefaultXYZGen()); if (texout) texout->Reset(); else ReplaceReference( TEXOUT_REF, GetNewDefaultTextureOutput()); ivalid.SetEmpty(); cacheValid.SetEmpty(); macroRecorder->Disable(); // disable macrorecorder during reset SetColor(0, Color(0.0f,0.0f,0.0f), TimeValue(0)); SetColor(1, Color(1.0f,1.0f,1.0f), TimeValue(0)); noiseType = NOISE_REGULAR; #ifndef RENDER_VER RegisterDistanceDefault(_T("Noise Params"), _T("Size"), DEFAULT_NOISE_SIZE, IN_TO_M(DEFAULT_NOISE_SIZE)); float size = GetDistanceDefault(_T("Noise Params"), _T("Size")); SetSize(size, TimeValue(0)); #else SetSize(DEFAULT_NOISE_SIZE, TimeValue(0)); #endif SetPhase(.0f,TimeValue(0)); SetLevels(3.0f,TimeValue(0)); pblock->SetValue(noise_hithresh,0,1.0f); macroRecorder->Enable(); for (int i=0; i<NSUBTEX; i++) mapOn[i] = 1; }
void CellTex::Init() { if (xyzGen) xyzGen->Reset(); else ReplaceReference(1, GetNewDefaultXYZGen()); if (texout) texout->Reset(); else ReplaceReference(2, GetNewDefaultTextureOutput()); RegisterDistanceDefault(_T("Cellular Params"), _T("Size"), 5.0f, IN_TO_M(5.0f)); float size = GetDistanceDefault(_T("Cellular Params"), _T("Size")); pblock->SetValue(cellular_size,0,size); /* pblock->SetValue(PB_CELLCOL,0,Point3(1,1,1)); pblock->SetValue(PB_DIVCOL1,0,Point3(.5f,.5f,.5f)); pblock->SetValue(PB_DIVCOL2,0,Point3(0,0,0)); pblock->SetValue(PB_SIZE,0,5.0f); pblock->SetValue(PB_SPREAD,0,0.5f); pblock->SetValue(PB_LOW,0,0.0f); pblock->SetValue(PB_MID,0,0.5f); pblock->SetValue(PB_HIGH,0,1.0f); pblock->SetValue(PB_FRACT,0,0); pblock->SetValue(PB_ITER,0,3.0f); pblock->SetValue(PB_USECELLMAP,0,1); pblock->SetValue(PB_USEDIV1MAP,0,1); pblock->SetValue(PB_USEDIV2MAP,0,1); pblock->SetValue(PB_SMOOTH,0,0.1f); pblock->SetValue(PB_ADAPT,0,1); if (paramDlg) paramDlg->pmap->SetParamBlock(pblock); */ fract = 0; ivalid.SetEmpty(); }
// This method is called to reset the texmap back to its default values. void Speckle::Init() { // Reset the XYZGen or allocate a new one if (xyzGen) xyzGen->Reset(); else ReplaceReference(0, GetNewDefaultXYZGen()); // Set the inital colors and size SetColor(0, DEFAULT_COLOR1, TimeValue(0)); SetColor(1, DEFAULT_COLOR2, TimeValue(0)); SetSize(DEFAULT_SPECKLE_SIZE, TimeValue(0)); // Set the validity interval of the texture to empty texValidity.SetEmpty(); }
// This method is called to reset the texmap back to its default values. void Speckle::Init() { // Reset the XYZGen or allocate a new one if (xyzGen) xyzGen->Reset(); else ReplaceReference(0, GetNewDefaultXYZGen()); // Set the inital colors and size SetColor(0, DEFAULT_COLOR1, TimeValue(0)); SetColor(1, DEFAULT_COLOR2, TimeValue(0)); RegisterDistanceDefault(_T("Speckle Params"), _T("Size"), DEFAULT_SPECKLE_SIZE, IN_TO_M(DEFAULT_SPECKLE_SIZE)); float size = GetDistanceDefault(_T("Speckle Params"), _T("Size")); SetSize(size, TimeValue(0)); // Set the validity interval of the texture to empty texValidity.SetEmpty(); }
// This method is called to reset the texmap back to its default values. void Stucco::Init() { // Reset the XYZGen or allocate a new one if (xyzGen) xyzGen->Reset(); else ReplaceReference(0, GetNewDefaultXYZGen()); // Set the inital parameters SetColor(0, Color(0.0f, 0.0f, 0.0f), TimeValue(0)); SetColor(1, Color(0.9f, 0.9f, 0.9f), TimeValue(0)); SetSize(20.0f, TimeValue(0)); SetThresh(0.57f, TimeValue(0)); SetThick(0.15f, TimeValue(0)); // Set the validity interval of the texture to empty texValidity.SetEmpty(); }
// This method is called to reset the texmap back to its default values. void Water::Init() { // Reset the XYZGen or allocate a new one if (xyzGen) xyzGen->Reset(); else ReplaceReference(0, GetNewDefaultXYZGen()); // This replaces the reference to the previous parameter block with // a new one. Note that the previous one is automatically deleted // because when the last reference to an item is deleted, MAX deletes // the item itself. // ReplaceReference(1, CreateParameterBlock(pbdesc, // PB_LENGTH, WATER_PB_VERSION)); // if (paramDlg) // paramDlg->pmap->SetParamBlock(pblock); // Set the inital parameters SetColor(0, DEFAULT_COLOR1, TimeValue(0)); SetColor(1, DEFAULT_COLOR2, TimeValue(0)); SetRandSeed(0x75cf); SetNum(DEFAULT_NUM_WAVESETS, TimeValue(0)); RegisterDistanceDefault(_T("Wave Params"), _T("Size"), DEFAULT_WAVE_RADIUS, IN_TO_M(DEFAULT_WAVE_RADIUS)); float size = GetDistanceDefault(_T("Wave Params"), _T("Size")); SetSize(size, TimeValue(0)); RegisterDistanceDefault(_T("Wave Params"), _T("Len Min"), DEFAULT_WAVE_LEN_MIN, IN_TO_M(DEFAULT_WAVE_LEN_MIN)); float lenMin = GetDistanceDefault(_T("Wave Params"), _T("Len Min")); SetLenMin(lenMin, TimeValue(0)); RegisterDistanceDefault(_T("Wave Params"), _T("Len Max"), DEFAULT_WAVE_LEN_MAX, IN_TO_M(DEFAULT_WAVE_LEN_MAX)); float lenMax = GetDistanceDefault(_T("Wave Params"), _T("Len Max")); SetLenMax(lenMax, TimeValue(0)); SetAmp(1.0f, TimeValue(0)); SetPhase(0.0f, TimeValue(0)); ReInit(); type = 0; // Set the validity interval of the texture to empty texValidity.SetEmpty(); }
// This method is called to reset the texmap back to its default values. void Splat::Init() { // Reset the XYZGen or allocate a new one if (xyzGen) xyzGen->Reset(); else ReplaceReference(0, GetNewDefaultXYZGen()); // Set the inital parameters SetColor(0, Color(0.7f, 0.8f, 0.8f), TimeValue(0)); SetColor(1, Color(0.2f, 0.5f, 1.0f), TimeValue(0)); RegisterDistanceDefault(_T("Splat Params"), _T("Size"), 40.0f, IN_TO_M(40.0f)); float size = GetDistanceDefault(_T("Splat Params"), _T("Size")); SetSize(size, TimeValue(0)); SetThresh(0.2f, TimeValue(0)); SetIter(4, TimeValue(0)); // Set the validity interval of the texture to empty texValidity.SetEmpty(); mapValid.SetEmpty(); }
// This method is called to reset the texmap back to its default values. void Smoke::Init() { // Reset the XYZGen or allocate a new one if (xyzGen) xyzGen->Reset(); else ReplaceReference(0, GetNewDefaultXYZGen()); // Set the inital parameters SetColor(0, Color(0.0f, 0.0f, 0.0f), TimeValue(0)); SetColor(1, Color(0.9f, 0.9f, 0.9f), TimeValue(0)); SetExp(1.5f, TimeValue(0)); SetIter(5, TimeValue(0)); RegisterDistanceDefault(_T("Smoke Params"), _T("Size"), 40.0f, IN_TO_M(40.0f)); float size = GetDistanceDefault(_T("Smoke Params"), _T("Size")); SetSize(size, TimeValue(0)); SetPhase(0.0f, TimeValue(0)); seed = 0x8563; // Set the validity interval of the texture to empty texValidity.SetEmpty(); mapValid.SetEmpty(); }