Giter VIP home page Giter VIP logo

skirmish's People

Contributors

selinux24 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

skirmish's Issues

FIX CURVE

The actual curve implementation is a mess

BOUNDING VOLUMES

Dynamic: OBB or SPH

Picking is being done against the entire list of triangles of a model. It is a bad idea for the terrain class.

it is necessary to organize the list of triangles in a partition like a quadtree or an octree for collision tests

TERRAIN CHUNKS

  • Pre-processing of scenarios using QuadTrees / OcTrees
  • Load / Pre-processing of grids for Path Finding over terrain geometry

Comment:

Since you now have split up the mesh, you can perform LOD and culling techniques on it to skip rendering hidden chunks.

View distance is where you start. You would only render chunks within a given distance, for example the view distance of your camera. The lower the view distance, the more performance you get since fewer chunks of the terrain must be drawn.

Frustum culling is a common technique to only render meshes that intersect with the camera's view frustum. This will most likely give you the largest performance gain.

Experiment with the chunk size and view distance to get best results. Chunk size is a tradeoff between accurate culling versus easy computation. To further optimize, you could take a look at these more advanced optimizations.

Occlusion culling can be done by rendering the meshes on the CPU at very low resolution. This allows you to early detect meshes hidden behind other ones. They don't must be sent to the GPU, so you save a lot of vertex shader executions which otherwise would have been performed before rejecting the triangles.

Level of detail means that you calculate lower resolution meshes of your chunks. Based on distance to camera, you choose one of the meshes to draw. That allows you to reduce the number of vertices since chunks far away don't need so much detail. This approach plays well with octrees because you could merge multiple cubes into one low resolution mesh when being far away from the camera. However, it is non trivial to seamlessly merge the edges between two chunks of a different resolution.

Shadows - Static vs moving objects

Generate from the begining a static shadow map (inmutable) for static geometry

Separate moving objects to another shadow map, and update it every frame only with these objects

INCORRECT LIGHTING IN COMBINATION WITH SHADOWS

The objects are too dark

The illuminated faces are displayed in color less vivid than those against the light

Possibly the normalization of normal used to calculate the inclination of light are being made in the wrong place (see examples of DX11)

TEXTURING UVATLAS

Use UVAtlas to load all textures of a model in a single big texture

SPOT LIGHTS GEOMETRY

There was an error in the volume calculation

See cone of spot lights in heightmap sample

WRONG COORDINATE SYSTEM

Check the camera. Review the allocation of matrices in the shaders. The transposition may be the problem

TERRAIN MULTIPLE TEXTURES

  • More than a ground texture by using masks
  • Combine mask texturing with slope based texturing (slope rendering)

TERRAIN DRAWING

Fix the holes in medium level of detail. Whole patches were lost when moving the camera.

COLLADA LOADER

Error applying initial transformation matrix models with animation

The initial transformation matrix is applied properly to geometry, position, normal, tangent, but the animation produces strange effects.

SCENE NAVIGATION

Implement resource loading in separate threads and navigation between scenes

RAY - TRIANGLE INTERSECTIONS

Error case

Ray {Position:X:-59,95468 Y:1000 Z:-59,95468 Direction:X:0 Y:-1 Z:0}

Tri {Vertex 1 X:-58,68813 Y:9,74461E-07 Z:-58,68813; Vertex 2 X:-58,68813 Y:0 Z:-61,77698; Vertex 3 X:-61,77698 Y:0 Z:-61,77698;}
Pos {X:-59,95468 Y:-0,0001220703 Z:-59,95468}

Tri {Vertex 1 X:-61,77698 Y:0 Z:-58,68813; Vertex 2 X:-58,68813 Y:9,74461E-07 Z:-58,68813; Vertex 3 X:-61,77698 Y:0 Z:-61,77698;}
Pos {X:-59,95468 Y:0 Z:-59,95468}

X:-58,68813 Y:9,74461E-07 Z:-58,68813; Vertex 1
X:-58,68813 Y:9,74461E-07 Z:-58,68813; Vertex 2

X:-58,68813 Y:0 Z:-61,77698; Vertex 2
X:-61,77698 Y:0 Z:-58,68813; Vertex 1

X:-61,77698 Y:0 Z:-61,77698; Vertex 3
X:-61,77698 Y:0 Z:-61,77698; Vertex 3

ANIMATION CLIP CONTROLLER

Random rest positions (loop and clip auto change)

Movement to stopped and vice versa transitions (from rest to connection point, loop, and connection point to rest)

Capable to attach objects by bone name (weapons, items, backpacks...)

TERRAIN FOLIAGE

  • Update component for Foliage Patchs use
  • Renderize Foliage from farthest to closest (transparency)
  • Generate random positions instead of pre-computed

INPUT

Separate the mouse and keyboard input from the main thread

TEXT RENDER

The text is not displayed correctly in all graphics cards (in fact, only seen in laptop)

PROGRESS BAR

Implement the progress bar control for 2D and 3D

TERRAIN PATCHS PRE-PROCESSING

From a model generated in Blender, perform a geometry partition that allows fast rendering and multi-threading patch loading

This partitioning process must be configurable based on:

  • Maximum size of the partition or maximum number of partitions
  • Heights (Quadtree / Octree)

USE SHADER MACROS

Use a shader macro to initialize maximum number of things in shader:

Max sopt lights
Max point lights
Max bones per skeleton
...

TERRAIN DRAWING QUADTREE

From a model generated using Blender and node partitioned, generate N distinct resolution models:

  • High: N triangles
  • Medium: N/2 triangles
  • Low: N/4 triangles
  • Ultra low: N/8 triangles

Article:

Since you now have split up the mesh, you can perform LOD and culling techniques on it to skip rendering hidden chunks.

View distance is where you start. You would only render chunks within a given distance, for example the view distance of your camera. The lower the view distance, the more performance you get since fewer chunks of the terrain must be drawn.

Frustum culling is a common technique to only render meshes that intersect with the camera's view frustum. This will most likely give you the largest performance gain.

Experiment with the chunk size and view distance to get best results. Chunk size is a tradeoff between accurate culling versus easy computation. To further optimize, you could take a look at these more advanced optimizations.

Occlusion culling can be done by rendering the meshes on the CPU at very low resolution. This allows you to early detect meshes hidden behind other ones. They don't must be sent to the GPU, so you save a lot of vertex shader executions which otherwise would have been performed before rejecting the triangles.

Level of detail means that you calculate lower resolution meshes of your chunks. Based on distance to camera, you choose one of the meshes to draw. That allows you to reduce the number of vertices since chunks far away don't need so much detail. This approach plays well with octrees because you could merge multiple cubes into one low resolution mesh when being far away from the camera. However, it is non trivial to seamlessly merge the edges between two chunks of a different resolution.

NORMAL WORLD

Review Shaders. Is normalizing normal once per pixel (the pixel shader) instead of once per vertex (in the Vertex Shader)

VEGETATION MAPS

Modify the planting algorithm to use some kind of map in combination with the actual random generation

Maybe using the terrain alpha map

MESH OPTIMIZATION

Check this:

Grouping each model mesh according to its material and vertex type.

This improves performance because fewer calls to the Draw API were made, but calculated volumes are larger and less efficient, because of containing more similar geometry.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.