About Store Forum Documentation Contact



Post Reply 
A change of direction
Author Message
3DRaddict Offline
Member

Post: #1
A change of direction
Lately, I've been getting to grips with Direct3D 11.x with a view to producing an engine to purely run my "Surfing Simulation" as a Windows 10 app. In this manner, I can concentrate only on the functionality specific to my application's requirements, and not get bogged down by all extraneous functionality provided in off-the-shelf 3D game engines.

Microsoft's Chuck Walbourn has put together a comprehensive set of tutorials "Getting Started with Direct3D 11" using the "DirectX Tool Kit". The toolkit (aka DirectXTK) is a collection of helper classes for writing DirectX 11.x code in C++. The code is designed to build with the Windows 8.x SDK using Visual Studio 2010, 2012, 2013, 2015 and works on Windows Vista, Windows 7, Windows 8.x, Windows 10, Win32 desktop, Windows Store apps, Windows phone 8.1, and Xbox One.

Using this, in conjunction with Frank Luna's "Introduction to 3D Game Programming with DirectX 11" and Paul Varcholik's "Real Time 3D Rendering with DirectX and HLSL", I have been able to advance at a steady rate with a clearer understanding of DirectX 11 and how it is applied in the latest versions of Windows.
11-05-2015 09:50 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Pixel Perfect Offline
Legacy License Owner

Post: #2
RE: A change of direction
I wish you luck. It sounds like a massive undertaking but I guess if you have the time it is a way of directly tailoring the functionality to your simulation requirements and a wonderful learning opportunity.

Keep us updated on your progress smile
11-05-2015 12:14 PM
Find all posts by this user Quote this message in a reply
3DRaddict Offline
Member

Post: #3
RE: A change of direction
Quote:Keep us updated on your progress

That I will smile
11-07-2015 10:32 AM
Visit this user's website Find all posts by this user Quote this message in a reply
georgatos7 Offline
Member

Post: #4
RE: A change of direction
It's kinda sad to see you moving away from Esenthel for your project but i guess its necessary if you want your own custom functionality. In the end it's gonna be an interesting learning experience and as Pixel said i'll be very interested in any updates you make.
(This post was last modified: 11-10-2015 03:47 PM by georgatos7.)
11-10-2015 02:52 PM
Find all posts by this user Quote this message in a reply
3DRaddict Offline
Member

Post: #5
RE: A change of direction
Esenthel is still my No.1 engine of choice, and we have got fairly well acquainted over the last year. Its just that I like to understand all the inner workings, and this (little ? !) project will give me the opportunity to work from first principles whilst I await further developments in Esenthel.
11-11-2015 05:30 AM
Visit this user's website Find all posts by this user Quote this message in a reply
3DRaddict Offline
Member

Post: #6
RE: A change of direction
Stage 1
The first stage of this project has been to establish an initial DirectX 11.1+ framework which I can use again and again as I proceed further.
Both the previously-mentioned books did provide a DirectX framework, but Luma's was geared to the older DirectX 11.0 and
Varcholik's framework, although geared for DirectX 11.1, I found to be rather complex and verbose. In the end, after much experimentation, I have settled for Chuck Walbourn's DirectXTK framework. It is compact to use, and is especially geared towards the latest Window versions. He also provides some well-explained tutorials which cover all the basics.
I'm going to start with a simple test scene, which I will gradually add to as I proceed. The scene was borrowed from Frank Luma's book, simply because I had previously worked with it when I had ported it over to Esenthel. However, I had to do a number of alterations to make it compatible with the DirectXTK framework. I also required a GUI to enable me to change parameters easily and quickly... I settled for AntTweakBar, a customisable GUI I was familiar with and had used in previous projects.
So Stage 1 is now complete and consists simply of my initial very basic requirements:
a) some different procedurally generated shape primitives
b) a view camera, manipulated by WASD and mouse
c) a few diffuse textures
d) a BasicEffects shader (included with the DirectXTK) providing selectable combinations of diffuse, normal, specular lighting and fog effects.
e) a directional light
f) an AntTweakBar GUI to manipulate the light direction





For Stage 2, I will be looking at more advanced shaders (especially with regard to water and sky.... displacement and environment mapping effects)
11-15-2015 08:14 PM
Visit this user's website Find all posts by this user Quote this message in a reply
3DRaddict Offline
Member

