• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Bombshell93

DX11
3D engine core layout questions.

6 posts in this topic

I've near finished a project in C# and started building a C++ engine for my next project.
I'm using DX11 but at DX9 feature level. I aim to build the engine around tessellation and displacement maps (I know its better off in DX11 feature level but my machine is only just behind the line of DX11 machines, so I can't use let alone debug the features.) regardless some (not heavy hitting) tesselation is my aim for the LOD effect.

ANYWAY! I have a few questions on the base of my engine, (I've got it functional so all of this is for the sake of expanding it)

1.) Model class layout.
My current layout is along the lines of: (pseudo-ish code)
[CODE]
Model //what is publicly used
{
ModelPart[] //contains model data per mesh (mesh, bones, material)
{
Mesh //contains mesh parts in case of large mesh
{
MeshPart[] //contains buffers and indices of bones relevant to the mesh to be passed to the shader
{
VertexBuffer
IndexBuffer
BoneIndex[]
}
}

Bone[] //contains current matrix and pointers to parent bones (for getting their matrices for full transform)
{
ParentBone*
Matrix
}

Material //contains pointers to textures and an array of parameters relevant to its intended shader
{
Texture*
Specular*
Normal*
Parameters[]
}
}
}
[/CODE]
What else should I be taking into account? What may I have overlooked or got wrong?

2.) I'd like to write my own converter to change models to my own format. Does anyone know what input formats are worth taking into account or if there is anything I should be aware of while doing this?

3.) I've got a fair plan of how I'm going to lay out texture channels for use (Specular Alpha acting as specular intensity, Normal map spherical normals in XY, Z Displacement, A Shader Parameter (E.G. glow)) is it worth making a program to merge textures into these formats? or should I just do it as they load?

Any and all help is much appreciated,
Thanks in advanced,
Bombshell
0

Share this post


Link to post
Share on other sites
I have to warn you: none of those questions involve API so odds are you might be overestimating the importance of using an API instead of another.
[quote name='bombshell93' timestamp='1333495939' post='4928040']
1. What else should I be taking into account? What may I have overlooked or got wrong?[/quote]This is only a small, albeit important part of engine design. Please notice how the whole material thing is extremely inflexible - I'm not very sure about what the [font=courier new,courier,monospace]parameter[][/font] array is supposed to be but I'd be somewhat careful about planning to have specific [font=courier new,courier,monospace]Specular[/font] and [font=courier new,courier,monospace]Normal[/font](map?) resources. Compare this to the high flexibility of D3D11 you aim for. I recall about a discussion on shading systems where an high-profile user suggested to basically drop everything in favor of a mere parameter array - which you correctly have there.
Rather than having a [font=courier new,courier,monospace]ParentBone [/font]pointer, I'd just store everything in a tree. It looks to me that identifying children is more important than identifying parents.
[quote name='bombshell93' timestamp='1333495939' post='4928040']
2.) I'd like to write my own converter to change models to my own format. Does anyone know what input formats are worth taking into account or if there is anything I should be aware of while doing this?[/quote]To my own surprise, OBJ provides incredible amounts of mileage for hobby projects. For 'level' assets I like Quake3 .map. I will support FBX decently a day. So far collada has not bought me much.
[quote name='bombshell93' timestamp='1333495939' post='4928040']3.) I've got a fair plan of how I'm going to lay out texture channels for use (Specular Alpha acting as specular intensity, Normal map spherical normals in XY, Z Displacement, A Shader Parameter (E.G. glow)) is it worth making a program to merge textures into these formats? or should I just do it as they load?[/quote]I do it at runtime - most of the time, it's just about setting an API enumerator. This is not always the case. DDS texture format provides everything explicitly. It is my understanding Unreal Engine has texture packages. I have no idea what they store there (besides the pixels I mean), but I think it's reasonable they go through some mangling.
0

Share this post


Link to post
Share on other sites
1:) you will be using instances of a object that will have a mesh, your system looks like it loads the same mesh over and over. (i dont know actualy but thats what i can see)

