Where Code Meets Creative Content

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.

Where Code Meets Creative Content

Postby Vectrotek » Sun May 15, 2016 6:01 pm

Coding, Shaders, Game Logic and Creative content.
Also, File Formats, 3D App to Irrlicht Matters, Texturing and Game Logic etc.
It's a topic that could be elaborated on broadly.
"Aspiring Digital Escapism"
User avatar
Vectrotek
Competition winner
 
Posts: 1056
Joined: Sat May 02, 2015 5:05 pm
Location: South Africa

Re: Where Code Meets Creative Content

Postby Vectrotek » Sun May 15, 2016 6:02 pm

Get the project..
Image
User avatar
Vectrotek
Competition winner
 
Posts: 1056
Joined: Sat May 02, 2015 5:05 pm
Location: South Africa

Re: Where Code Meets Creative Content

Postby Vectrotek » Sun May 15, 2016 6:04 pm

Image
User avatar
Vectrotek
Competition winner
 
Posts: 1056
Joined: Sat May 02, 2015 5:05 pm
Location: South Africa

Re: Where Code Meets Creative Content

Postby Vectrotek » Sun May 15, 2016 6:05 pm

Image
User avatar
Vectrotek
Competition winner
 
Posts: 1056
Joined: Sat May 02, 2015 5:05 pm
Location: South Africa

Re: Where Code Meets Creative Content

Postby Vectrotek » Sun May 15, 2016 6:11 pm

This project uses either GLSL or HLSL to render two types of objects, Skinned Objects and Non Skinned Objects..

