About Store Forum Documentation Contact



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

Post: #46
RE: A change of direction
Quote:it is fairly easy to repeat that 2D slice along the 3rd dimension of your 3D application
Not so....blushing (easier said than done!)

After correcting a number of elusive bugs in my C++ and HLSL code, I finally have my surfible wave model transferred from the spreadsheet format. The video shows the wireframe wave undergoing a standing animation loop through the main stages of Formation, Breaking and Collapsing. The wave mesh size is 1025 x 65 vertices and all the vertex movement is handled in the vertex shader, for speed purposes. Each of the 1025 profiles along the length of the wave can change their shape depending upon the water depth beneath the particular profile, thus giving an overall wave with a varying shape as it moves forward towards the beach.
I'm currently working on producing a dynamic normal map (see small Render Target on the right top of video). The Render Target on the left top of the video contains the dynamic Y and Z values of the wave.



03-23-2016 11:55 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Dalmat Offline
Member

Post: #47
RE: A change of direction
Nice work! This will be a fantastic experience in VR smile
03-28-2016 10:39 PM
Find all posts by this user Quote this message in a reply
3DRaddict Offline
Member

Post: #48
RE: A change of direction
I'm still with the stationary wave and its vertex normals...
After many failed attempts I think I'm finally on the right track.
To get decent shading and texturing of the wave surface involves producing its mesh vertex normals, tangents and binormals. This is not too bad in the case of wave meshes which have been produced via a function (e.g Gerstner or Sum of Sines), but in my case the surfing wave has been produced by procedural curves whose shapes are controlled by user constants, giving rise to both convex and concave sections. I have had to take each and every triangle face comprising the wave mesh and calculate its vertex normals, tangents and binormals. This calculation is performed in the CPU...but the problem I had was in transferring the results to the vertex buffer to feed the GPU wave shader every frame.... 1024 x 64 vertices was just too slow!
I then hit upon the idea of building three RenderTextures... one for Position, one for Normals and one for Tangents....each RenderTexture holding the X,Y,Z values encoded into the texture's R,G,B channels. These RenderTextures are read and decoded by my wave shader, and the whole operation is a good deal faster.

Here's a few pics of my textured wave... still very experimental at this stage. The three RenderTextures are shown.

[Image: Engine%202016_04_04%2015_29_07.png]

[Image: Engine%202016_04_04%2015_33_37.png]

[Image: Engine%202016_04_04%2015_39_54.png]

I need to add some translucancy to the wave and really have no idea... so if anyone can advise in that regard?
04-04-2016 04:00 PM
Visit this user's website Find all posts by this user Quote this message in a reply
RedcrowProd Offline
Member