2:) then write a direct plugin to maya/3dmax, you wont get better results.

3:) it might be good writing a program for that. in my eyes you could write a program that compress all your textures and makes it to a atlas.
then you can put it to a constat register!
0

Share this post


Link to post
Share on other sites
Another idea is instead of making a straight converter is to load the modeling programs model than add any additons to it that you may want in your own editor. For instance Milkshape3d doesn't support normal or specular maps so you can make an editor to load and add them to your own model format. But like Tordin said writing your own exporter from the modeling program would be best. That way you dont have to use multiple editors.
0

Share this post


Link to post
Share on other sites
I find the Jason Gregory’s book (Game Engine Architecture) to be a great survey of graphic engine technologies.

I don’t know the time frame that you have, your skills, and the level of technology that you want to achieve. However, I can recommend that you research about data oriented design and component oriented design. For me the core of the engine start there, then you can plan the assets and stuff.

Good luck!!
1

Share this post


Link to post
Share on other sites
What i did in my engine is that mesh data is seperated from bone/skeleton data. That way i can share skeleton across different models. Each mesh can contain an set of vertex/index buffers and are broken down based on materials. Each vertex buffer can hold position/uv/color/boneIndexes etc.
0

Share this post


Link to post
Share on other sites
I've sorted my layout out now.
Model contains a pointer to an animation library (so its reusable) the set of current and possibly next transforms (next frame transforms in case some physics calculation is to be done on the bones or something along those lines)
The Model is then split per material into the model parts, which hold a mesh and of course the material.
The Mesh is then split into mesh parts for optimal draw calls with high poly models.

I've decided I'll have a debug system and a release system.
Debug system check if the model source (.obj .fbs etc. etc.) is newer than the converted file, if so convert it.
Release system skips the check and only reads from the converted
I'm using Assimp to help handle this, but I actually have another topic about assimp explaining how I'm having trouble with skinned meshes, bones and animations.

The third I'm still not sure, I'll probably make a material editor and make it part of the process.
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Similar Content

    • By YixunLiu
      Hi,
      I have a surface mesh and I want to use a cone to cut a hole on the surface mesh.
      Anybody know a fast method to calculate the intersected boundary of these two geometries?
       
      Thanks.
       
      YL
       
    • By hiya83
      Hi, I tried searching for this but either I failed or couldn't find anything. I know there's D11/D12 interop and there are extensions for GL/D11 (though not very efficient). I was wondering if there's any Vulkan/D11 or Vulkan/D12 interop?
      Thanks!
    • By lonewolff
      Hi Guys,
      I am just wondering if it is possible to acquire the address of the backbuffer if an API (based on DX11) only exposes the 'device' and 'context' pointers?
      Any advice would be greatly appreciated
    • By MarcusAseth
      bool InitDirect3D::Init() { if (!D3DApp::Init()) { return false; } //Additional Initialization //Disable Alt+Enter Fullscreen Toggle shortkey IDXGIFactory* factory; CreateDXGIFactory(__uuidof(IDXGIFactory), reinterpret_cast<void**>(&factory)); factory->MakeWindowAssociation(mhWindow, DXGI_MWA_NO_WINDOW_CHANGES); factory->Release(); return true; }  
      As stated on the title and displayed on the code above, regardless of it Alt+Enter still takes effect...
      I recall something from the book during the swapChain creation, where in order to create it one has to use the same factory used to create the ID3D11Device, therefore I tested and indeed using that same factory indeed it work.
      How is that one particular factory related to my window and how come the MakeWindowAssociation won't take effect with a newly created factory?
      Also what's even the point of being able to create this Factories if they won't work,?(except from that one associated with the ID3D11Device) 
    • By ProfL
      Can anyone recommend a wrapper for Direct3D 11 that is similarly simple to use as SFML? I don't need all the image formats etc. BUT I want a simple way to open a window, allocate a texture, buffer, shader.
  • Popular Now