Jump to content

Warzone Foliage System


Recommended Posts

That wind effect looks like the flowers are moving on an undulating sea-like ground. Unrealistic to me. Grass & flowers should sway from the tops.

 

Also, I realize you are just demo'ing the tech... but it seems unrealistic to have a continual uniform distribution of flowers (unless you are in the "Sound of Music" landscape). Distributions of different vegetation should be more realistic.

They are all at random heights and random positions. The system currently only uses one texture though - something I plan to change soon. Easy to do, but i'm just one person :)

 

Expect lots more changes before any final version hehe.

Link to comment

I'm saying it looks like your flowers are undulating on a sea. It should be more like this:

 

http://www.shutterstock.com/video/clip-3367658-stock-footage-large-fields-of-poppy-flowers-and-wheat-swaying-in-the-wind.html

 

Your wind system seems to be affecting things at their roots/ground... rather than from the tops of the grass/flowers.

Yeah making them sway like that would most likely require drawing a lot more triangles to look right (which is not really an option if we want playable game speeds), but I will see what I can do.

Link to comment

Are these foilage entities sprites, efx, models, or what?

The grasses are textures added to random locations on a surface by a geometry shader. They are drawn and animated completely on the GPU.

 

The trees (and the large plants/flowers, currently) are models drawn from cgame (which also contains old code to do grass for others to use is they wish in their own mods).

Link to comment
  • 4 weeks later...

Saw this from @@AshuraDX,

 

http://www.plantfactory-tech.com/

 

...maybe you can use it?

 

Looks like a really nice program, but the personal version seems to be crippled and the license doesn't allow distribution of stuff made by it... and I sure can't afford to buy it. If only.

 

I do have software that can make reasonable trees, but the JKA model formats have limitations and rend2 bogs down really fast with anything more complex then the most basic tree models.

Link to comment

Looks like a really nice program, but the personal version seems to be crippled and the license doesn't allow distribution of stuff made by it... and I sure can't afford to buy it. If only.

 

I do have software that can make reasonable trees, but the JKA model formats have limitations and rend2 bogs down really fast with anything more complex then the most basic tree models.

 

I experimented a bit with Arbaro in the past, making tree models, exporting them, texturing them and extracting some branch textures to apply on a lower poly model, acceptable for Jedi Academy.

Link to comment
  • 1 month later...

The foliage system now uses a "/maps/<mapname>_grass" image to blend between grass/plant types across the map.

If this file does not exist, it will fall back to a default grass map.

 

Red is grass type 1, Green is 2, Blue is 3. Strength of the color at each pixel is both which ones to blend, and also the size multiplier.

 

 

Here's a few screenshots of the foliage system that show the recent updates including the blending system.

 

 

GG6bOLn.jpg

R2SF7kv.jpg

Futuza, Smoo, DTIII and 2 others like this
Link to comment
  • 1 month later...

I probably should mention that adding basic grass to any map with warzone is as simple as adding material type shortgrass or longgrass to the shader. By default it will use the default basic grass.

 

If you want to use a different climate type, add a foliage/<mapname>.climateInfo like the following.

[CLIMATE]
CLIMATE_TYPE=tropical

The "tropical" above tells it to use the climates/tropical.climate settings file. There are various ones to choose from, or you can make your own with your own. This is how tropical.climate ini file looks. If you don't want the trees stuff, ignore all the tree sections, and just set up the grass images to whatever you want. If you also want trees, set those up as well and use /genfoliage in game to add the trees. Grasses do not require the genfoliage command, they just work.

[GRASS]
grassImage0=models/warzone/foliage/grasstropical
grassImage1=models/warzone/foliage/grasstropical2
grassImage2=models/warzone/foliage/grasstropical3
seaGrassImage=models/warzone/foliage/seagrass

[TREES]
// Over-all tree scale multiplier...
treeScaleMultiplier=2.0

// Per-tree model filenames...
treeModel0=models/warzone/trees/uqpalm2.md3
treeModel1=models/warzone/trees/uqpalm3.md3
treeModel2=models/warzone/trees/giant1.md3
treeModel3=models/warzone/trees/anvilpalm1.md3
treeModel4=models/warzone/trees/willow.md3
treeModel5=models/warzone/trees/willow2.md3
treeModel6=models/warzone/trees/willow3.md3
treeModel7=models/warzone/trees/willow4.md3
treeModel8=models/warzone/trees/manfern.md3

