Skip to content

Commit

Permalink
updated data.zip link files on readme's. checked all examples
Browse files Browse the repository at this point in the history
  • Loading branch information
moebiussurfing committed Jan 24, 2024
1 parent 1443a72 commit d924e96
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 131 deletions.
26 changes: 0 additions & 26 deletions 1_Example_Basic/README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1 @@

This example includes the main and bigger class from the addon:
`ofxSurfingPBR.h`.

This class has multiple modules
or commonly used features included by default:

- Floor plane with a simple material
and customizable size and transforms.
- One full PBR material ready to be used.
- CubeMap for the PBR material and drawing as background.
- Background object with sphere or box with material.
- Test Scene draw with three prims.
- Lights bundle with 4 predefined lights:
`Point`, `Direct`, `Spot` and `Area`.
- An internal and public exposed camera.
- Shader module to help integration/dev.
(currently commented / disabled by default)

All the modules has his own settings and a gui (ofGui)
to tweak all the internal parameters.
All of them with all the settings persistent,
gui exposed and ready to use on any project.

</br>

![](Capture.PNG)
22 changes: 1 addition & 21 deletions 2_Example_Models/README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@

[bin/data.zip](https://mega.nz/file/saMXjATJ#hCcfG5KWJrRnwX85Wy0MmH0JMViaToS1MyOejCIxSZY)

</br>

This example uses the main class from the `ofxSurfingPBR.h` addon.
The above class bundles almost all the modules/features from the addon.
Many modules can be used as standalone, in a simpler and custom OF scene.

Also we are using the `SurfingSceneManager.h` class
how uses also `SurfingModelsFilesBrowser.h`.
These classes are `3d models` helpers paired with the addon.
With these classes we can easily browse the `3d models` files
directly from our app `bin/data/` path.

As we are using the full addon modules from `ofxSurfingPBR.h`,
we can render the objects using the bundled materials,
the plain floor, and all the `4 lights kit`,
the background generators and the cubeMap.

</br>
[bin/data.zip](https://mega.nz/file/lOMzkJIC#tLaM9MTKA6J83nf0DoxKtoET3uevG-Y6z4_eLfIiIPQ)

![](Capture.PNG)
19 changes: 0 additions & 19 deletions 3_Example_Lights/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1 @@
This example do not includes the main bigger classes from the addon:
`ofxSurfingPBR.h` neither the `SurfingSceneManager.h`.
These both classes have multiple modules or features included by default,
(as it could be the CubeMap, the background object, the floor plane...etc).

Here we want to learn and create a standalone material
and a standalone kit of lights.
The material is applied to the floor plane
and to the testing three prims scene that we will draw.

The lights bundled are 4 in total. One of each of the available types
into OF core:
`Point`, `Direct`, `Spot` and `Area`.
All with his settings on a gui to tweak all the internals.
All of them with all the settings persistent, gui exposed and ready
to use on any project.

</br>

![](Capture.PNG)
10 changes: 0 additions & 10 deletions 4_Example_Materials/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1 @@

This example uses the internal class `SurfingMaterial.h`.
We will create a vector of materials to be applied to many objects.
To draw the object we will use the `SurfingMeshSphereDisplaced.h` class.
We will have an animated mesh to test the PBR settings on there.
We will create also some `ofLight`'s from the `OF core`
to see how the addon can easily mix-up with the core/"vanilla" classes.

</br>

![](Capture.PNG)
15 changes: 0 additions & 15 deletions 5_Example_Shadows/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1 @@
This example is hardly based on the example
`openFrameworks\examples\gl\shadowsExample`
from the `OF Core` made by `@NickHardeman`.
We will learn how to replace easily their `OF materials`
with standalone materials that the addon includes,
in this case will be standalone:
all the rest of the environment will remain un-touched
from the example, this means that we will not use
the lights modules from the addon bigger classes like
`ofxSurfingPBR.h` or `SurfingSceneManager.h` neither:
only the "vanilla" classes that bundles the `OF Core` will be used
besides of the material class instances for ach scene element.

<br>

![](Capture.PNG)
28 changes: 1 addition & 27 deletions 6_Example_3D_Parts/README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,4 @@

[bin/data.zip](https://mega.nz/file/5Klk0ZZA#nDyOPUj6tvw-g271pFeunr8EA7dBn5juWXZgrJkkOGk)

</br>

## EXAMPLE DESCRIPTION

This example shows how to illuminate a loaded `FBX model`
affecting their `PBR texture files`.
Also, we have a data folder with some parts of the model
that we exported separately manually
from Blender, Cinema4D, or any others.
`bin/data/models/nike/parts/*.*`

We will use the `SurfingSceneManager.h` class to customize the scene.
This class auto-creates a combo of the four default lights,
to perform the light illumination,

Also allows queuing materials and colors to our scene.
We will create a material for each part,
so we can tweak each PBR material color and the PBR settings
for each part independently.

We have also a rotating camera with height and longitude settings.
Also, we can apply one single aux material when using the floor and on the OnePiece mode.

<br>
[bin/data.zip](https://mega.nz/file/VPMBEBTJ#Cgi-u72GdJOMel7xCli2-SmU7aU0b0TtOijyuXIDKdc)

![](Capture.PNG)

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ void ofApp::renderScene()

## REQUERIMENTS
- Download and copy the content of `data.zip` to the examples or to your projects into `/bin/data`:
* Data for any: [bin/data.zip](https://mega.nz/file/cHkylJZY#sVdQpSF8IkvdmKdpMIbA4767kvBvfGL7R7GnU9g20ow)
* Data for `2_Example_Models`: [bin/data.zip](https://mega.nz/file/saMXjATJ#hCcfG5KWJrRnwX85Wy0MmH0JMViaToS1MyOejCIxSZY)
* Data for `6_Example_3D_Parts`: [bin/data.zip](https://mega.nz/file/5Klk0ZZA#nDyOPUj6tvw-g271pFeunr8EA7dBn5juWXZgrJkkOGk)
* Data for any or new projects: [bin/data.zip](https://mega.nz/file/cHkylJZY#sVdQpSF8IkvdmKdpMIbA4767kvBvfGL7R7GnU9g20ow)
* Data for `2_Example_Models`: [bin/data.zip](https://mega.nz/file/lOMzkJIC#tLaM9MTKA6J83nf0DoxKtoET3uevG-Y6z4_eLfIiIPQ)
* Data for `6_Example_3D_Parts`: [bin/data.zip](https://mega.nz/file/VPMBEBTJ#Cgi-u72GdJOMel7xCli2-SmU7aU0b0TtOijyuXIDKdc)
* Only shaders: [bin/dataShaders.zip](https://mega.nz/file/gLMwXY6S#HjIfsu80ZIpPccaFbJKowE3qeoRZeK8jnfSrhUEeGQE)
- Notice that all the example should work without the data files too.

Expand All @@ -176,7 +176,7 @@ $~~~~~~$ ├ shadersGL2 $~~~~~~$ frag, vert $~~~~~~$ used when enabled
$~~~~~~$ └ shadersGL3 $~~~~~~$ frag, vert $~~~~~~$ used when enabled

## TESTED SYSTEMS
* **Windows 11** / **VS 2022** / **OF 0.12+** @[GitHub master branch](https://github.com/openframeworks/openFrameworks)
* **Windows 11** / **VS 2022** / **OF 0.12+** @ [GitHub master branch](https://github.com/openframeworks/openFrameworks)

## LICENSE
**MIT License**
**MIT License**
15 changes: 13 additions & 2 deletions src/SurfingSceneManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,12 +285,23 @@ void SurfingSceneManager::drawGui() {
gui.draw();

if (lights.bGui) {
ofxSurfing::setGuiPositionRightTo(lights.gui, gui);
ofxSurfing::setGuiPositionRightTo(lights.gui, gui); //gui is SCENE_MANAGER
lights.drawGui();
}

if (bGui_Materials) {
ofxSurfing::setGuiPositionRightTo(guiMaterials, lights.bGui ? lights.gui : gui);
//ofxSurfing::setGuiPositionRightTo(guiMaterials, lights.bGui ? lights.gui : gui);
if (!lights.bGui_Shadows) {
if (lights.bGui)
ofxSurfing::setGuiPositionRightTo(guiMaterials, lights.gui);
else
ofxSurfing::setGuiPositionRightTo(guiMaterials, gui);
} else {
if (lights.bGui)
ofxSurfing::setGuiPositionRightTo(guiMaterials, lights.guiShadows);
else
ofxSurfing::setGuiPositionRightTo(guiMaterials, gui);
}
guiMaterials.draw();
}

Expand Down
14 changes: 8 additions & 6 deletions src/ofxSurfingPBR.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,28 @@
from the new 0.12+ releases.
You should use the GitHub master branch:
https://github.com/openframeworks/openFrameworks
https://github.com/openframeworks/openFrameworks
All this code is copied from or/and hardly based on this OF forum topic:
https://forum.openframeworks.cc/t/ofshadow-and-ofshader-issue-on-of-0-12/42600/19
https://forum.openframeworks.cc/t/ofshadow-and-ofshader-issue-on-of-0-12/42600/19
Original inspiration code authors:
@NickHardeman https://github.com/NickHardeman
and @paolo-scoppola https://github.com/paolo-scoppola.
@NickHardeman https://github.com/NickHardeman
and @paolo-scoppola https://github.com/paolo-scoppola.
*/

//--

/*
TODO
- fix lights settings
- fix startup/exit loading all settings
- fix lights settings not recalled well at startup
- add simple scenes presets manager
- expose easy paramsPresets:
colors, lights power,
to be used on a simple/user UI.
- add save/load all.
- fix startup/exit loading all settings
- make some linking colors
to fast set bg, floor,
Expand All @@ -41,6 +42,7 @@
- add custom global path to /data/ofxSurfingPBR/MAT_NAME/
- SHADERS AND DISPLACE
- get @paolo-scoppola ideas and suggestions.
- fix plane light not working when shaders enabled..
- check pipeline / enable ArbTex from the example!
- customize share plane divisions and img size/clamp.
Expand Down

0 comments on commit d924e96

Please sign in to comment.