[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - Transparent texture?

Transparent texture?

Discuss the creation of various model formats for Quake engines, and related matters to modeling.

Moderator: InsideQC Admins

Transparent texture?

Postby Karall » Sat Apr 02, 2011 2:06 pm

Alright, so I want to make a plant right?
Pretty simple, just make two square planes in a cross and apply a texture. Altho for it not to look weird, were theres nothing on the texture I want it to be transparent. So for example i have some leaves on a white background. How would i make that white transparent? I use Darkplaces.
Karall
 
Posts: 128
Joined: Thu Jul 15, 2010 5:23 pm

Postby ceriux » Sat Apr 02, 2011 4:43 pm

check out external tga support and how to use alpha channels
User avatar
ceriux
 
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Postby frag.machine » Sun Apr 03, 2011 2:14 pm

In unmodified Quake/GlQuake engines, there's no support to transparent colors in .mdl. Besides the usual Darkplaces/FTE indications, the RMQ engine (developed and maintained by mh) does support transparency to .bsp models (not sure about .mdl though, better to ask mh directly), and I remember the Kurok engine having this exactly to implement vegetation (a simple engine change was required and there's a thread where mh showed how to do that - use the forum search if you want to get your hands dirty in engine coding :) ).

If you're not targeting a modified engine, it's possible to emulate what you want with 2 entities and 2 sprites (sprites do support color index 255 as transparency). Basically, spawn both entities in the same coordinates but having a 90 degrees offset in the .angles_y and here is your plant/bush.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Postby mh » Sun Apr 03, 2011 4:18 pm

There hasn't been a requirement for having this on MDLs in RMQ yet so it doesn't support it. I'd personally run with the two sprites idea if only for one drawback - sprites are always drawn fullbright.

I guess you could hack it with MDLs by setting the entity alpha to something like 0.999 and using a TGA with an alpha channel as the skin. This may even work with the native 8-bit texture; Nehahra does this for fences/grills/grates on brush models and it works - kinda - fine. I haven't personally tested this for MDLs though so I don't know how robust it would be, and I wouldn't encourage hacks of this nature (they normally either come back to bite you or conflict with something else).
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby Spike » Mon Apr 04, 2011 1:23 am

.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby leileilol » Mon Apr 04, 2011 1:34 am

leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Postby Madfox » Tue Apr 12, 2011 9:00 pm

I used the transparant effect by transporting the model to a sprite.
There's a good sprite-editor from FricaC that can obtain the effect by using one of Quake's colours as alpha chanel,while importing small bmp.
It's a bit in the way like the grenade explosion, which also makes use of the transparant effect.

Quake uses the Pal Colour:255 R:159 G:091 B:083 for transparant.
So when you use this as your surrounding colour it will be transparant. Don't forget to use 2bit black/white shaders for alfa.

Bad point is the plant will always turn like in doom, but when you make it round enough, like a palmtree it won't be that disturbing.

fimg_v can be found at the Quakaddicted site/tools
http://www.quaddicted.com/tools/

Here's an example of the voreball as sprite, the red surrounding won't appear in Quake.
Image
User avatar
Madfox
 
Posts: 106
Joined: Sat Jan 15, 2005 3:13 pm
Location: Holland

Postby frag.machine » Wed Apr 13, 2011 12:20 am

Actually when I suggested to use sprites I was thinking about oriented sprites (the kind that doesn't always face you). :) It's just a flag you set when creating sprites with ADQuedit, I think it's possible to do the same with Fimg.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Postby leileilol » Wed Apr 13, 2011 12:23 am

but sprites aren't lit! :(

Well, if you're using darkplaces, stick a ! beginning in the filename then it'll be lit

Personally I don't like using oriented sprites for objects because you'd require more entities to simulate more volume, AND the sprites do not have visible backfaces

also, glquake (and everything after) broke its sprite rendering for the various different modes. mh needs to like write a tut to fix the exotic sprite modes in GL or something. VP Parallel Oriented is very cute to make sprite effects with (rotating smoke anybody?)
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Postby frag.machine » Wed Apr 13, 2011 12:47 am

I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Postby goldenboy » Wed Apr 13, 2011 8:24 am

User avatar
goldenboy
 
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel

Postby mh » Wed Apr 13, 2011 12:42 pm

User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby frag.machine » Thu Apr 14, 2011 12:52 am

I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm


Return to Modeling

Who is online

Users browsing this forum: No registered users and 1 guest