From time to time we will inform the community of certain areas of Skyline Development. If we have decided to add a new features or new demos in development etc we will try to make a post in this topic.Feel free to leave your comments to help encourage out development team ; )

New Grass System - Development Log

New Grass System - Development Log

Postby SolarPortal » 27 Mar 2018, 11:08

Hi,
Just wanted to start a development log for the new grass system to show where the current work is and whats been done.

So, the new grass system is using an instanced grass patch which means that you only pay for a single tile of grass that might be 8mx8m. This same mesh is then used to populate the rest of the grass on the terrain which eliminates stuttering like we had on Gen1 where you would move across the ground at speed or in a vehicle and it would pop as the grass is generated.
This happens no more.

However, because it is instanced, that means the tile has to be created as a flat tile:(see image)
unknown.png
unknown.png (891.62 KiB) Viewed 167 times


which we then use the vertex shader with the terrain heightmap data to move the Y positions of the grass to sit on the terrain. The heightmap data will have to be recreated every time you press play, regenerate the grass tiles or if we are lucky, then recreate the map after the editing through the mouse release. This recreated data is stored into a FLOAT32_RGB format for accurate information over large areas.

Picture of the saved out heightdata:
unknown (1).png
unknown (1).png (412 KiB) Viewed 167 times


It was not as simple as sampling a single point of height data though as it ended up looking very steppy or stairs.
unknown (2).png
unknown (2).png (941.53 KiB) Viewed 167 times


After doing some vector mathematics in the shader and working out which triangle the vertex belonged to on the terrain, we now have it working quite nicely.
unknown (3).png
unknown (3).png (890.01 KiB) Viewed 167 times


The only downside now is the buonding information since the bounds are set with the flat tile still and the new data is edited on the GPU, so this is affecting culling at the moment which is my current job.

I will keep this thread up to date with the development
Conceive, Quantify & Do!
Skyline Game Engine - Lead Developer.
Please provide as much information as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 3770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 750 Ti, Ram: 16gig DDR3
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 2996
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: New Grass System - Development Log

Postby SolarPortal » 27 Mar 2018, 12:13

Bounding box information is now working and updated.

Plus we have some decent height grass with density while running HBAO with it:
Clipboard Image.jpg
Clipboard Image.jpg (195.45 KiB) Viewed 162 times
Conceive, Quantify & Do!
Skyline Game Engine - Lead Developer.
Please provide as much information as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 3770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 750 Ti, Ram: 16gig DDR3
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 2996
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: New Grass System - Development Log

Postby planetX » 27 Mar 2018, 15:52

This is looking great man, can't wait to play with it. ;)

My specs: Windows 10 - Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz - 16 Gb ram DDR4 - NVIDIA GeForce GTX 960M 4 Gb

planetX
Skyline Ensen
 
Posts: 174
Joined: 28 Nov 2016, 18:27
Skill: 3D Modeller
Skill: Level Designer
Skill: Concept artist
Skill: Great creative
Skill: Programmer

Re: New Grass System - Development Log

Postby SolarPortal » 27 Mar 2018, 21:06

Thank @planetX :)

Next bit of development information is that a basic wind in the vertex shader has been created and this is fast and looks ok so far.
Tomorrow is focusing on the actual grass mesh rendering and keep it as close to PBR as possible while improving performance.
Currently, i am also having an issue with the normals of the mesh itself, but we will get it :)

Til the next bit of news... and video tomorrow of grass & wind.
Conceive, Quantify & Do!
Skyline Game Engine - Lead Developer.
Please provide as much information as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 3770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 750 Ti, Ram: 16gig DDR3
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 2996
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: New Grass System - Development Log

Postby cassius_b » 27 Mar 2018, 22:54

thanks. Great work.
cassius_b
Skyline Padawan
 
Posts: 92
Joined: 21 Mar 2016, 13:45
Skill: 3D Modeller
Skill: Programmer

Re: New Grass System - Development Log

Postby SpiderMack » 29 Mar 2018, 17:40

Nice work.
Terrain will need a grass painter tool to let people paint grass on areas they want.
For performance grass density could get lower when grass is far away.

Another feature that could be interesting is grass color changing with terrain diffuse texture color.
It's a render of terrain from top view , they called pigment map in Wicther 3, you can read the presentation here :
http://twvideo01.ubm-us.net/o1/vault/GDC2014/Presentations/Gollent_Marcin_Landscape_Creation_and.pdf
User avatar
SpiderMack
Skyline Expert
 
Posts: 425
Joined: 02 Dec 2016, 09:15
Skill: Concept artist
Skill: 3D Modeller
Skill: Level Designer
Skill: Scripter

Re: New Grass System - Development Log

Postby SolarPortal » 29 Mar 2018, 18:25

ive been using the witcher3 pdf as a base guideline... and many other sites and information, too many to say them all lol

Grass already has lods and gets less dense towards the back.
Grass painting tool will be created.. already part of the plan, just getting the base work done first before i start on editor side.