The skinned objects are rendered with an improved version of the tangents based shader from previous posts.
A few bugs were killed and shader code tries to follow better coding practice (especially on the HLSL side).
Eight images are available for both GLSL and HLSL but only Four or Five is used leaving you with the rest to play with..
While not the main subject in this project the shader for skinned objects are included but not discussed in detail..
You'll probably know whats going on there if you have the last project I posted..
One COMPLETELY NEW thing here is “Light Falloff” which might amuse you..
(GLSL only, but you can easily port it to the HLSL Prototype. I don't have any time right now)
I'll say this.. The next one will include it and also mix Normal maps etc as opposed to this only mixing Diffuse Images..
(water reflection is a priority)

The non-skinned object in this project features a NEW kind of shader that (for this example) does not deal with lighting and
normal mapping etc but mainly with "Image Mixing" or "Splatting". (quite extendable with the other available images channels)..
This shader, one could say "specializes" in "geographic and natural" simulative 3D geometry like Mountains, Rocks, and Vegetation..
It features a New "detailing" function that attempts to minimize or alleviate the patterns that become apparent with even
well designed "Seamless Tile-able" teture images.
It simply creates a copy of the Original Diffuse (or normal etc) Maps with UVs scaled on the fly before "blending"
it with the original image in a way that helps avoid the appearance of visible patterns to emulate a more natural effect.

The 3D data file for these kinds of objects are “*.irrmesh” , here we don't use the scene i.e. “*.irr”
ASCII Based IrrMesh files take a while to load (Fat problem)..
(if anyone knows more about the “Binary Based” IrrMesh files please let me know)
(this is really something that should be developed)

You'll notice that we have TWO Shader callbacks to handle the two different “Shader Families”..

Don't bother looking at the code before you can at least produce a working "*.exe" from the VC 7.1 Project..
You'll get more out of it when you try changing and recompiling and repeating until you have a good idea of what does what..

Not yet implemented, "Render Target Based Water Reflection" is in the works..(there are some cool examples on the forums)
(next on my list)
User avatar
Vectrotek
Competition winner
 
Posts: 1056
Joined: Sat May 02, 2015 5:05 pm
Location: South Africa

Re: Where Code Meets Creative Content

Postby Vectrotek » Sun May 15, 2016 6:14 pm

Here is the project..
Slightly smaller..
http://s000.tinyupload.com/?file_id=71304654307948424888
Enjoy!
User avatar
Vectrotek
Competition winner
 
Posts: 1056
Joined: Sat May 02, 2015 5:05 pm
Location: South Africa

Re: Where Code Meets Creative Content

Postby Vectrotek » Fri May 20, 2016 4:00 pm

Here is an interesting bit on Blitz Basic's "*.b3d"
http://irrlicht.sourceforge.net/forum/viewtopic.php?f=1&t=51360&start=15
User avatar
Vectrotek
Competition winner
 
Posts: 1056
Joined: Sat May 02, 2015 5:05 pm
Location: South Africa

Re: Where Code Meets Creative Content

Postby Vectrotek » Sat May 21, 2016 11:02 am

So you want to recompile your Irrlicht Engine, but you don't want to have to
download the VERY LARGE Direct X SDK June 2010..
Get this..
It is only the HEADERS and LIBS you need in your IDE to recompile a custom version of the Irrlicht 3D Engine..
ONLY 2.49 Megs!
http://s000.tinyupload.com/?file_id=85257387029159436532
User avatar
Vectrotek
Competition winner
 
Posts: 1056
Joined: Sat May 02, 2015 5:05 pm
Location: South Africa

Re: Where Code Meets Creative Content

Postby chronologicaldot » Wed Jun 08, 2016 2:22 am

Thanks for sharing this!
User avatar
chronologicaldot
Competition winner
 
Posts: 545
Joined: Mon Sep 10, 2012 8:51 am

Re: Where Code Meets Creative Content

Postby Vectrotek » Wed Jun 22, 2016 10:52 am

Image
User avatar
Vectrotek
Competition winner
 
Posts: 1056
Joined: Sat May 02, 2015 5:05 pm
Location: South Africa

Re: Where Code Meets Creative Content

Postby Vectrotek » Wed Jun 22, 2016 10:53 am

Inspired from the latest DOOM this project uses a DLL resulting from an
Engine Recompile where the only change made was in the "irrCompileConfig.h" file.
It uses GLSL or HLSL shaders.
The DLL is included in the Release Folder along with the Executable.

The Texture Files are in Posterised PNG format to make them as small
as possible.
Posterising Normal Maps is never a good idea but I did, at a level of 24.

If you want the High Quality Images let me know.

The "Level" is in "*.irrmesh" format (from Blender via Tubras).
Irrlicht somehow had the foresight allowing you to have more
than 4 texture layers in your IRRMESH materials.
(even if you have to hand-code them or re-code the Blender Python Script)

The Specular effect was amplified to show the SOLSIRS working.
The shaders are Experimental and are NOT written to be fast.
(for that there is GPU Assembly) They are easily optimiseable.
Try overriding Shader (level object) output to see the actual raw SOLSIRS..
Much of the code is familiar if you downloaded any other projects of mine.
An attempt was made to copy the UV's of a second otherwise Identical Object,
into a given object as extra light map UV's but it is still in the works.


CONTROLS:
"ESC" : Exit
"WASD" or "ARROWS": Camera Movement

"T" : Toggle Character Animation Sequence
"P" : Pause Animation
"O" : Hasten Animation (Sequence Specific)
"I" : Slow Down Animation (Sequence Specific)
"U" : Reverse Animation

"K" : Toggle Camera Light
"L" : Toggle Light A

See code for others.

"Pure Boere Kuber Skakeerders. Is dit nou bakgat of wat!"
Last edited by Vectrotek on Wed Jun 22, 2016 11:08 am, edited 1 time in total.
User avatar
Vectrotek
Competition winner
 
Posts: 1056
Joined: Sat May 02, 2015 5:05 pm
Location: South Africa

Re: Where Code Meets Creative Content

Postby Vectrotek » Wed Jun 22, 2016 10:56 am

Get the whole project and executable here:
http://s000.tinyupload.com/?file_id=04847242501418814870
User avatar
Vectrotek
Competition winner
 
Posts: 1056
Joined: Sat May 02, 2015 5:05 pm
Location: South Africa

Re: Where Code Meets Creative Content

Postby Vectrotek » Mon Sep 19, 2016 9:13 pm

Image
User avatar
Vectrotek
Competition winner
 
Posts: 1056
Joined: Sat May 02, 2015 5:05 pm
Location: South Africa

Re: Where Code Meets Creative Content

Postby Vectrotek » Mon Sep 19, 2016 9:14 pm

Controls:

Key: Action:

G Toggle Music On or Off.. (to hear water above and below noise)
0 Toggle Post Processing Mode (On by default)

1 Shift Pass# 1 Post Processing Effect Up.
2 Shift Pass# 2 PP Effect Up.
3 Shift Pass# 3 PP Fx Up.
4 Shift Pass# 4 PP Up.
5 Shift Pass# 4 PP Up.
6 Shift Pass# 4 PP Up.
7 Shift Pass# 4 PP Up.
8 Shift Pass# 4 PP Up.
Shift & 1 Reset PostProcessing for Pass 1 to "Bypass" (does nothing).
Shift & 2 Reset PostProcessing for Pass 2 to "Bypass" (does nothing).
Shift & 3 Reset PostProcessing for Pass 3 to "Bypass" (does nothing).
Shift & 4 Reset PostProcessing for Pass 4 to "Bypass" (does nothing).
Shift & 5 Reset PostProcessing for Pass 5 to "Bypass" (does nothing).
Shift & 6 Reset PostProcessing for Pass 6 to "Bypass" (does nothing).
Shift & 7 Reset PostProcessing for Pass 7 to "Bypass" (does nothing).
Shift & 8 Reset PostProcessing for Pass 8 to "Bypass" (does nothing).
9 Reset ALL Passes PP to "Bypass".
W,A,S,D Camera Movement..
Arrows Camera Movement..
T Randomize FIRST Four Passes Effects.
Y Randomize LAST Four Passes Effects.



NOTE: THESE ARE THE SETTINGS YOU PLAY WITH TO GET THE RIGHT EFFECT.
TIP: WHEN IN GREY SCALE PP MODE THE WATER SHOULD NEVER BE LIGHTER THAN THE REST (use as a test)..
ALSO AS OPACITY DECREASES COLOUR APPEARS BRIGHTER SO DARKEN COLOUR WITH INCREASE OPACITY.
ALWAYS CHECK IN GREYSCALE MODE FOR LIGHTNESS.

These are the MAIN WATER RENDERER CONTROLS ..
Takes getting to know, but this is how different waters are simulated..
E Increase "Water Murk"
R Decrease "Water Murk"
Shift & E Decrease Water Colour Scale.
Shift & R Increase Water Colour Scale.
F Increase Liquid Opacity.
C Decrease Liquid Opacity.
M Randomize Water Colour.


U Speed Up Cloud Movement
H Slow Down Cloud Movement
I Scale Cload Layer A Smaller. (make appear further)
J Scale Cload Layer A Larger. (make appear closer)
O Scale Cload Layer B Smaller. (make appear further)
K Scale Cload Layer B Larger. (make appear closer)
P Scale Cload Layer B Smaller. (make appear further)
L Scale Cload Layer B Larger. (make appear closer)

V Toggle Debug Text Display.
B Toggle Water Renderer Debug Images Display.

Put on your earphones..
User avatar
Vectrotek
Competition winner
 
Posts: 1056
Joined: Sat May 02, 2015 5:05 pm
Location: South Africa

Re: Where Code Meets Creative Content

Postby Vectrotek » Mon Sep 19, 2016 9:15 pm

O.K.

First, If you see what looks like your code in here, then it probably is.
So, to all those guys who shared their code (of whom there are too many to thank individually)..
Thanks a big pile! (specially to Cute Alien, Elvman, Devsh and tbw)..

It started off as an experiment in Deferred Rendering but then quickly evolved
into a Water Renderer.
I then added Three Layers of Animated Clouds and Lensflares from a Synthetic Sun.

I added a few Screen Quad Post Processing Passes (eight of em) for Both GL's GLSL and DX's HLSL. (they both work)
(most notably NVIDIA's FXAA T.L. for BOTH GLSL & HLSL)

One night I paged through some old stuff and found a little layer I wrote
for the "Audiere" Sound System to make using it a bit easier. (there was an undocumented issue somewhere)
I pasted it in to see how it would work and.. Now we've got sound! Cool!
(for compiling I had included the "*.lib" and header for your IDE, but get the whole thing yourself)
The sound system plays "Wave Samples" like water splashes in Ogg Vorbis Format
and plays "Sequenced" Track Music like "*.it", "*.mod", "s3m" and the rest.
I think it worked quite well! Audierre is very powerfull and often overlooked.
Clever controlling of the "Pan" (balance) versus Sound Source Position could even give
you "3D Directional Sound". (definitely something I'm looking into later)
I also tried changeing the "mood" between above water and below water using different music
trigerred by a single frame flag in "Enter Water" or "Exit Water" state..
The noise of the water above differs from the water flow below..

The Water renderer which is actualy what this is all about does some unique things.
For depth, plane calculations were dropped in favour of fragment distance from the ZERO Point
on the Y axis.. Planes are cool but for this world where water is at X Y Z Zero with Nornal at Y: 1,
distance on Y will do.
This distance is split into RGB for different parts which act on different attributes of the water
like Normal Damping, Colour Intensity and Murk.
Opacity is lerped into the render near the end of the Water Shader.
Opacity is a new thing that could be explained as the difference between blue spirits
and matte blue paint. They are both the same colour but have different ways in which light is
allowed to pass through.
Water is a really complex thing and comes in many different colours, opacities and murkyness.
An example would be a pool into which chlorine was thrown. First the green water looks
"milky blue green" then slowly turns clear low saturation blue.
The water in a river, just after rain is a Matte Brown colour but still reflects under fresnel rules.

Play around with the settings using the relevant keyboard controlls and you'll soon see that you
can emulate almost any kind of liquid.

I implemented "Global Alert Pointers", something that would allow the water renderer to share it's
"states" with the rest of the world so that objects that touch the water would have
their shaders be aware of the state in which the water renderer is in at the moment of rendering
these world objects.
Darkening via gradient of surfaces that are underwater is an example.

Now, the project is ongoing and obviously will be improved but I don't have time right now
and I'm still a bit of an Irrlicht noob.
It might look big and ugly, but it is reasonably modular for you to try your own Things on.
Smart Shaders havent been incorporated into the PP system yet, but you can see it working on the
two static objects. PP Shaders still acts independently.
The start of this conversion process was left in the code so continuing shouldn't be too hard..
This is no quick lesson like you'd find in the examples package, so if you like it hold on to it
and look at it when you've got time. ("Tiny Upload" holds material for 90 days before deleting it)

Smart shaders simply lets you "add" shaders and their feed variables sothat the Callback automatically
knows what variables to send. It also avoids D3D bombarding your console with warnings when you
send a variable that is not in your shader code. (glsl doesn't have this issue)

The main reason I posted this is sothat so people can let me know if there are
any serious problems in the coding.
Id really appreciate critique, so let me have it..
Feel free to use any of the code in your own stuff!

Software used: Irrlicht, Blender, ModPlugTracker, Audacity, Cool Edit, Coolspeech, ZBrush (wavenormals) and Photoshop..

At some point I had to stop beautifying the code, sorry..
Put on your earphones..

Here is the full project: http://s000.tinyupload.com/?file_id=05331412862700644252
User avatar
Vectrotek
Competition winner
 
Posts: 1056
Joined: Sat May 02, 2015 5:05 pm
Location: South Africa

Next

Return to Open Discussion and Dev Announcements

Who is online

Users browsing this forum: No registered users and 1 guest