• 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
BlackJoker

Artefacts using big model

15 posts in this topic

Hello,

 

I am using DX 11 for rendering. With snall objects everything is OK, but with big objects appears some strange behavior. Some triangles began to disappear and appear chaotically during camera movement. More detail you can see on the attached screenshots.

Length of the ship is 3km, but it has only 15000 triangles.

 

Does someone know what is the problem here? Maybe someone already faced with something similar?

0

Share this post


Link to post
Share on other sites

Hm, looks like this was the reason. I set 

screenDepth = 60000.0f;
screenNear = 1.0f;

and everything seems OK, but I cannot understand how in that case render a big/huge maps, for example, for a hundred of thousands km of space? Because of screen depth it cannot be rendered. What I must do in that case?

Edited by BlackJoker
1

Share this post


Link to post
Share on other sites

TiagoCosto's article is the best you get with direct hardware support. For bigger scenes (above the effective accuracy of a logarithmic/floating-point depth buffer, you need to partition the objects in your scene into depth ranges, and render each range with it's own projection matrix with the near/far planes adjusted.

2

Share this post


Link to post
Share on other sites

Hm, looks like this was the reason. I set 

screenDepth = 60000.0f;
screenNear = 1.0f;

and everything seems OK, but I cannot understand how in that case render a big/huge maps, for example, for a hundred of thousands km of space? Because of screen depth it cannot be rendered. What I must do in that case?

Short story, we cheat.

 

Long story: Oh no, I won't go into detail. But we use advanced rendering techniques to maximize precision (such as the ones in Outterra blog). Here's another (advanced, not sure if good for a newbie) slide: Rendering vast worlds.

We also render what's far away using 2D billboards instead of actual 3D geometry (the billboard is called impostor because we render the 3D to a texture and then display that texture as a billboard) and stuff like that, or just use fog, etc to hide artifacts.

Very people prefer to render the scene in two passes (2 depth buffers, what's close in one pass, what's far in the other one) and then composite both. It's troublesome but does the job.

1

Share this post


Link to post
Share on other sites

Thanks to all for help. It is very interesting. I didn`t now about such techniques. Please, say, if I want to render a huge map, I also could you 3 and more projection matrices for that? But I don`t know how it would display on screen in such case. Will I see all the objects I render in this case on all distances or some of them I would not see?

0

Share this post


Link to post
Share on other sites

Thanks to all for help. It is very interesting. I didn`t now about such techniques. Please, say, if I want to render a huge map, I also could you 3 and more projection matrices for that? But I don`t know how it would display on screen in such case. Will I see all the objects I render in this case on all distances or some of them I would not see?

You can render a terrain in multiple regions, sorted by their distance to the viewer. I've done this for a quick clipmap terrain prototype, but while it can be made to work, the depth interactions at region edges can get a little sticky...

Space scenes (which came up earlier in the thread?) are generally much simpler, because they are fairly sparsely populated. You can reasonably sort the entire list of objects from back-to-front, customise the near/far planes for each one, and then just draw them out in order.
1

Share this post


Link to post
Share on other sites

Could please someone give a simple example with logarithmic depth buffer for DirectX 11, because from the article hard to understand how to implement it?

Edited by BlackJoker
0

Share this post


Link to post
Share on other sites

Hm, looks like this was the reason. I set 

screenDepth = 60000.0f;
screenNear = 1.0f;

and everything seems OK, but I cannot understand how in that case render a big/huge maps, for example, for a hundred of thousands km of space? Because of screen depth it cannot be rendered. What I must do in that case?

 

It's worth pointing out the depth buffer being normally non-linear,  changing the near clip makes a huge difference compared to moving the far.

So you want to push the near as far forward as possible, but this depends on how close you camera will be to objects in the scene. The far does matter, but getting the near correct is most important. Also remeber you say 3km, but you mean 3k of unitys as scale is arbitrary.

1

Share this post


Link to post
Share on other sites

mikiex,

 

Thaks for clarification, but I want that camera will be as close to object as possible. Do you know something about logarithmic depth buffers. I tried to find an example for DX 11, but I din`t find any code example for it. 

0

Share this post


Link to post
Share on other sites

mikiex,

 

Thaks for clarification, but I want that camera will be as close to object as possible. Do you know something about logarithmic depth buffers. I tried to find an example for DX 11, but I din`t find any code example for it. 

 

Close as possible is your eyeball touching the surface a near clip of 0 :) I don't know anything about log depth buffers other than the concept exists, certainly DX11 would make things like this possible I am sure. Consider though not many games in the past have bothered to come up with a physically correct solution, yes its been a matter of contention but every project I've worked on we have managed to work around this issue by faking it.

0

Share this post


Link to post
Share on other sites

Could please someone give a simple example with logarithmic depth buffer for DirectX 11, because from the article hard to understand how to implement it?

 

 

Add this line to the end of the vertex shader after the projection multiply.

 

out.Position.z = log(C*out.Position.z + 1) / log(C*Far + 1) * out.Position.w;

 

where C is a constant used to choose the resolution near the camera: try it with C = 1.0f.

and Far is the far plane distance used to create the projection matrix.

1

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