Best way to do Vegetation?

Discuss the construction of maps and the tools to create maps for 3D games.
Post Reply
Mexicouger
Posts: 514
Joined: Sat May 01, 2010 10:12 pm
Contact:

Best way to do Vegetation?

Post by Mexicouger »

I am looking into vegetation(3D grass and plants), and have a couple various ways in my mind to go about it. I am curious to see how you guys would do vegetation for Darkplaces(Most optimal, best looking way).

My ways would be:

1- Create a particle graphic, add it to particlefont, alpha mask it, create a particle effect for it, and add a mapping entity where the particle can spawn in a randomized patch.
(Pros: fairly memory efficient, cons: not controllable, not affected by light)

2-Create 2 planes that intersect and use it as a model with an alpha grass vegetation texture. Spawn these models as an entity. (Pro: Full control of the grass in code, cons: uses alot more power to run them.)

On a side note, is there any way to make an alpha texture (whether it's tga or png) to be fully solid and not slightly translucent? Or is there a color in Darkplaces that can be used as a mask to remove a particular color?
frag.machine
Posts: 2126
Joined: Sat Nov 25, 2006 1:49 pm

Re: Best way to do Vegetation?

Post by frag.machine »

Mexicouger wrote:On a side note, is there any way to make an alpha texture (whether it's tga or png) to be fully solid and not slightly translucent? Or is there a color in Darkplaces that can be used as a mask to remove a particular color?
On DP, using PNG without alpha channel but with a transparent color works for me. I use Irfanview to convert from BMP/TGA/whatever to PNG.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
Hectate
Posts: 8
Joined: Mon Mar 11, 2013 12:38 am

Re: Best way to do Vegetation?

Post by Hectate »

Combine the methods to get the best of both worlds?

Oh, and I didn't see anything on the DP docs that indicated that there could be a alpha map - it seems to be part of the diffuse only? I was going to suggest a 2-bit alpha texture if that was an option but I suppose not.
goldenboy
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel
Contact:

Re: Best way to do Vegetation?

Post by goldenboy »

completely model it?
leileilol
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: Best way to do Vegetation?

Post by leileilol »

BGRA32 should be fine.

Fun fact: on modern, shader-based hardware, it's slower to do the traditional alphatest than an alphablend.
i should not be here
Post Reply