Grass Colouring based on terrain map is a must and will make it blend much better with the terrain.

Not got much done with the grass today, since i have been doing tech support.
Conceive, Quantify & Do!
Skyline Game Engine - Lead Developer.
Please provide as much information as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 3770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 750 Ti, Ram: 16gig DDR3
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 2996
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: New Grass System - Development Log

Postby SpiderMack » 30 Mar 2018, 13:09

SolarPortal wrote:Grass already has lods and gets less dense towards the back.
Grass painting tool will be created.. already part of the plan, just getting the base work done first before i start on editor side.

Grass Colouring based on terrain map is a must and will make it blend much better with the terrain.


Great.
About colouring i don't think it's not an absolute must have, Skyline needs solid fundations first before fancy graphics options.
User avatar
SpiderMack
Skyline Expert
 
Posts: 425
Joined: 02 Dec 2016, 09:15
Skill: Concept artist
Skill: 3D Modeller
Skill: Level Designer
Skill: Scripter

Re: New Grass System - Development Log

Postby SolarPortal » 04 Apr 2018, 20:24

ok, bit of an update on the progress of developing the grass.
Found and fixed why my lighting was changing when looking up or down and since fixing that, i have made some progress.

Vertex colours at the bottom of the grass are made black and blended onto the diffuse texture which gives the grass a fake shadowing on top of the terrain surface.

To add to this, we passed the terrains global normal which is what makes the mounds look like mounds and added that to the grass and used a dot product against the lighting direction which gives the grass an interesting look.
When the terrain face is dark, it darkens the grass and is the same vice versa.

Here is a couple shots to show the difference.

Grass With Terrain Normalmap - lighting addition
unknown2.png
unknown2.png (939.78 KiB) Viewed 101 times


Grass without the Terrain Normalmap - lighting addition
unknown.png
unknown.png (985.86 KiB) Viewed 101 times
Conceive, Quantify & Do!
Skyline Game Engine - Lead Developer.
Please provide as much information as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 3770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 750 Ti, Ram: 16gig DDR3
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 2996
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: New Grass System - Development Log

Postby SolarPortal » 04 Apr 2018, 21:13

Some more quality shots to show the newer grass rendering:

unknown.png
unknown.png (893 KiB) Viewed 101 times


unknown2.png
unknown2.png (837.16 KiB) Viewed 101 times


Clipboard Image.jpg
Clipboard Image.jpg (198.03 KiB) Viewed 101 times
Conceive, Quantify & Do!
Skyline Game Engine - Lead Developer.
Please provide as much information as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 3770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 750 Ti, Ram: 16gig DDR3
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 2996
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: New Grass System - Development Log

Postby SolarPortal » 07 Apr 2018, 15:08

So, grass system now has working shadows and lighting.

Shadows:
unknown (4).png
unknown (4).png (1.01 MiB) Viewed 86 times


Point light:
unknown (3).png
unknown (3).png (994.43 KiB) Viewed 86 times


Point light with point light shadows on grass:
unknown (2).png
unknown (2).png (848.9 KiB) Viewed 86 times


Spotlight:
unknown (1).png
unknown (1).png (520.95 KiB) Viewed 86 times


And of course another cool screeny of the grass:
unknown.png
unknown.png (969.6 KiB) Viewed 86 times
Conceive, Quantify & Do!
Skyline Game Engine - Lead Developer.
Please provide as much information as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 3770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 750 Ti, Ram: 16gig DDR3
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 2996
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: New Grass System - Development Log

Postby cassius_b » 07 Apr 2018, 20:17

looks amazing.
cassius_b
Skyline Padawan
 
Posts: 92
Joined: 21 Mar 2016, 13:45
Skill: 3D Modeller
Skill: Programmer

Re: New Grass System - Development Log

Postby SolarPortal » 09 Apr 2018, 17:50

been doing a bit more with the grass and now we can place the grass on any terrain resolution and it will conform perfectly to the surface.

Also stopped the grass having repetitive patterns due to the single grass patch used for instancing by rotating randomly throughout a 90 degree 360 degree Yaw radius.

And of course its starting to look even better in scenes:
SkylineScreenShot04092018_174518585.jpg
SkylineScreenShot04092018_174518585.jpg (154.69 KiB) Viewed 67 times
Conceive, Quantify & Do!
Skyline Game Engine - Lead Developer.
Please provide as much information as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 3770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 750 Ti, Ram: 16gig DDR3
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 2996
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: New Grass System - Development Log

Postby SpiderMack » 10 Apr 2018, 10:44

Looking at the picture each grass type seem to have a different density and distance display, good work.
Now it needs some rocks, some trees and some wind for vegetation :)
User avatar
SpiderMack
Skyline Expert
 
Posts: 425
Joined: 02 Dec 2016, 09:15
Skill: Concept artist
Skill: 3D Modeller
Skill: Level Designer
Skill: Scripter


Return to Skyline Development

Who is online

Users browsing this forum: No registered users and 1 guest