Foliage


(Destroy666) #1

I have problem with foliage - it doesn’t draw correctly.

It should draw in a rectangle, with less intensity and with further distance between models.

This is my shader:

textures/dom_islands/trawa/trawa2
{
        qer_editorimage textures/dom_islands/trawa/trawa2.jpg

        q3map_foliage models/rayban_foliage/w_grass_foliage1.md3  1 16 0.1 2
	q3map_foliage models/rayban_foliage/w_grass_foliage2.md3  1.1 16 0.1 2
	q3map_foliage models/rayban_foliage/w_grass_foliage3.md3  1 16 0.1 2
        
        {
                map textures/dom_islands/trawa/trawa2.jpg
        }
        
        surfaceparm grasssteps
        surfaceparm landmine
}

What should I change in my shader?


(Wezelkrozum) #2

You should raise the second value ( 1 16 .1 2 --> 1 60 .1 2 ) //<scale> <density> <odds> <randomnes>


(Destroy666) #3

Effect:

What is use of this “density”, “odds”, and “randomnes”?


(Wezelkrozum) #4

Density is how much foliage there is. randomnes will spread the foliage in a natural way. and odds will force the foliage.
What if you only use one q3map_foliage and type // before the 2 others?
And what happens when you increase the odds value?

My tip is: play around with the values and you will see what they stand for…


(Destroy666) #5

Hmmm I think I’ll do it model by model.

Another question - what means compiler error:
“Mixed detail and structural (defaulting to structural)”


(Wezelkrozum) #6
  1. U have a brush which you set to structural but the brush has an detail command in his shader. So it’s mixed and will be set to structural.
    Or
  2. U have a brush which you set to detail but the brush has an structural command in his shader. So it’s mixed and will be set to structural.

(Destroy666) #7

Command in shader?
Which command?

When changing brushes (like chairs etc.) to detail, do I lower the amount of portals?
Cause my map is big and I have over 20 thousands portals and the compile time -vis is over 12 hours.
How can I lower the amount of portals by other way?


(stealth6) #8

look up optimizing big time, and that skybox of yours of lack of is probably also causing problems


(Zer0Cool) #9

12 h O.o
how big is your map?


(Avoc) #10

[QUOTE=Destroy666;204235]Command in shader?
Which command?

When changing brushes (like chairs etc.) to detail, do I lower the amount of portals?
Cause my map is big and I have over 20 thousands portals and the compile time -vis is over 12 hours.
How can I lower the amount of portals by other way?[/QUOTE]

It sounds like all your brushes are structural - all structural brushes cause -vis splits. In other words, yes, changing brushes of all details in the map (chairs, tables, furniture, roofs, pillars etc.) to detail, instead of structural, will lower the amount of portals.


(varsovie) #11

Destroy666

  1. Foliage:
    http://www.splashdamage.com/forums/showthread.php?p=197286

Structural - use for big things like main house body, hill etc.
Details - use for small things - like chairs, window, stairs etc…
most common reason of ~12h compilation is everything built as structural. So each chair,stairs make many many portals what make compilation time infinity long. This is some gap in most manual which don’t alert enough strong about impact of structural / details object difference to performance.

Watching on sky background in Your screenshot - during compilation with enabled BSP monitoring do You see some map leakage ? Maybe You just use caulk sky so it looks like leaked map, but if map is really leaked compilation process isn’t work well.

I guess from shader name that You are from Poland too :slight_smile:


(Destroy666) #12

It’s all fixed, but thanks anyways.
I forgot to detail one building furniture.
Sky wasn’t on my map because I didn’t -vis compile when I made this screen.

And yes, I’m from Poland.
Witam.