// Per-tree billboard texture filenames...
treeBillboardShader0=models/warzone/billboard/uqpalm2
treeBillboardShader1=models/warzone/billboard/uqpalm3
treeBillboardShader2=models/warzone/billboard/giant1
treeBillboardShader3=models/warzone/billboard/anvilpalm1
treeBillboardShader4=models/warzone/billboard/willow
treeBillboardShader5=models/warzone/billboard/willow2
treeBillboardShader6=models/warzone/billboard/willow3
treeBillboardShader7=models/warzone/billboard/willow4
treeBillboardShader8=models/warzone/billboard/manfern

// Per-tree billboard scales...
treeBillboardSize0=128.0
treeBillboardSize1=128.0
treeBillboardSize2=204.0
treeBillboardSize3=168.0
treeBillboardSize4=183.0
treeBillboardSize5=183.0
treeBillboardSize6=203.0
treeBillboardSize7=203.0
treeBillboardSize8=153.0

// Per-tree radius scales...
treeRadius0=42.0
treeRadius1=52.0
treeRadius2=72.0
treeRadius3=75.0
treeRadius4=38.0
treeRadius5=38.0
treeRadius6=38.0
treeRadius7=38.0
treeRadius8=72.0

// Per-tree vertical offsets...
treeZoffset0=-64.0
treeZoffset1=-64.0
treeZoffset2=-64.0
treeZoffset3=-64.0
treeZoffset4=-64.0
treeZoffset5=-64.0
treeZoffset6=-64.0
treeZoffset7=-64.0
treeZoffset8=-64.0

Link to comment
  • 4 weeks later...

last update Uniqueone did a update was the 12 aug.

 

* Improved volumetric light system a bit by changing depthmap colors to black for occluders and white for background objects. Now shadows are more visible and light is a little brighter.
* Experimental adjustments to the grass (r_foliage 2 only) system.
* Adjusted grass images to take up more of the image to improve FPS by spending less time thinking about blank areas.
* Adjustments to the FPS tweaks in the last commit.
* Changed a few default cvar values.
 
this is lates changelog :)
i could be wrong but i think he is having a break atm :)
Link to comment
  • 2 months later...

Here's a few quick screenshots of the extension to the procedural geometry stuff I have been working on.


I have changed the old grass system to do 3D model ground cover.

Lighting is now done deferred for speed improvements.

Real lighting also now comes from glow shaders. Visible in the last screenshot on the fallen tree behind the crystal.



gAm22fI.jpg

rYSuLXW.jpg

cWENp0H.jpg

4tX354i.jpg

DXRqt5B.jpg

m8ThruE.jpg

3CDQUmY.jpg

Smoo, Futuza, DarthDementous and 1 other like this
Link to comment

 

Here's a few quick screenshots of the extension to the procedural geometry stuff I have been working on.

 

I have changed the old grass system to do 3D model ground cover.

Lighting is now done deferred for speed improvements.

Real lighting also now comes from glow shaders. Visible in the last screenshot on the fallen tree behind the crystal.

 

 

gAm22fI.jpg

rYSuLXW.jpg

cWENp0H.jpg

4tX354i.jpg

DXRqt5B.jpg

m8ThruE.jpg

3CDQUmY.jpg

 

beautiful

Link to comment

Looking great as always. Are you able to cast shadows from any other light sources besides the sun?

 

Unfortunately even sun shadows in rend2 are horrible for FPS, specially on anything more complex then a standard map. I usually have them turned off unless I get the urge to see how things look with real shadows.

 

I have optimized the sun shadows code in warzone for speed, but its still takes around 1/4 of your FPS away (depending on lots of stuff like CPU load, GPU load, GPU and CPU power, etc - for me on this map its about 50-60fps without shadows and about 30ish with them) with all the extra geometry from trees, foliage, etc.

 

It would be easy enough to add shadows for other lights (in fact I already did most of it), but sadly, the results would be pretty much unplayable. Maybe if I can find some more ways to speed up FPS (I try to keep as close to 60fps as possible on my oldish hardware - nvidia 760), then we can invest the gains into the shadows.

 

The shadows you see in the screenshots are not actually sun shadows, they are a screen-space-shadow/ssao-ish shader I added as an alternative to real shadows for now.

Smoo likes this
Link to comment
  • 2 weeks later...

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
×
×
  • Create New...