Skip to content

Commit

Permalink
ab 4.0 beta commit
Browse files Browse the repository at this point in the history
First official commit to AB 4.0
  • Loading branch information
kmkolasinski committed May 17, 2015
1 parent 55b7d6f commit a40ac52
Show file tree
Hide file tree
Showing 16 changed files with 1,216 additions and 287 deletions.
178 changes: 89 additions & 89 deletions Bin/Configs/41_Default.ini

Large diffs are not rendered by default.

787 changes: 787 additions & 0 deletions Bin/Configs/45_stone.ini

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Bin/Configs/config_list
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[General]
last_id=45
last_id=46
Binary file added Bin/Core/2D/grunge/ground1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Bin/Core/2D/grunge/pattern1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Bin/Core/2D/grunge/pattern2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Bin/Core/2D/grunge/pattern3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Bin/Core/2D/grunge/pattern4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 13 additions & 1 deletion Sources/CommonObjects.h
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,8 @@ class FBOImageProporties{
conversionNHItersSmall = src.conversionNHItersSmall;
conversionNHItersVerySmall = src.conversionNHItersVerySmall;
bConversionBaseMap = src.bConversionBaseMap;

baseMapAngleCorrection = src.baseMapAngleCorrection;
baseMapAngleWeight = src.baseMapAngleWeight;

ssaoNoIters = src.ssaoNoIters;
ssaoIntensity = src.ssaoIntensity;
Expand Down Expand Up @@ -770,6 +771,17 @@ class FBOImageProporties{
normalMixerPosX = src.normalMixerPosX;
normalMixerPosY = src.normalMixerPosY;

// grunge
grungeOverallWeight = src.grungeOverallWeight; // general weight for all images
grungeSeed = src.grungeSeed; // grunge randomization seed (if = 0 no randomization)
grungeRadius = src.grungeRadius; // random radius
bGrungeReplotAllWhenChanged = src.bGrungeReplotAllWhenChanged;
bGrungeEnableRandomTranslations = src.bGrungeEnableRandomTranslations;
grungeNormalWarp = src.grungeNormalWarp; // warp grunge image according to normal texture
grungeImageWeight = src.grungeImageWeight; // per image additional weight
grungeMainImageWeight = src.grungeMainImageWeight; // used for normal blending only
grungeBlendingMode = src.grungeBlendingMode;

}

void init(QImage& image){
Expand Down
38 changes: 35 additions & 3 deletions Sources/formimageprop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ FormImageProp::FormImageProp(QMainWindow *parent, QGLWidget* qlW_ptr) :
connect(ui->horizontalSliderGrungeOverallWeight,SIGNAL(sliderReleased()),this,SLOT(updateSlidersOnRelease()));
connect(ui->horizontalSliderGrungeSeed,SIGNAL(sliderReleased()),this,SLOT(updateSlidersOnRelease()));
connect(ui->horizontalSliderGrungeRadius,SIGNAL(sliderReleased()),this,SLOT(updateSlidersOnRelease()));
connect(ui->horizontalSliderGrungeRadius,SIGNAL(valueChanged(int)),this,SLOT(updateSlidersNow(int)));

connect(ui->horizontalSliderGrungeNormalWarp,SIGNAL(sliderReleased()),this,SLOT(updateSlidersOnRelease()));

connect(ui->checkBoxGrungeRandomTranslations,SIGNAL(clicked()),this,SLOT(updateGuiCheckBoxes()));
Expand All @@ -196,7 +198,7 @@ FormImageProp::FormImageProp(QMainWindow *parent, QGLWidget* qlW_ptr) :
connect(ui->comboBoxGrungeBlendingMode,SIGNAL(activated(int)),this,SLOT(updateComboBoxes(int)));
// this actually invert all color components
connect(ui->checkBoxGrungeInvert,SIGNAL(toggled(bool)),this,SLOT(invertGrunge(bool)));

connect(ui->comboBoxGrungePredefined,SIGNAL(activated(QString)),this,SLOT(loadPredefinedGrunge(QString)));

setAcceptDrops(true);
ui->groupBoxRemoveShading->hide();
Expand Down Expand Up @@ -238,6 +240,11 @@ FormImageProp::FormImageProp(QMainWindow *parent, QGLWidget* qlW_ptr) :
ui->labelGrungeImageWeight->hide();
ui->labelGrungeImageWeight2->hide();
ui->horizontalSliderGrungeMainImageWeight->hide();





setMouseTracking(true);
setFocus();
setFocusPolicy(Qt::ClickFocus);
Expand Down Expand Up @@ -291,6 +298,7 @@ bool FormImageProp::loadFile(const QString &fileName)

//emit imageChanged();
emit imageLoaded(image.width(),image.height());
if(imageProp.imageType == GRUNGE_TEXTURE)emit imageChanged();
}
return true;
}
Expand All @@ -300,6 +308,7 @@ void FormImageProp::pasteImageFromClipboard(QImage& _image){
image = _image;
imageProp.init(image);
emit imageLoaded(image.width(),image.height());
if(imageProp.imageType == GRUNGE_TEXTURE)emit imageChanged();
}


