mreinfurt / grass.directx Goto Github PK
View Code? Open in Web Editor NEWRealistic Grass Rendering using DirectX 11 and a geometry-shader based approach.
Realistic Grass Rendering using DirectX 11 and a geometry-shader based approach.
Implement a level of detail in the geometry shader. The geometry shader can calculate the distance of the root point to the camera.
Then generate the grass blade depending on the distance... Something like:
if (distance < 20)
{
Create 10 vertices.
}
if (distance < 40)
{
Create 8 vertices
}
and so on
Implement basic wind using a wind vector field.
We need something that looks like a nice autumn day. Warm and sunny, maybe a little bit darker.
Instead of generating an offset and "walking there", just generate a random value in between (start) and (end).
In the real world, blades are not all looking into the same direction. Add some variation using the randomized number in the geometry shader.
Not exactly sure right now.
Consider/Implement the following post processing techniques:
See Eddie Lees Paper
User should be able to move and rotate the camera.
Using a displacement map generatored for the object from #21.
This issue will be used to plan our next steps. We do have milestones (which have the due date of the lab appointments), but in here we can discuss/write down the priority and order of things.
The issues do not necessarily have to be in chronological order. Basically, you can do whatever issue you want to do.
Like in the water application from Sven. Press F5 => Reload shaders.
Right now, the texture is completely mapped to the grass blade and we're getting the "sharper edge on the top" because we only have 1 vertex there.
In the future, we should use a Alpha Texture so that the Texture is not fully a quad, but has a "blade" on the top.
Will be the "terrain" for our grass for now.
when the grass is drawn before the terrain, the terrain gets messed up
would be nice if this was fixed, but that's polish!
For the grass blades... Maybe even terrain?
Add lighting for the grass shader.
Need to calculate normal for each vertex in the geometry shader.
The normal is calculated in the geometry shader by taking the three vertices and calculating their cross product
Taking the dot product of the normal by the light position achieves a per-pixel lighting effect.
This is only for basic lighting.
This issue collects ideas of stuff that we could implement at some point.
This task is used to collect ideas and plan the next tasks.
While running the application, the following should be possible:
And maybe even more.
This should be done until the last appointment.
Currently, grass blades have 5 vertices:
Extend the grass blade geometry to have 8-10 vertices to have a nicer curve. Do not focus on performance/optimization right now, we can add a LoD modifier later.
Right now every grass blade has the same color due to using the same texture. However, in the real world grass blades have different saturation/tint due to them being younger/older and so on.
Therefore, offset the color by a randomly generated number. Some grass blades should be browner, some greener and so on.
For changing vertex count, level of detail distance, light (position), texture, randomization factors...
Create a real wheat object (using Blender or whatever). This can be a high poly model, as we will create a displacement map from it.
Create Resharper configuration and share settings with @k-liu.
There are several techniques that can be implemented to reduce the amount of flickering. There is a chapter "Flickering" in Eddie Liees Paper.
Basically we can:
Instead of having one huge grid, create patches of grass that are laid out in a grid and draw them independently.
For now, we will not have real terrain with different heights. However, we should have a nice looking plane.
Therefore, do the following:
@k-liu Create nice looking textures for grass (starting with that) and later Wheat.
Also take a look at this video: https://www.youtube.com/watch?v=B4j5tzAIflU
Shows how to create a grass texture + normal maps along some other stuff.
For the paper, we need several images/figures explaining different stuff. This is a (not complete) list:
Right now they are in a perfectly aligned grid which is very unrealistic.
See explanation in Eddie Lees paper.
=> Find better distance values for each level of detail
=> Grass Patches further away from the camera have a smaller density.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.