Advertisement Jump to content
  • Advertisement

Search the Community

Showing results for tags '3D'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Categories

  • Audio
    • Music and Sound FX
  • Business
    • Business and Law
    • Career Development
    • Production and Management
  • Game Design
    • Game Design and Theory
    • Writing for Games
    • UX for Games
  • Industry
    • Interviews
    • Event Coverage
  • Programming
    • Artificial Intelligence
    • General and Gameplay Programming
    • Graphics and GPU Programming
    • Engines and Middleware
    • Math and Physics
    • Networking and Multiplayer
  • Visual Arts
  • Archive

Categories

  • Audio
  • Visual Arts
  • Programming
  • Writing

Categories

  • Game Dev Loadout
  • Game Dev Unchained

Categories

  • Game Developers Conference
    • GDC 2017
    • GDC 2018
  • Power-Up Digital Games Conference
    • PDGC I: Words of Wisdom
    • PDGC II: The Devs Strike Back
    • PDGC III: Syntax Error

Forums

  • Audio
    • Music and Sound FX
  • Business
    • Games Career Development
    • Production and Management
    • Games Business and Law
  • Game Design
    • Game Design and Theory
    • Writing for Games
  • Programming
    • Artificial Intelligence
    • Engines and Middleware
    • General and Gameplay Programming
    • Graphics and GPU Programming
    • Math and Physics
    • Networking and Multiplayer
  • Visual Arts
    • 2D and 3D Art
    • Critique and Feedback
  • Community
    • GameDev Challenges
    • GDNet+ Member Forum
    • GDNet Lounge
    • GDNet Comments, Suggestions, and Ideas
    • Coding Horrors
    • Your Announcements
    • Hobby Project Classifieds
    • Indie Showcase
    • Article Writing
  • Affiliates
    • NeHe Productions
    • AngelCode
  • Topical
    • Virtual and Augmented Reality
    • News
  • Workshops
    • C# Workshop
    • CPP Workshop
    • Freehand Drawing Workshop
    • Hands-On Interactive Game Development
    • SICP Workshop
    • XNA 4.0 Workshop
  • Archive
    • Topical
    • Affiliates
    • Contests
    • Technical
  • GameDev Challenges's Topics
  • For Beginners's Forum
  • Unreal Engine Users's Unreal Engine Group Forum

Calendars

  • Community Calendar
  • Games Industry Events
  • Game Jams
  • GameDev Challenges's Schedule

Blogs

There are no results to display.

There are no results to display.

Product Groups

  • Advertisements
  • GameDev Gear

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Website


Role


Twitter


Github


Twitch


Steam