Post: #7
RE: A change of direction
Stage 2
At this still early stage I've been experimenting further with a suitable framework that will cover all my needs. I've finally settled for a mixture of DirectXTK, Frank Luna (updated to DirectX 11.1), and an old DirectX 10.0 framework (called DXUT) which has been updated for DirectX 11.1+ by Microsoft's Chuck Walbourne.
So, using this framework hodgepodge, I've been porting Frank Luna's examples over, and really been learning much in the process. The beauty of this is that I now understand how the various pieces of DirectX fit togther, and their purpose. Also, I can now add custom shaders freely and easily.
Continuing on from Stage 1, I've added a SkySphere and environment mapping shaders to the skull and the column spheres, which reflect the static SkySphere. At a great expense to framerate, I tried adding dynamic cubemaps. This is not a feature I will be using in my 'Surfing Simulation', but I was interested in learning how they work. The accompanying video shows how drastically the framerate is reduced by rendering the scene 6 times ( for each face of the dynamic cubemap) per frame. It looks pretty and realistic, but not worth the slowdown. There is room for optimisation , such as frustum and backface culling, and smaller size cubemaps.









Stage 3 will see me concentrating on normal mapping and dynamic displacement in preparation for water addition.

BTW: Windows 10 has a hidden gem in the form of an embedded "screen video capture software" which can be enabled by activating the [Win] key together with [G] key. The window containing your graphics must be in focus, and a menu will be displayed allowing you to start/stop recording. On stopping, the recorded video is saved as an MP4 file on your Windows Videos/Capture folder. The video obtained is of good quality and does not skip a beat (unlike some other video capture apps that I was attempting to use)
11-29-2015 12:43 PM
Visit this user's website Find all posts by this user Quote this message in a reply
georgatos7 Offline
Member

Post: #8
RE: A change of direction
Looks very nice so far, looking forward for more.
Also the info you include in your posts about the methods, the books and the tools you use is very insightful and helpful for those who are interested on the matter.
(This post was last modified: 11-29-2015 02:38 PM by georgatos7.)
11-29-2015 01:07 PM
Find all posts by this user Quote this message in a reply
3DRaddict Offline
Member

Post: #9
RE: A change of direction
Correction to "AddingDynamicCubeMapping2" ... reflection of background was wrong.



11-30-2015 12:10 PM
Visit this user's website Find all posts by this user Quote this message in a reply
3DRaddict Offline
Member

Post: #10
RE: A change of direction
Stage 3
I've now reached the first milestone of this project, with the addition of Normal Mapping and Tesselated Displacement Mapping.
With Stage 3 now complete, I can now think about adding a water plane and its associated Fresnel, Transparency and Refraction effects.
As the video shows, the tesselation is highly detailed at present...my eventual aim is to adapt this depending on camera distance.
To display text, I'm making use of the SpriteBatch and SpriteFont classes supplied with DirectXTK. They add some useful methods for manipulating and displaying 2D sprites.
No shadows at this stage... all I want is an area of water that I can control and manipulate to my heart's content.grin



12-02-2015 06:06 AM
Visit this user's website Find all posts by this user Quote this message in a reply
3DRaddict Offline
Member

Post: #11
RE: A change of direction
Stage 4

Back to summer...
This is now approaching what I had in mind for a relatively calm ocean surface... thank you, Frank Luna, for the use of your shader algorithm!
I reckon that with the addition of fresnel refraction it will be just about perfect.
The parameters allow for adjustment of water color, reflection intensity and water surface smoothness.



12-03-2015 06:33 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Pixel Perfect Offline
Legacy License Owner

Post: #12
RE: A change of direction
Looking very nice, you're making rapid progress here!
12-03-2015 07:29 PM
Find all posts by this user Quote this message in a reply
3DRaddict Offline
Member

Post: #13
RE: A change of direction
There was a major Windows10 automatic update for me last night.
Now this morning all my DirectX 11.1 projects, which compiled and ran perfectly yesterday in Debug and Release modes, are failing in Debug mode with 'DirectX Device Fail' error, yet in Release mode they are OK... most frustrating indeed !!!
12-15-2015 01:46 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Zervox Offline
Source Licensee

Post: #14
RE: A change of direction
one of many reasons why I disabled the windows update service. :/
12-15-2015 05:10 PM
Find all posts by this user Quote this message in a reply
Tottel Offline
Legacy License Owner

Post: #15
RE: A change of direction
You can't turn it off in Windows 10. smile
12-15-2015 05:23 PM
Find all posts by this user Quote this message in a reply
Post Reply