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?
Best way to do Vegetation?
-
- Posts: 514
- Joined: Sat May 01, 2010 10:12 pm
- Contact:
-
- Posts: 2126
- Joined: Sat Nov 25, 2006 1:49 pm
Re: Best way to do Vegetation?
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.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?
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC (LordHavoc)
Re: Best way to do Vegetation?
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.
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.
Re: Best way to do Vegetation?
BGRA32 should be fine.
Fun fact: on modern, shader-based hardware, it's slower to do the traditional alphatest than an alphablend.
Fun fact: on modern, shader-based hardware, it's slower to do the traditional alphatest than an alphablend.
i should not be here