Skip to content

Commit

Permalink
Merge branch 'Release' into switch_to_core_profile
Browse files Browse the repository at this point in the history
  • Loading branch information
kkol committed Sep 10, 2019
2 parents 8ca65c2 + 349c869 commit 876b60c
Show file tree
Hide file tree
Showing 10 changed files with 68 additions and 61 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
Bin/config.ini
Bin/Configs/*

Bin/AwesomeBumpGL330
Makefile
build/Makefile
*.pydevproject
.project
.metadata
tmp/
.qmake.stash
*.tmp
*.bak
*.swp
Expand Down
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=48
last_id=49
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
![Image](https://github.com/kmkolasinski/AwesomeBump/blob/master/Sources/resources/promo/githubimage5.jpg)


AwesomeBump 5.0 (2016)
AwesomeBump 5.1 (2019)
====================

AwesomeBump is a free and open source program written using Qt library designed to generate normal, height, specular or ambient occlusion, metallic, roughness textures from a single image. Additional features like material textures or grunge maps are available. Since the image processing is done in 99% on GPU the program runs very fast and all the parameters can be changed in real time. AB was made to be a new alternative to known gimp plugin called Insane Bump or commercial tool: Crazy Bump.
Expand Down Expand Up @@ -43,8 +43,12 @@ Binary packages
============
Binary packages for selected system can be found at [link](https://github.com/kmkolasinski/AwesomeBump/releases). Download zip or tar file, extract and run binary file.

* [Ubuntu 14LTE](https://github.com/kmkolasinski/AwesomeBump/releases/tag/Linuxv5.0)
* [Windows 7](https://github.com/kmkolasinski/AwesomeBump/releases/tag/Winx32v5.0)
* [ABv5.1 Ubuntu 18LTE](https://github.com/kmkolasinski/AwesomeBump/releases/tag/Linuxv5.1) (Qt 5.9)
* [ABv5.0 Ubuntu 14LTE](https://github.com/kmkolasinski/AwesomeBump/releases/tag/Linuxv5.0)

* [ABv5.1 Windows 7](https://github.com/kmkolasinski/AwesomeBump/releases/tag/Winx32v5.1)
* [ABv5.0 Windows 7](https://github.com/kmkolasinski/AwesomeBump/releases/tag/Winx32v5.0)


Building from source
============
Expand Down
4 changes: 2 additions & 2 deletions Sources/CommonObjects.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
//#define USE_OPENGL_330

#ifdef USE_OPENGL_330
#define AWESOME_BUMP_VERSION "AwesomeBump " VERSION_STRING " (2016) (openGL 330 release)"
#define AWESOME_BUMP_VERSION "AwesomeBump " VERSION_STRING " (2019) (openGL 330 release)"
#else
#define AWESOME_BUMP_VERSION "AwesomeBump " VERSION_STRING " (2016)"
#define AWESOME_BUMP_VERSION "AwesomeBump " VERSION_STRING " (2019)"
#endif

using namespace std;
Expand Down
4 changes: 2 additions & 2 deletions Sources/Sources.pro
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ isEmpty(TOP_DIR) {
ERROR("Run build process from the top directory")
}

VERSION_STRING = 5.0
VERSION_FULL = 5.0.0
VERSION_STRING = 5.1
VERSION_FULL = 5.1.0

DEFINES += VERSION_STRING=\\\"$$VERSION_STRING\\\"

Expand Down
14 changes: 10 additions & 4 deletions Sources/dockwidget3dsettings.ui
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>515</width>
<height>250</height>
<width>627</width>
<height>254</height>
</rect>
</property>
<property name="sizePolicy">
Expand All @@ -22,13 +22,13 @@
<property name="minimumSize">
<size>
<width>515</width>
<height>233</height>
<height>254</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>524287</width>
<height>250</height>
<height>254</height>
</size>
</property>
<property name="windowOpacity">
Expand Down Expand Up @@ -56,6 +56,12 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>400</height>
</size>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QVBoxLayout" name="verticalLayout">
Expand Down
10 changes: 4 additions & 6 deletions Sources/formimageprop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ FormImageProp::FormImageProp(QMainWindow *parent, QGLWidget* qlW_ptr) :
connect(imageProp.properties,SIGNAL(propertyDidChange(const QtnPropertyBase*,const QtnPropertyBase*,QtnPropertyChangeReason)),
this,SLOT(propertyChanged(const QtnPropertyBase*,const QtnPropertyBase*,QtnPropertyChangeReason)));

//connect(imageProp.properties,SIGNAL(propertyDidFinishEditing()),this,SLOT(propertyFinishedEditing()));
// connect(imageProp.properties,SIGNAL(propertyDidFinishEditing()),this,SLOT(propertyFinishedEditing()));

QObject::connect(&imageProp.properties->BaseMapToOthers.Convert,
SIGNAL(click(const QtnPropertyButton*)), this,
Expand Down Expand Up @@ -201,7 +201,9 @@ void FormImageProp::setupPopertiesGUI(){
void FormImageProp::propertyChanged(const QtnPropertyBase* changedProperty,
const QtnPropertyBase* firedProperty,
QtnPropertyChangeReason reason){

if(bLoading) return;

if (reason & QtnPropertyChangeReasonValue){
// Grunge Load predefined pattern
if(dynamic_cast<const QtnPropertyQString*>(changedProperty)
Expand Down Expand Up @@ -240,8 +242,7 @@ void FormImageProp::propertyChanged(const QtnPropertyBase* changedProperty,
// || dynamic_cast<const QtnPropertyQString*>(changedProperty) == &imageProp.properties->BaseMapToOthers.MinColor ){
// pickColorFromImage(changedProperty);
// }

emit imageChanged();
emit imageChanged();
}// end of if reason value

}
Expand Down Expand Up @@ -588,10 +589,7 @@ void FormImageProp::reloadSettings(){
// end of case Metallic
default:break; // do nothing
};


bLoading = false;

}

void FormImageProp::reloadImageSettings(){
Expand Down
5 changes: 0 additions & 5 deletions Sources/formmaterialindicesmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,8 @@ void FormMaterialIndicesManager::changeMaterial(int index){
imagesPointers[i]->imageProp.copySettings(materialIndices[i][m_name]);
imagesPointers[i]->reloadSettings();
}


QString cText = ui->listWidgetMaterialIndices->item(lastMaterialIndex)->text();
ui->listWidgetMaterialIndices->item(lastMaterialIndex)->setText(cText+" (selected material)");



emit materialChanged();
}

Expand Down
23 changes: 14 additions & 9 deletions Sources/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,6 @@ void MainWindow::replotAllImages(){
updateImage(MATERIAL_TEXTURE);

glImage->enableShadowRender(false);

glImage->setActiveImage(lastActive);
glWidget->update();

Expand Down Expand Up @@ -1114,37 +1113,50 @@ void MainWindow::initializeImages(){
}

void MainWindow::updateImage(int tType){
FormImageProp* imageProp = NULL;

switch(tType){
case(DIFFUSE_TEXTURE ):
imageProp = diffuseImageProp;
glImage->setActiveImage(diffuseImageProp->getImageProporties());
break;
case(NORMAL_TEXTURE ):
imageProp = normalImageProp;
glImage->setActiveImage(normalImageProp->getImageProporties());
break;
case(SPECULAR_TEXTURE):
imageProp = specularImageProp;
glImage->setActiveImage(specularImageProp->getImageProporties());
break;
case(HEIGHT_TEXTURE ):
imageProp = heightImageProp;
glImage->setActiveImage(heightImageProp->getImageProporties());
break;
case(OCCLUSION_TEXTURE ):
imageProp = occlusionImageProp;
glImage->setActiveImage(occlusionImageProp->getImageProporties());
break;
case(ROUGHNESS_TEXTURE ):
imageProp = roughnessImageProp;
glImage->setActiveImage(roughnessImageProp->getImageProporties());
break;
case(METALLIC_TEXTURE ):
imageProp = metallicImageProp;
glImage->setActiveImage(metallicImageProp->getImageProporties());
break;
case(MATERIAL_TEXTURE ):
case(MATERIAL_TEXTURE ):
glImage->setActiveImage(materialManager->getImageProporties());
break;
case(GRUNGE_TEXTURE ):
imageProp = grungeImageProp;
glImage->setActiveImage(grungeImageProp->getImageProporties());
break;
default: // Settings
return;
}
if (imageProp->bLoading != NULL){
imageProp->bLoading = false;
}
glWidget->update();
}

Expand Down Expand Up @@ -1699,7 +1711,6 @@ void MainWindow::loadSettings(){
static bool bFirstTime = true;

qDebug() << "Calling" << Q_FUNC_INFO << " loading from " << QString(AB_INI);

diffuseImageProp->bLoading = true;

QFile file( QString(AB_INI) );
Expand All @@ -1725,7 +1736,6 @@ void MainWindow::loadSettings(){
roughnessImageProp ->imageProp.properties->copyValues(&abSettings->Roughness);
grungeImageProp ->imageProp.properties->copyValues(&abSettings->Grunge);


// update general settings
if(bFirstTime){
this->resize(abSettings->d_win_w,abSettings->d_win_h);
Expand Down Expand Up @@ -1783,18 +1793,13 @@ void MainWindow::loadSettings(){
ui->spinBoxFontSize->setValue(abSettings->font_size);
ui->checkBoxToggleMouseLoop->setChecked(abSettings->mouse_loop);



updateSliders();

dock3Dsettings->loadSettings(abSettings);

heightImageProp->reloadSettings();

diffuseImageProp->bLoading = false;

replotAllImages();

glImage ->repaint();
glWidget->repaint();
bFirstTime = false;
Expand Down
53 changes: 25 additions & 28 deletions unixBuildScript.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
#!/bin/bash

# Add your QT path here by setting MY_QT_PATH variable
# MY_QT_PATH=/YOUR_PATH_HERE/Qt/5.X/gcc_64/bin/
MY_QT_PATH=


if [[ "$OSTYPE" == "darwin"* ]]; then
MY_QT_PATH=/Developer/Qt/5.6
if [ ! -e "$MY_QT_PATH" ]; then
MY_QT_PATH=~/Qt/5.6
fi
else
MY_QT_PATH=/opt/Qt5.7.0/5.7/gcc_64/bin/
fi
MY_QT_PATH=/opt/Qt5.9.0/5.9/gcc_64/bin/
BUILD_WITH_OPENGL_330_SUPPORT=$1

MAKE_NUM_THREADS='-j 8'
wget="wget"
tool="gcc_64"
peg="bin-linux"
exe=""
APP_SUFFIX=""
QMAKE_CONFIG=""

if [[ $BUILD_WITH_OPENGL_330_SUPPORT == "gl330" ]]; then
QMAKE_CONFIG="CONFIG+=gl330"
APP_SUFFIX="GL330"
fi

if [[ "$OSTYPE" == "darwin"* ]]; then
wget="curl -L -o master.zip"
tool="clang_64"
peg="bin-osx"
exe=".app"
fi

Expand All @@ -38,27 +36,26 @@ if [ ! -e "$MY_QT_PATH" ]; then
fi

if [ "$(ls -A Sources/utils/QtnProperty)" ]; then
echo "*** QtnProperty module is already initialized. No action is performed."
echo "QtnProperty module is already initialized. No action is performed."
else
echo "*** Initializing QtnProperty module"
echo "Initializing QtnProperty module"
# Copy QtnProperty directly from the repository
pushd Sources/utils/QtnProperty
cd Sources/utils/QtnProperty
$wget https://github.com/kmkolasinski/QtnProperty/archive/master.zip
unzip master.zip
rm master.zip
mv QtnProperty-master/* .
rm -r QtnProperty-master
popd
cd ../../../
fi

if Sources/utils/QtnProperty/$peg/QtnPEG > /dev/null ; then
qmake \
&& make \
&& echo "*** Copying binary from `cat workdir/current` ..." \
&& cp -vr workdir/`cat workdir/current`/bin/AwesomeBump$exe ./Bin
else
echo " --------------------------------------"
echo " Error: QtnPEG failed to run."
echo " --------------------------------------"
echo "Try to rebuild the QtnPEG binary from Sources/utils/QtnProperty directory."
fi
rm .qmake.stash
rm Makefile
rm Sources/Makefile

${MY_QT_PATH}/qmake ./AwesomeBump.pro ${QMAKE_CONFIG} \
&& make clean && make $MAKE_NUM_THREADS \
&& echo "*** Copying binary from `cat workdir/current` ..." \
&& cp -vr workdir/`cat workdir/current`/bin/AwesomeBump$exe ./Bin/AwesomeBump$APP_SUFFIX$exe


0 comments on commit 876b60c

Please sign in to comment.