Expand Down Expand Up @@ -556,6 +565,7 @@ void FormImageProp::updateGuiSpinBoxesAndLabes(int){
imageProp.grungeSeed = ui->horizontalSliderGrungeSeed->value();
imageProp.grungeRadius = ui->horizontalSliderGrungeRadius->value();
imageProp.grungeNormalWarp = ui->horizontalSliderGrungeNormalWarp->value();
ui->labelGrungeRadius->setText(QString::number(imageProp.grungeRadius/25.0));
}
imageProp.grungeImageWeight = ui->horizontalSliderGrungeImageWeight->value();
imageProp.grungeMainImageWeight = ui->horizontalSliderGrungeMainImageWeight->value();
Expand All @@ -576,10 +586,14 @@ void FormImageProp::updateSlidersOnRelease(){
emit imageChanged();
}


void FormImageProp::updateSlidersNow(int){

imageProp.normalMixerScale = ui->horizontalSliderNormalMixerScale->value()/10.0;
ui->labelNormalMixerScale->setText(QString::number(imageProp.normalMixerScale));

imageProp.grungeRadius = ui->horizontalSliderGrungeRadius->value();
ui->labelGrungeRadius->setText(QString::number(imageProp.grungeRadius/25.0));
}

void FormImageProp::updateGuiCheckBoxes(){
Expand Down Expand Up @@ -753,6 +767,21 @@ void FormImageProp::showNormalMixerGroup(){

void FormImageProp::showGrungeSettingsGroup(){
ui->groupBoxGrungeSettings->show();
// ------------------------------------------------------- //
// Loading grunge maps folders
// ------------------------------------------------------- //
qDebug() << "Loading cubemaps folders:";
QDir currentDir("Core/2D/grunge");
currentDir.setFilter(QDir::Files);
QStringList entries = currentDir.entryList();
for( QStringList::ConstIterator entry=entries.begin(); entry!=entries.end(); ++entry ){
QString dirname=*entry;
if(dirname != tr(".") && dirname != tr("..")){
qDebug() << "Enviromental map:" << dirname;
ui->comboBoxGrungePredefined->addItem(dirname);
}
}// end of for
// setting cube map for glWidget
}

void FormImageProp::showGrungeMainImageWeightSlider(){
Expand All @@ -779,6 +808,10 @@ void FormImageProp::invertGrunge(bool toggle){
updateGuiCheckBoxes();
}

void FormImageProp::loadPredefinedGrunge(QString image){
loadFile("Core/2D/grunge/"+image);
}

void FormImageProp::hideOcclusionInputGroup(){
ui->groupBoxOcclusionInputImage->hide();
}
Expand Down Expand Up @@ -951,11 +984,10 @@ void FormImageProp::reloadSettings(){
ui->comboBoxGrungeBlendingMode->setCurrentIndex(imageProp.grungeBlendingMode);
if(imageProp.imageType == GRUNGE_TEXTURE){

//ui->horizontalSliderGrungeOverallWeight ->setValue(imageProp.grungeOverallWeight);
// ui->horizontalSliderGrungeOverallWeight ->setValue(imageProp.grungeOverallWeight);
ui->horizontalSliderGrungeRadius ->setValue(imageProp.grungeRadius);
ui->horizontalSliderGrungeSeed ->setValue(imageProp.grungeSeed);
ui->horizontalSliderGrungeNormalWarp ->setValue(imageProp.grungeNormalWarp);

ui->checkBoxGrungeRandomTranslations->setChecked(imageProp.bGrungeEnableRandomTranslations);
ui->checkBoxGrungeReplotAllAfterChange->setChecked(imageProp.bGrungeReplotAllWhenChanged);

Expand Down
3 changes: 3 additions & 0 deletions Sources/formimageprop.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public slots:
void updateComboBoxes(int index);
void updateGuiSpinBoxesAndLabes(int);
void updateSlidersOnRelease();

void updateGuiCheckBoxes();
void updateSlidersNow(int);

Expand All @@ -86,6 +87,8 @@ public slots:
// grunge
void toggleGrungeImageSettingsGroup(bool toggle);
void invertGrunge(bool toggle);
void loadPredefinedGrunge(QString);

signals:
void reloadSettingsFromConfigFile(TextureTypes type);
void imageChanged();
Expand Down
Loading

0 comments on commit a40ac52

Please sign in to comment.