Found 1000 results

  1. Hello. I am writing a simple shadowmapping algorithm with one directional light. I understand the basics but I can't make it work. Can you look at my code snippet and tell me what am I doing wrong? Shadowmap is correct (1024x1024, one directional light looking at (0,0,0) from (0,10,0)). float3 PositionFromDepth(in float depth, in float2 pixelCoord, float aspectRatio, float4x4 invView, float4x4 invProj) { float2 cpos = (pixelCoord + 0.5f) * aspectRatio; cpos *= 2.0f; cpos -= 1.0f; cpos.y *= -1.0f; float4 positionWS = mul(float4(cpos, depth, 1.0f), invProj); positionWS /= positionWS.w; positionWS = mul(positionWS, invView); return positionWS.xyz; } float GetShadow(float3 posWS) { float4 lpos = mul(float4(posWS, 1), gLightViewProj); //re-homogenize position after interpolation lpos.xyz /= lpos.w; //if position is not visible to the light - dont illuminate it //results in hard light frustum if (lpos.x < -1.0f || lpos.x > 1.0f || lpos.y < -1.0f || lpos.y > 1.0f || lpos.z < 0.0f || lpos.z > 1.0f) return 0.0f; //transform clip space coords to texture space coords (-1:1 to 0:1) lpos.x = lpos.x / 2.0f + 0.5f; lpos.y = -lpos.y / 2.0f + 0.5f; //sample shadow map - point sampler float shadowMapDepth = ShadowMap.Sample(Sampler, lpos.xy).r; const float bias = 0.001f; if (shadowMapDepth < lpos.z - bias) return 0.0f; return 1.0f; } float4 ps_main(PixelShaderInput pin) : SV_Target { float2 pixelCoord = pin.texcoord.xy; float depth = Depth.SampleLevel(Sampler, pixelCoord, 0).x; // Outgoing light direction (vector from world-space pixel position to the "eye"). float3 posWS = PositionFromDepth(depth, pixelCoord, gScreenDim.w, gInvView, gInvProj); float shadow = GetShadow(posWS); return float4(shadow.xxx, 1); } The results I get are on the attached image. To me it looks like world space position extracted from depth is not really world space position but I don't know if that's the case. I'll appreciate any kind of help on this.
  2. First I would like to say that I had a lot of fun attempting this challenge. I never participated in anything like this before. I voted for the Doom and the Dungeon Crawler choices in the challenge poll and was satisfied to see that they both came out on top. What went wrong I will start with what went wrong when I started this project, which uses the Unreal Engine. Probably the toughest thing I had to code, was the AI. It simply did not do what I wanted it to do at first and it took me several tries just to get it right. I had to turn on and look at the AI debug screen to see what was wrong. Turns out that my AI's cone of vision was completely disoriented due to a badly aligned capsule component. I simply rotated the capsule 90 degrees and the cone of vision was correct afterwards. But later on I got rid of the 45 degrees vision cone and replaced it with one with full circle so that the enemy could sense the player as if it had eyes all around its head. It was more adequate for the kind of AI that this game would require. Another problem that I encountered was that sometimes the AI would stop moving after I had made some changes on the map. It took me several hours to realize that I had to rebuild the map navigation data because the AI simply did not move otherwise. What went right This project uses Blueprints for the most part, with some C++ for the basic player movement, setup and camera orientation. I found that Blueprints are extremely easy to use and let you iterate and prototype your game much much faster than pulling up Visual Studio, write some C++ code and wait a while for the code to compile after you make some changes. This is one of the problems with UE4 in my opinion since it takes much longer to compile your C++ code, than to compile your Blueprints. Unity has the upper hand in this as the C# compiles very quickly. This is probably why Epic Games are considering creating an intermediate scripting language between Blueprints and C++. https://www.reddit.com/r/unrealengine/comments/aezhdv/it_seems_people_at_epic_are_considering_adding/ So, it was a breeze to simply code game logic using these Blueprints and it did not take me long to adopt them. I am considering nativizing them so I can basically learn how they map to C++, and also to optimize the code. If I do, I will publish the source code on GitHub. What I have learned I learned how to use UE4, in my view the most versatile and powerful engine there is to make games right now. You can do so much with it, not just games but all kinds of things from movie content to architectural design. I learned how to use Blueprints, which at first I thought they were kind of bad since the nodes take so much space and to perform common programming things like loops, branching, etc. it is not ideal. I learned how to design an AI using UE4's behavior trees and AI perceptions. It was not easy at first, but it was satisfying to finally make it work. Level design is another thing I had to improve, and this time it was a bit better than the usual basic things I have done in the past, mostly with Quake 3's level editor. Conclusion This challenge helped me learn a lot of things, and I am looking forward to see which challenges will be proposed in the future. I will go back to focus on my own engine, which uses D3D11/12, and will use what I have learned with UE4 to improve my own code.
  3. Paszq

    Last quarter additions

    Haven’t written for a while, but I have been working on the project tirelessly I managed to implement a different animation system for weapons, each one can have a unique animation (instead of predefined by very broad weapon type). Here’s an example – Slingshot for Ranger: Slingshot – the first weapon of every Ranger character got unique animations #gamedev #indiedev #lowpoly #indiegames #unity3d pic.twitter.com/mFR8x0iofi — Arpago (@ArpagoGame) October 16, 2018 I completely remade buffs/debuffs system – replaced it with Aura Controller, each aura can have its own icon, effect, length, etc… all affected by player/enemy stats. And it is all visible on the hud Minor improvements to the debuffs UI #gamedev #indiedev #indiegames #unity3d #lowpoly pic.twitter.com/mcIatOEYge — Arpago (@ArpagoGame) October 30, 2018 …as well as a few new particle effects, here are some examples: Stun: New visual effect of being stunned #gamedev #indiedev #indiegames #lowpoly pic.twitter.com/cStG9Okf45 — Arpago (@ArpagoGame) November 4, 2018 Haste: Changed the effect of haste, and fixed the animation#gamedev #indiedev #lowpoly #unity3d pic.twitter.com/drOiMR13NJ — Arpago (@ArpagoGame) November 23, 2018 Armor buff: Tweaked Armor buff spell effect a bit#gamedev #indiedev #lowpoly pic.twitter.com/KHX5nAGD7X — Arpago (@ArpagoGame) November 24, 2018 Invisibility: Fixed invisibility effect for all races #gamedev #indiedev #lowpoly #madewithunity pic.twitter.com/IaOWEXcs2D — Arpago (@ArpagoGame) November 20, 2018 I implemented Pause functionality, as well as a bunch of in-game settings (which are saved, yay!) Bunch of new options – sensitivity, font type, font size #gamedev #indiegames #indiedev #lowpoly #screenshotsaturday pic.twitter.com/dQj717qpcZ — Arpago (@ArpagoGame) November 11, 2018 Added Death system – for now, a short message is shown for a few seconds, and then you get teleported back to the last camp you rested at. Later, I plan on healing all enemies around the player who died, to remove possibility of rushing back after respawn again and again: Slightly improved the visibility of the "You are dead" text#gamedev #indiedev #lowpoly #unity3d pic.twitter.com/j7g1CfpeAO — Arpago (@ArpagoGame) November 26, 2018 Created a ship that will be present in the game’s intro sequence: #gamedev #indiedev #lowpoly #indiegames pic.twitter.com/KUtdX0pqwM — Arpago (@ArpagoGame) December 9, 2018 …with fully modelled interior, which serves as main menu + character creation hub: Character creation / Load game menu progress #gamedev #indiedev #lowpoly #indiegames pic.twitter.com/5Xk7KErqdS — Arpago (@ArpagoGame) December 13, 2018 Completely redesigned loading system – now with added level-specific loading screens and progress bar: Starting up the game and loading a character #gamedev #indiedev #indiegames #lowpoly pic.twitter.com/NP5Uqs9oFk — Arpago (@ArpagoGame) December 20, 2018 Split-screen multiplayer functionality added to main menu + improved co-op specific interface + fixed a TON of issues with it: A bit of co-op gameplay #gamedev #indiedev #lowpoly #indiegames pic.twitter.com/7vxQMH6crn — Arpago (@ArpagoGame) December 23, 2018 Implemented varied environments within one “level” – like getting into a cave without a loading screen Getting in a cave!#gamedev #indiedev #indiegames pic.twitter.com/Qv89ggbrfQ — Arpago (@ArpagoGame) December 27, 2018 Entirely new Fog of war (map discovery) controller – now it’s pretty slick, and it’s saved together with each player character separately. I really like it Remade fog of war for the game's map – now it looks better, saves, and loads with the character! #gamedev #indiedev #indiegames #lowpoly #madewithunity #screenshotsaturday pic.twitter.com/bFhREJk7m8 — Arpago (@ArpagoGame) December 28, 2018 Also added collision blocks to prevent players from falling into the abyss or walking outside of the level Added some collision blocks to create invisible walls, so that players won't fall out of the map pic.twitter.com/rVwahXXmuO — Arpago (@ArpagoGame) January 6, 2019 …and currently I am working on dialogues and quests. Here’s a little walk around the Dagis village, and a dialogue with farmer Ferk, who’s probably the first person you’ll meet there. A short stroll around the village + checking the new (more complex) dialogue pic.twitter.com/Zjp5SoSrI0 — Arpago (@ArpagoGame) January 16, 2019 In case you have any questions or remarks, feel free to write here …or visit project’s Twitter https://twitter.com/ArpagoGame/ …or visit its website – http://arpago.eu Thanks! The post Last quarter additions appeared first on Arpago. View the full article
  4. Hi, here is my entry for the Dungeon Crawler Challenge. I will not have much time in the coming weeks so I have published what I could do right now with the time I had. Only had time to make one level. I will write the Post-Mortem in the next few days. The download file is a .zip, and there is no installer so you need to find the .exe in Binaries/Win64. Controls are WSAD keys to move around, left mouse button to attack, mouse to move camera around, H key to drink health potions, M key to invoke in game menu. To open chests you just touch the front of the chest with the player, and walk over it when opened to pickup the loot. Let me know how it runs because the build does not have resolution mode change options and I made a scalable build, which is only scalable on my system.
  5. Hello everyone! I'm trying to create a window with SDL2. This code works perfectly: _window = SDL_CreateWindow("Hello", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 640, 480, 0); However, this code already doesn't: _window = SDL_CreateWindow("Hello", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 640, 480, SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN); if (!_window){ throw SDLException("Can not create window!"); } I don't understand what's the problem: the exception is not thrown. I'm trying to get OpenGL 4.2, because glxinfo shows it's available: However the window is not shown. Here's the complete code: if (SDL_Init(SDL_INIT_VIDEO) < 0){ throw SDLException("Can not init SDL"); } SDL_GL_SetAttribute(SDL_GL_ACCELERATED_VISUAL, 1); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 4); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2); SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); _window = SDL_CreateWindow("Hello", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 640, 480, SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN); if (!_window) throw SDLException("Can not create window!"); SDL_ShowWindow(_window); _gl_context = SDL_GL_CreateContext(_window); if (!_gl_context) throw SDLException("Can not create an OpenGL context!"); SDL_GL_SetSwapInterval(1); However it's not crashing the app!!! I can also play some games on my laptop: MegaGlest, 0 A.D..They all work. I also tried to add: set (OpenGL_GL_PREFERENCE GLVND) in CMakeLists.txt, but it also didn't help. Great thanks for your attention. I tried to find the solution in the Internet first, but I've failed to find it. I hope, I'm not the only person with this problem. p.s. Just in case, I'm also attaching the project. I'm doing it under Ubuntu 18.04, but it shouldn't make too much sense, since it uses Qt Creator and CMake. To build the project you need to have a CMake or Qt Creator installed. If you have CMake you can download just 'client(light)' file. So, to build and run it: 1. go to the client/build directory 2. run: cmake ..&& make && ./Arena client(light).zip arena-shooter_(full).zip
  6. Hi all, The main project for this weekend was to get powerups tied to an actual level in the game, which i have now got working as in the video below: With this out of the way I have decided to progress onto the next feature of the game which requires development. This is the level select page, which you are presented with if you have previously unlocked any levels in the game, letting you revisit and replay them to get better scores and collect extra powerups. Within the menu, each level should have a preview image, or thumbnail, showing its appearance to allow for visual memory of which level is which. This was previously implemented on the .NET version of Firework Factory, as can be seen below: In the newer unreal engine version this must be re-implemented. In the previous version, screenshots were taken by spawning the entire level, taking a screen capture of the level and storing that in a texture. I decided to do something similar in UE4, only to find that doing so would be overkill, as instantiating a level is quite expensive, and would have to be done dozens of times on startup just to capture screenshots to render targets, which could then be turned into materials, and displayed in the menu. Instead, i chose to make a 'photo studio', and get the levels 'photographed'. Yes, you heard right, a photo studio. The solution for the problem is to first create a separate map. Within this separate map create a couple of strong directional lights to ensure that there isn't too much shadow in the images. Secondly, create a floor made of a non-emissive completely black material with no reflectiveness. Essentially, this floor is impossibly black, much like it has been painted with vantablack. Next, I set up a blueprint to incrementally load each level in a loop, wait 1 second for the postprocessing effects to settle, and issue the console command: HighResSnapshot 3.0 The code for this can be seen in the blueprint below: This causes the game to save a screenshot of the current level to the folder Saved\Screenshots\Windows, where it can be loaded into GIMP and autocropped, giving me an image like the one below, which is the one for level 4: These can then be associated with the levels as a Texture2D by importing them into the content folder, so that a thumbnail can be displayed. As i add new levels, i just re-run the process to generate the snapshots, pick the new levels images, autocrop them and drop them into content, which takes all of 30 seconds. This means i can ensure that all the images are taken from the same angle, with the same lighting, the same postprocessing effects, and have an image of exactly the same dimensions. Next on the list: Use these thumbnails for an actual level select menu! Feedback as always is more than welcome, stay tuned for further updates!
  7. Hello there, I've been developing a game for over a year now called TIRELESS, and here I shall explain what its all about! TIRELESS is a Challenging 3D Platformer video game which focuses solely on skill based gameplay. Collecting coins, running and jumping is what you'll be doing most of the time. The game however takes a unique approach to a standard 3D Platformer format by adding a game mechanic called the Adrenaline Mode, greatly increasing the boost in both speed and jump height turning the game into a even more challenging and visually stunning spectacle. A TRULY RAGE INDUCING EXPERIENCE! You like rage games? TIRELESS has got you covered. The game will try it's best to make you fail. It is punishing and unforgiving, which is why it makes for a good rage game. Many have tried, and many have failed. But don't be discouraged, the more you practice, the better you get and are simply bound to get good results. The game requires skill, and is not based on chance. But you'll surely find yourself screaming multiple times in your playthrough. GAME FEATURES VARIETY OF LEVELS Consisting of variety of different levels, each built in ways to push the boundaries and uncover ones true core skills, You'll be taken on a long and deadly road to victory. A HARDCORE CHALLENGE The game is of high difficulty and requires lots of skill to play. For a beginner, it can take up to an hour to complete just one single level, while a good player can pass it in under 3 minutes. There is even an in-game guide dedicated to a complete beginner in TIRELESS to help you get started and understand the very basics of the game. A TRUE 3D PLATFORMER EXPERIENCE Unlike most Platformers, TIRELESS removes any sort of combat or enemies, thus making the game's primary focus platforming. But platforming needs to be done right. TIRELESS takes platforming to the next level, offering a wide variety of levels and challenges for the player to discover. GAMEPAD SUPPORT The game was designed to be played with a mouse and keyboard, but there is a full gamepad support for anyone who prefers a joystick. SLOW MOTION EVENTS In every single level of the game there are slow motion events which are triggered automatically and really make for very cinematic and even more stunning moments in the game. ADRENALINE MODE There is a unique power up that plays a huge role in the game called the Adrenaline Box, collecting it triggers the Bright, Fast, and Flashy Adrenaline Mode, giving you an insane boost of speed and increased jump height turning the game into a visually stunning spectacle. This mode is used throughout all levels of the game, and it is advised to take time and learn how to properly navigate in it. IMMERSIVE MUSIC AND SOUNDS The game features some beautiful tunes, with each level having a special dedicated song. Featuring different styles of electronic music such as chill, melodic dubstep, hardstep etc. VOICE ACTING The game features fully voice acted characters such as Kyera, your guide to the game. AWARD SYSTEM As mentioned before, depending on the skill of the player, makes for how long it takes to beat levels in the game. After finishing each level, the player gets a reward based on time spent on that level, each level has a different "best time" based on its difficulty and length. LEVEL SELECTION After finishing a level you will be sent to a closed area called the Lobby. In the lobby you'll have access to all the levels and stages you've been to and can revisit them at any time. After finishing a level or stage, you'll be able to unlock the next one in the lobby. CAMERA FILTERS AND OTHER CUSTOMIZATION Customization is one of my favorite part in games, in TIRELESS, you can change colors of your character, along with the wings he's wearing. Other then that, there are also camera filters which change the overall color of the game to make it look different and offer a cool new experience to each level. It almost feels like you are in a completely different place. Try out the Free Downloadable TIRELESS DEMO Now!
  8. BearishSun

    bs::framework v1.1 released

    First major update for bs::framework has launched. The update includes a brand new particle system, decals, various renderer enhancements and over 150 other new additions and changes! For more information check out the detailed release notes. General information bs::framework is a C++ game development framework that aims to provide all the low-level systems and features you need for the development of games, tools or engines. It was built from the ground up to replace older similar libraries. It provides a modern API through C++14, provide extensive documentation and a cleaner, more extensible design. While also focusing on high performance with its heavily multi-threaded core, and use of modern technologies such as Vulkan and physically based rendering. www.bsframework.io View full story
  9. BearishSun

    bs::framework v1.1 released

    First major update for bs::framework has launched. The update includes a brand new particle system, decals, various renderer enhancements and over 150 other new additions and changes! For more information check out the detailed release notes. General information bs::framework is a C++ game development framework that aims to provide all the low-level systems and features you need for the development of games, tools or engines. It was built from the ground up to replace older similar libraries. It provides a modern API through C++14, provide extensive documentation and a cleaner, more extensible design. While also focusing on high performance with its heavily multi-threaded core, and use of modern technologies such as Vulkan and physically based rendering. www.bsframework.io
  10. Valsi_Noen

    Noel's Hope - is alive!

    Noel's Hope - is alive! Hello! Not a little time has passed since the second post, but the project is still alive;) Moreover, after a series of successful and not very successful tests, the project is finally ready to try to go in Steam Shop and conquer your hearts! Noel's Hope - This is a story in RPG, Survival, Adventure style with a small of Roguelike genre. What game should be expected now? Collect resources for survival, build useful objects on the ship, improve your character, upgrade characteristics, explore the islands and dungeons, destroy bosses, solve secrets, help survivors, find satellites and etc.! There are dungeons/islands and some zones in the game, with auto-generation of traps, enemies and useful items. Also bosses, additional quests and many stories! Unfortunately, because I am alone make this game - I had to use a lot of Free Open Source models, textures, etc., which probably already become boring of games on the Unity3D engine, but without this, the game could not exist... An important aspect is the COMMUNITY and the feedback that will be. Your opinion about the mechanics of the game, about which points you liked / didn’t like, what needs to be changed, what to adds, what to news and etc. I really hope that "Noel's Hope" will like to those who love these genres of games! p.s. In the game is not fully implemented the plot, for several reasons - one of them, the lack of a good, high-quality translation into English. (Yes, I use Google Translate + some plugins + some help else, but this is not enough!). The game is in early access until the plot is fully implemented, like some new mechanics. Much of what was planned - I am implementing right now and in the future this will be even more! Thank you for understanding Trailer: Idk, why videos (.wmv) don't work here, so just a link on Steam Page (Trailer) Screenshots: Dungeon gate example: Magic Ocean: House on island: CHA-A-A-A-ARGE! Skill upgrade tree: Treasure: Steam Shop: Steam Page P.p.s. I’ve almost finished preparing a big update, in which appear the heavenly islands, new types of traps and something else. The work on Alchemy and tools of the ship, is also actively underway. Thanks for attention:) P.p.p.s. Download Trailer (file Promo.wmv): Promo.wmv
  11. Hello, I have a 3D triangular mesh(vertices, indices, uv coords) that I'm rendering to the screen. Let's assume that the UV mapping is one-to-one. I'm trying to find a way to find the 3D position of the point with UV coordinates equal to (0,0). I searched the internet but I only find answers that I don't find convincing. The solution that I found: - Find, in UV space, the triangle that contains (0,0).. let's call it T - Calculate barycentric coordinates for (0,0) with respect to T - interpolate the 3D positions of T's vertices using barycentric coords to get the result. this seems wrong to me. Here's why: Let M be the mapping between 3D space and UV space that associates UV coords for every vertex. Let A,B and C be the vertices of T. Let P be the origin of UV space ( P = (0,0) ). We have P = alpha*A + beta*B + gamma*C (alpha,beta and gamma are the barycentric coords of P with respect to T). We assumed the UV mapping to be one-to-one, so let M° be the inverse of M. We have : M°(P) = M°(alpha*A + beta*B + gamma*C) The solution in question assumes that M° is linear.. if that was the case you can have: M°(P) = alpha*M°(A) + beta*M°(B) + gamma*M°(C) But that is not the case (correct me if I'm wrong). So is there a way to find the 3D position of a point with specific UV coords? Thanks in advance.
  12. Assuming that you know how many bones should be in the skeleton, and you have the bone hierarchy, is it possible to calculate the bind pose of the bones just based on the vertex weights? To elaborate it a bit, let's say you have a skinned mesh, and each vertex of this mesh has 4 weights (at most). So you have 4 weight values and 4 bone ids for each vertex. Also let's say you have a skeleton with 10 bones, and all you have is the bone hierarchy. You need to position the bones to match the mesh (bind pose). I am wondering if this can be done just using the weights/bone ids? I don't know how to approach this so any idea is appreciated. Thank you.
  13. I am new to shader programming. I was learning how to detect edges using shaders these days. And I found the UnityChan toon shader project. But I found it difficulty to understand when I read its implementation of sobel filter. Especially for these s few lines:(From Line166) depthsDiag.x = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture,i.uv[1]+uvDist)); // TR depthsDiag.y = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture,i.uv[1]+uvDist*float2(-1,1))); // TL depthsDiag.z = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture,i.uv[1]-uvDist*float2(-1,1))); // BR depthsDiag.w = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture,i.uv[1]-uvDist)); // BL depthsAxis.x = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture,i.uv[1]+uvDist*float2(0,1))); // T depthsAxis.y = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture,i.uv[1]-uvDist*float2(1,0))); // L depthsAxis.z = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture,i.uv[1]+uvDist*float2(1,0))); // R depthsAxis.w = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture,i.uv[1]-uvDist*float2(0,1))); // B depthsDiag -= centerDepth; depthsAxis /= centerDepth; It seems to try to get the diagonal and axial depth values. But I don't know why we need to substract centerDepth from depthsDiag and divide depthsAxis by centerDepth? Another confusion comes from these a few lines when it tries to return the final color from fragment shader:(From line 191) float SobelX = dot(SobelH, float4(1,1,1,1)); float SobelY = dot(SobelV, float4(1,1,1,1)); float Sobel = sqrt(SobelX * SobelX + SobelY * SobelY); Sobel = 1.0-pow(saturate(Sobel), _Exponent); //NK float4 Col = tex2D(_MainTex, i.uv[0].xy); Col = _EdgesColor * Col * (1.0 - Sobel) + Sobel; return Col * lerp(tex2D(_MainTex, i.uv[0].xy), _TestColor, _BgFade); What does Sobel = 1.0-pow(saturate(Sobel), _Exponent) do? And what dose Col = _EdgesColor * Col * (1.0 - Sobel) + Sobel mean? Sorry for my bad English and hope anyone could help me understand this. Links to the git
  14. Zemlaynin

    The Great Tribes Devblog #33

    Hello dears! And happy new year's holidays! It's been over a month since the last development diary. I have to say that I wanted to post a diary before, but faced with a intractable problem, which spent a lot of time. But all in order. According to the development plan, the first contact with AI was implemented: At the bottom of the screenshot you can see messages about crossing the army control zones with another army and the city. Now we had to develop an interface element that would display the event data: This screenshot in the upper left corner shows the implementation of UILabel with the ability to transfer text by words. An important element of the interface that is useful in the future. In the lower right corner, above the end of the course is now visible various messages, hover the mouse over them POPs up a hint (also a new interface element), with a short description of the event. By pressing the right button, the event can be closed without making any decision, and the left button can open the message. In this case, when you click on the event button will be the first diplomatic contact in the game: It was further implemented the first maneuvers of AI. AI walks on the map and tries to determine the boundaries of its continent. In the video at Dukat https://youtu.be/69G51u_Mq3g?t=693 that is the moment where he runs over the enemy army, which pays no attention to him, because busy with study card And somewhere in this place and at this time, I was faced with a problem, a performance problem. Our Modeler has a powerful modern computer of red Assembly. But it the game is terribly slow shipping a single core processor. The reason is simple-there are a lot of cores in new processors, but in fact they are less productive in single-threaded applications. And that moment I had a render in one stream. But in fact, the reason was not so much in this. And in the process of finding problems, I decided to count how many polygons we have in the scene: On the middle map at the maximum distance and a large cluster of palm trees - it's just scary! 15 824 756 triangles! Almost 16 million!!! After a bit of map generation, I found a place with 16.75 million. Although here is a similar place with trees gave only 8.5 million triangles: And in the middle stage consisted of about 4 million: In General, I was glad that my render copes with such a huge number of triangles, but their number was excessive. It was necessary to optimize the number of polygons in the models. 40% decreased Poligona trees! Differences practically are not visible. Next, we have altered palms - Poligona on the palms was reduced in 10 times. 600 - 700 against six thousand of polygons per pack. While there was parallel work on the models I have been trying to simplify the geometry of terrain. Here's what it looked like before optimization: And after the first steps: But it was all done by a simple method — all smooth tiles were replaced by two triangles instead of 882. But there were still flat places that could be optimized, and I began to build polygons from those triangles that had the same height: Build on them convex-concave contour (Concave Hull). With Convex Hull ω was not a problem, I already used the Graham scan (Graham scan). But the construction of Concave Hull has a problem... Information on this topic on the Internet was quite difficult to find. I had to write the implementation of algorithms from scratch. I will not lie if I say that I read a dozen different dissertations on this topic. But all the proposed algorithms gave an approximate result with some error. After a week of torment and pain, I came up with the idea of my algorithm, maybe I'll describe it someday As a result of two weeks of torment, I got the desired result and was able to build Concave Hull of almost any complexity, bypassing the set with holes, just dividing them into 2 halves of the hole. Received contour and triangulated it: Getting the output of such a result: The fog of war has also been simplified: And in zones where was present only fog of war it turned out only about 300 polygons: But in the end I was upset with the result and tell you that these two weeks I spent in the shuffle... The algorithm developed by me gave a significant increase in performance when rendering, as the number of polygons on average was reduced by 60 — 70%. But the generation of the map began to occur 10 times slower.... the algorithm was time-consuming and difficult. 3 days I lost in ATOM RPG removing stress:) Even at work did not go. Thank God we have at this time the thermometer went off scale at the border -44 - -46 degrees Celsius. And I gave my melancholy for an excuse not to start the car. And before the new year holidays, enough to play, but the truth is not passed the game, I gave a new lightweight version of the algorithm, which was suitable only for my conditions of tiles. Data calculations for optimization were not noticeable against the background of map generation and the number of polygons decreased by an average of 40-50%. But there are artifacts when rendering water, I had to rewrite all the algorithms associated with water. Here is the result: Anatoly meanwhile made unit of nomads: While he lies resting While working on optimization, I came up with the idea of how to change our mountains. Mountains have become more embossed, it is noticeable without texture, as the texture is now not suitable for them: On the grid, so in General the differences are obvious: It remains the case for small — need a new texture of the mountains. The next step was to rewrite the resource loader and map generator. Along the way, remaking the start menu for all these things: Now loading of resources goes in parallel and then map generation begins. I did a great job in dividing the render into 3 streams. The whole difficulty was in synchronization. Now we have one thread responsible only for drawing, the second thread for recalculation of the visible space when moving the camera and other interactions with the map space, and the third thread is responsible for animation and communication with the server part. And Yes, we now have a server part responsible for all events in the game and for the AI. In turn, each AI player is a separate process. Let's summarize the work done: - Graphics optimization from the software side. - Optimization of graphics models. - Server part. - Split render into 3 streams. - Preload resources (textures and models). - Rewrote the fog of war, water and terrane shaders. - Reduced RAM consumption by 20-30% - Implemented a number of UI elements - Redesigned start screen with the new UI. - Fixed errors in normal calculations. - Fixed the hills. - New mountain. - Introduced normalmap for terrain. - New selection of units. - New animation units. - Window of diplomacy. - Actions AI. Study the map. - Actions AI. Diplomatic contact. - Actions AI. The conclusion of peace, friendship, or a Declaration of war. - Actions AI. Action units in a collision. - In General, a lot of work has been done to optimize and not a lot of game mechanics. I hope this month to the CE goes to plan and I'm finally going to finish the city Thank you for your attention!
  15. does anyone have an example of how to load skinned mesh from .x file with animations? I managed to load mesh but can't figure out how to load animations. For any example or at least some suggestion on how to deal with it, i would be very grateful. And should be done with slimdx and directx 9.
  16. Here's our latest websites: -Xilvan Design Official Websites- | -Weebly Website- | -Wix Website- It show everything about the older and latest development of our games! Friendly, Xylvan, Xilvan Design.
  17. After two years in early access, indie game Tank Universal 2 is now ready for your game library.Inspired by the shapes and spaces of Tron and the gameplay of Battlezone, the sequel to 'Tank Universal' has arrived! Take control of your virtual tank and confront the forces of Gorgon in explosive first person 3d tank combat. https://www.youtube.com/watch?v=b5OL1Cs--c0 Steam link for more information https://store.steampowered.com/app/523030/Tank_Universal_2/
  18. Brain

    Lugaru Source Code

    The source code for Lugaru. Note that this source code is extremely messy and perhaps serves as an example of how not to write code. Enjoy!
  19. Brain

    OpenGameArt

    One of the largest free/open game asset sites around, everything here is free to use under varying licenses from creative commons to GPL. Contains sound effects, music, 3D models and textures, 2D sprite sheets and more. Great for prototype graphics.
  20. Our company Astronomical games is recruiting members for our upcoming mobile game currently in the preparation stage. We are the developers behind EverEmber Online and also developing EverEmber Reborn. We need people who have experience with C#, Unity, Mobile game development, or Unity multiplayer games. Check out our recruitment page: https://astronomicalgames.com/join-us/ Check out our game project page: https://www.everember.com/ Application format is on the website, check out our discord as well!
  21. Diligent Engine is a modern cross-platform low-level graphics framework. The latest release enables Vulkan on MacOS (via MoltenVK). The full list of supported platforms and APIs is as follows: Win32 (Windows desktop): Direct3D11, Direct3D12, OpenGL4.2+, Vulkan Universal Windows: Direct3D11, Direct3D12 Linux: OpenGL4.2+, Vulkan Android: OpenGLES3.0+ MacOS: OpenGL4.1, Vulkan iOS: OpenGLES3.0 MinGW build support, split barriers and other improvements are also in the new release. Check it out on GitHub.
  22. Greedy Goblin

    Revisiting Terrain Collisions

    It's been a while since my last blog entry as I haven't had much time to work on my game due to work, chores, Christmas and... err... Red Dead Redemption 2 😂. I have only managed to do little bits here and there over the past couple of months but decided to spend some time revisiting my codebase and refactoring much of it. I had a Terrain object which handled the rendering of the terrain, the ocean AND the terrain collision geometry. It was starting to feel crowded in there and I was just being lazy lumping it all into one class! So I've split out the collision geometry into a separate 'class' - TerrainCollisionBody. This also helps with what I wanted to do next... Up until now I have just been loading the collision geometry for the entire map into memory on initialisation (at this point in time it's 1,048,576 vertices but that may indeed grow considerably in the near future) which was eating up a lot of memory... at one point prior to a few optimisations it seemed to be using over 1GB of memory!! My intention was always to stream the collision geometry in from the Node.js server via a simple API; nothing amazingly clever but just loading chunks/quadrants in when the player moves towards the edge of the current quadrant and unloading any quadrants that we no longer need. So I finally completed this feature yesterday! Yippee! The memory usage has now hugely dropped down to a far more reasonable level of just over 100MB (dependent on how many quadrants are loaded) and of course it now loads far, far faster! The Approach On the server side I have a simple end point that returns the collision geometry as a simple JSON object. This consists of two arrays, one for vertices and one for faces. Each element in the faces array contains three indices which point to elements in the vertices array and a Vector3 which describes the pre-calculated face normal. The end-point takes parameters for the X and Z co-ordinates of a point on the map and a 'view size' - this determines the size of a square around the player for which it should load a subset of the collision geometry. On the client side I use the player position to determine which quadrants I need to load. This could be more than 1 quadrant since if the player is near a quadrant boundary I want to pre-load any applicable surrounding quadrants to create a seamless transition as the player steps into new quadrants. For example, in the diagram below, if the player is in the centre of a quadrant (the red X) then I'd only need to load the quadrant the player is in (unless it's already been loaded and then I do nothing of course)... If the player moves within a certain distance of the quadrant boundary then we could potentially need to pre-load up to 3 quadrants. e.g. The yellow areas represent the quadrants to load. I'm sure you get the idea by now so I won't go on. Once I've determined the quadrants I need to load all I have to do is determine the centres of each quadrant and request the collision geometry via the Node.js end-point. e.g. /api/terrain/collisiongeometry/get/-3072/7168/2048 ... where -3072 and 7168 are the X and Z co-ords of the centre of a quadrant (map centre is 0,0). The results are stored in an array of quadrants, each quadrant being an object containing all the vertices and faces for that quadrant. Any quadrants that are no longer required are deleted from the array to free up memory. I hope this makes sense to someone other than me. 😂 Anyway, the result is pretty smooth so far! The only other thing to mention is that I only do the quadrant check once every 10 seconds since doing it every frame seemed unneccesary and the more milliseconds per frame I can free up for more frequent stuff the better. I think for my next task I'll start adding in a few static objects to the terrain (buildings etc) to make it more interesting. Then I think I may get what I have so far on a public facing server so other people can have a play around with it (hopefully).
  23. Hello all, I need some help with distorting a water quad using a DuDv map. I have been following ThinMatrix's Water tutorials, for the most part successfully. For my particular problem, I followed this tutorial: https://www.youtube.com/watch?v=6B7IF6GOu7s. Upon using a DuDv map to distort my water quad, all seems fine, except that there is a small problem. There are line seams across the water quad. The attached image illustrates the issue. This is my code: water.vertexshader // The coordinates to sample the dudv map with layout(location = 0) in vec3 vertex; void main(){ texCoords = vec2(vertex.x/2.0 + 0.5, vertex.z/2.0 + 0.5) * 0.24; // vertex is a read-in coordinate from a blender exported mesh file } water.fragmentshader uniform sampler2D waterDuDv; uniform float in_time; void main(){ vec2 distortion = texture(waterDuDv, vec2(texCoords.x + in_time, texCoords.y)).rg * 0.1; distortion = texCoords + vec2(distortion.x, distortion.y + in_time); vec2 totalDistortion = (texture(waterDuDv, distortion).rg * 2.0 - 1.0) * 0.02; // Projectively map the reflection texture vec2 clipProj = ((clipSpace.xy / clipSpace.w) / 2.0 + 0.5); clipProj.y *= -1.0f; // Distort sampled texture with dudv map clipProj += totalDistortion; clipProj.x = clamp(clipProj.x, 0.001, 0.999); clipProj.y = clamp(clipProj.y, -0.999, -0.001); finalVec = vec4(texture(waterTexture, clipProj).rgb, 1.0); // waterTexture is a Render to Texture reflection image of the scene } If anyone could point out what's wrong or point me in the right direction, I would appreciate it. Thank you in advance!
  24. Why hello there, and happy new year! I feel like 2019 is gonna one of those years where change is imminent, and let's just hope it's not a bad change but rather a pleasant one. With the new year comes a new schedule. I've decided to write the Weekly Updates (and consequently ends sprints) on Saturday from now on. This way I can synchronize all of my updates. But anyways, I've also decided to take a 2-week hiatus, hence the radio silence for the last weeks. It was a nice well-needed break and I feel overall revigorated and well rested from it all. With that said, I have a whole lot to talk about, so without further ados, let's get right to it! Minimaps Markers First, there's been a significant upgrade to minimaps. Now the minimap can display the position of collectables items, interactable props and other notable landmarks. Each point has their own type of minimap markers so players can easily locate any collectable items they missed. Each marker is also kept straight no matter the map's orientation, giving them the appearance of some kind of GTA-like map markers. Mainly an aesthetic choice but I like it like that anyways. Quite handy if I say so myself. Stores, Stores, STORES! Another upgrade worth mentioning is that I've revamped the level generation code so that the appearance of malls won't depend on the player's luck anymore. This means that it's the seed that decides malls position. This effectively means that during normal gameplay players can still encounter shops no matter if they're lucky or not. Aside from that there's also been a significant upgrade in special rooms constraints. Now special rooms are more likely to spawn due to less strict constraints. Overall this means a more seasoned level, of which the game is in dire need of. Rests areas Second, I've decided to add a new type of interactable props: the rest area. These are actually modelled after rest area found in most shopping centers and malls. (because of aesthetics) The player can actually use these to rest and restore some of their health. Each rest areas can only be used once, as the player actually "trashes" it when they use it. However, there's a catch: every enemy also gains their health back. This means that players have to be careful when using these, especially if they're facing a boss. Rest areas only spawn in regular rooms if the player is lucky, and there's only one rest area per rooms. There are two types of rest area: a common one and a rare one. Common rest areas This common rest area only heals 50% of health to any active entities Rare rest areas This is the rarest variety of rest areas. It fully heals any active entities Bosses Range Attacks Previously I've talked about how bosses were in, and now I've enabled that boss the ability to do range attacks. The way it works as of right now is similar to a melee attack, but it also produces some kind of "shockwave" that moves towards the enemy. A skilled player can actually try to either jump over it or simply avoid it altogether. Bosses choose to do range attacks whenever their target is far enough, otherwise, they'll either try to get closer or do a melee attack depending on its distance with its target. Item agglomeration Third, let's talk about items in general. I've previously said that I've started to do playtesting among my closest friends and family, and have been taking notes on some matters here and there. One of the most noticeable things was the fact that most players disliked walking around the room to try to collect most items that were either drop as loot or from a treasure box, especially if it was money. So, after thinking about it I've decided to implement an item agglomeration mechanics where collectable items can "fuse" together, much like how it's made in Minecraft. Each item agglomeration has some kind of "notification pill" on the top right corner telling how many items it has inside. If two items that can agglomerate together are near enough from each other, then a magnetic force will pull each item towards each other, creating some kind of magnetic/gravitational forcefield. Most aglomerated items will also have different sizes based on the amount of agglomerated items. Larger agglomerations mean larger sizes and vice versa. The item's mass also gets bigger and bigger the more items it has. There's also a limit on how big an item agglomeration can be. If the limit is reached then another agglomerated item is created. Item agglomerations that are full won't agglomerate anymore, and there won't be any pull forces applied to them. When the player grabs an item agglomeration, then they get the specified amount of items. With this, it was significantly easier and less time to consume to collect every item, as they now group themselves together. It's also quite mesmerizing to see items get pull towards each other. Right now only money, keys and bombs can agglomerate, but I'm sure there's gonna be a whole lot more different type of agglomerate items in the future. Minor updates I've decided to nerf the bow by removing the ability to the bow to induce knockback. Fixed bugs with items orientation when placed on their pedestal There are now many more different distinct types of notification, each with their own designs and colours Added a "box breaking" effect that shows the "health" of breakable boxes I'm still working on it though. It seems that I'm not really satisfied with it, to begin with... Consequently, I've also fixed some bad geometries on the breakable box model here and there too. Added a velvet-ish shader for some types of props that are made of cloth or similar substances I've decided to balance movement speed a bit. After a series of playtesting that shows that the player moved too fast. It was a wonderful thing to do. Now the speed seems more reasonable and manageable. Changed how much damages bombs do (slight buff). I've also changed the actual damage distribution. It is now a linear one (might change it in the future though). This means the closest an entity is to the bomb the more damage it gets Same thing with the explosive force Next Week Next week will be a really hard one. With all that free time of mine during countless car trips and what not I decided that some brainstorming was in order (especially with all that playtesting. It's really eye-opening and all) One crucial idea I had was to diversify the room's landscape a bit. I hope that with that it's gonna make the game a wee bit more exciting and captivating. Technically this is currently in WiP and that's why some of the pictures taken may have holes here and there. I'm currently working on an algorithm that will enable me to have varied types of grounds (like grassed, iced or even chasms). I'm currently working on it and it would probably be the main theme of next weeks' sprint. Aside from that, there's also the idea of adding many more enemy types and perhaps more weapons and even more balancing. There are also other relics, activated items and perhaps pieces of equipment to add. In other words, there's no shortage of work to be done!
  25. After reading vulkan tutorials, there are still many unanswered questions. How can I update blending code in already created pipeline? should I delete old and create pipeline? Updating blend modes are very important for make graphical effects. Pipelines has dynamic states but blending in not one of 'them'.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!