Post: #49
RE: A change of direction
i have a problem with the link of the picture ? is this just me ? might be the firewall at work :(

ps : sorry i have no idea about this, i just really like your little project and wanna keep seeing it wink as i find it quite interesting !
(This post was last modified: 04-04-2016 04:21 PM by RedcrowProd.)
04-04-2016 04:20 PM
Find all posts by this user Quote this message in a reply
3DRaddict Offline
Member

Post: #50
RE: A change of direction
Quote:i have a problem with the link of the picture

They are public from Dropbox, so should not pose a problem.
I've reduced their size by 50%, just in case that's the problem.
04-04-2016 04:47 PM
Visit this user's website Find all posts by this user Quote this message in a reply
RedcrowProd Offline
Member

Post: #51
RE: A change of direction
yup they are then prolly blocked from my work computer pfft
04-04-2016 06:54 PM
Find all posts by this user Quote this message in a reply
3DRaddict Offline
Member

Post: #52
RE: A change of direction
I've just purchased Frank Luna's latest book "3D Game Programming with DirectX 12".
So with that as my guide over the next couple of months, I'll be porting my Surfing Simulation over to DirectX12. It will be interesting to see what speed advantages it has over my current DX11 version.
04-14-2016 02:33 PM
Visit this user's website Find all posts by this user Quote this message in a reply
georgatos7 Offline
Member

Post: #53
RE: A change of direction
(04-14-2016 02:33 PM)3DRaddict Wrote:  I've just purchased Frank Luna's latest book "3D Game Programming with DirectX 12".
So with that as my guide over the next couple of months, I'll be porting my Surfing Simulation over to DirectX12. It will be interesting to see what speed advantages it has over my current DX11 version.

Oh wow, let me know how it's going. A few months ago i was thinking off purchasing Luna's DX11 book but the only think preventing me from doing it was some deprecated content along with the usage of the xna math library (i think).

I would be very interested on your opinion about DX12 if you manage to sink some time into it.

Thanks.

EDIT: Thanks Zervox
(This post was last modified: 04-15-2016 05:02 PM by georgatos7.)
04-14-2016 08:35 PM
Find all posts by this user Quote this message in a reply
Zervox Offline
Member

Post: #54
RE: A change of direction
It probably won't show much improvement, from what I know to get noticable performance from DX12 you need to use it properly, some games that gets their DX12 patches performs equal or worse than the DX11 implementation because they rush to implement DX12 to get feature parity only just like they did from DX9 to 10-11.

if however you are CPU limited DX12 will probably gain some performance, if not atleast you get better power consumption due to the cpu getting more time to rest.

features of DX12 is really extensive when it comes to utilizing the CPU to feed more and more powerful GPU's giving better graphics, or in the case lets say something like a strategy games leaves more time for game logic/mechanics.

DX12 also is built alot more for multi-core and multi-gpu computers(as such, needs you to implement the multi-threaded parts for this yourself).

@Georgatos7
Frank Luna has already uploaded all source code to the book to github.

http://www.d3dcoder.net/d3d12.htm
https://github.com/d3dcoder/d3d12book
(This post was last modified: 04-15-2016 04:47 AM by Zervox.)
04-15-2016 04:45 AM
Find all posts by this user Quote this message in a reply
3DRaddict Offline
Member

Post: #55
RE: A change of direction
After browsing through the chapters of Frank Luna's book and scouring the scarce DirectX 12 resources on the Net, I'm now having second thoughts on porting my project to DX12. It seems to me that DirectX 12 is still in a development phase, and is not yet ready for the average Joe Soap 3D graphic hobbyist programmer.
Already I'm puzzling how to incorporate my trusty 'AntTweakBar' GUI... at the present time there is no easy way to overlay 2D graphics (sprites and text) on the 3D graphics viewport, and I just do not have the time to figure it out. I'm just going to have to wait for that first DirectX 12 Game Engine. In the meantime I just want to progress with my Surfing Simulation project... so with DX11 I remain! grin
04-15-2016 06:42 PM
Visit this user's website Find all posts by this user Quote this message in a reply
georgatos7 Offline
Member

Post: #56
RE: A change of direction
Ah i see, that's kinda sad since i was hoping to get a nice up to date book on DirectX. Maybe i'll reconsider the DX11 book + Rastertek Tuts for the future as you proposed.
04-15-2016 07:06 PM
Find all posts by this user Quote this message in a reply
Zervox Offline
Member

Post: #57
RE: A change of direction
To be fair 3DRaddict, DirectX12 is meant to be complex(it's amazing they've managed to simplify Vulkan and DX12 as much as they already have), DX12 like Vulkan is a close to metal API for high performance engines that requires it/has the know how to manage and deal with it.
wether or not people will write clever wrappers for DX12 and Vulkan to make it easier to debug/setup like DX11 and OpenGL is a different matter, but the core of the API, I very much doubt it will get easier.

The whole reason it has issues is that the driver doesn't intercept and make amazing guess work of what you are trying to do,which has quite some overhead.
04-15-2016 09:58 PM
Find all posts by this user Quote this message in a reply
3DRaddict Offline
Member

Post: #58
RE: A change of direction
Thanks,Zervox, for that enlightenment.smile
For better or for worse, I do have the book, and I'll be plodding through it at a slow pace as well as following developments on the Net. Perhaps Esenthel will have a DirectX12 update by the time I've completed.wink
04-16-2016 05:29 AM
Visit this user's website Find all posts by this user Quote this message in a reply
3DRaddict Offline
Member

Post: #59
RE: A change of direction
If you are lean on cash and require a good set of DirectX12 tutorials then take a look at the BraynzerSoft website: http://www.braynzarsoft.net/viewtutorial...-tutorials. The tutorials are very detailed on explanation of DirectX12 concepts, but easy to follow and understand (in my opinion, moreso than Frank Luna's book)
04-16-2016 12:49 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Zervox Offline
Member

Post: #60
RE: A change of direction
05-02-2016 05:03 AM
Find all posts by this user Quote this message in a reply
Post Reply