Inside3D!
     

Transparent brush
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Engine Programming
View previous topic :: View next topic  
Author Message
CocoT



Joined: 14 Dec 2004
Posts: 599
Location: Belly-Gum

PostPosted: Wed Apr 09, 2008 2:33 pm    Post subject: Transparent brush Reply with quote

It's probably a noobie question but... how do you create transparent brushes in a map that will be loaded in Darkplaces?

Like:
http://www.quaddicted.com/quake_engines/engine_screenshots/enginereference_transparentbrush-(darkplaces).jpg

(sorry, for some reason I don't seem to be able to link to the full url)
_________________
http://www.planetcocot.net/
Back to top
View user's profile Send private message Send e-mail Visit poster's website
scar3crow
Inside3D Staff


Joined: 18 Jan 2005
Posts: 837
Location: Las Vegas, NV

PostPosted: Wed Apr 09, 2008 2:39 pm    Post subject: Reply with quote

Make it a brush entity and in a spare field declare an 'alpha' and a decimal value I'm guessing.
Back to top
View user's profile Send private message AIM Address
Spirit



Joined: 20 Nov 2004
Posts: 476

PostPosted: Wed Apr 09, 2008 2:54 pm    Post subject: Reply with quote

func_wall with "alpha" "0.x"

I included the source to my testmap in http://www.quaddicted.com/quake_engines/enginetest-spirit.zip btw. Wink
_________________
Quake Maps
Back to top
View user's profile Send private message Visit poster's website
CocoT



Joined: 14 Dec 2004
Posts: 599
Location: Belly-Gum

PostPosted: Wed Apr 09, 2008 3:35 pm    Post subject: Reply with quote

Oh, I see Smile
Thanks, guys! Wink
_________________
http://www.planetcocot.net/
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ajay



Joined: 29 Oct 2004
Posts: 295
Location: Swindon, UK

PostPosted: Mon Apr 14, 2008 3:50 pm    Post subject: Reply with quote

Can you do this with models in DP?
_________________
my site
Back to top
View user's profile Send private message MSN Messenger
scar3crow
Inside3D Staff


Joined: 18 Jan 2005
Posts: 837
Location: Las Vegas, NV

PostPosted: Mon Apr 14, 2008 9:02 pm    Post subject: Reply with quote

Should be able, same field. I think DP might also support scale for models?
Back to top
View user's profile Send private message AIM Address
MauveBib



Joined: 04 Nov 2004
Posts: 602

PostPosted: Mon Apr 14, 2008 10:26 pm    Post subject: Reply with quote

Yup, .alpha (0-1).

alpha 0 is forced to 1 of course, since otherwise everything would be invisible by default. -1 makes it invisible.
_________________
Apathy Now!
Back to top
View user's profile Send private message
ajay



Joined: 29 Oct 2004
Posts: 295
Location: Swindon, UK

PostPosted: Tue Apr 15, 2008 12:46 pm    Post subject: Reply with quote

So that would be using DP_ENT_ALPHA ??
Could this be done dynamically; changing it thru' gameplay events - a monster could turn gradually invisible as it gets low on health?
_________________
my site
Back to top
View user's profile Send private message MSN Messenger
MauveBib



Joined: 04 Nov 2004
Posts: 602

PostPosted: Tue Apr 15, 2008 12:49 pm    Post subject: Reply with quote

Yes.

for a monster that starts with 100 health, just stick something like this in its various thinking routines:

self.alpha = self.health / 100;

Easy as cake.
_________________
Apathy Now!
Back to top
View user's profile Send private message
scar3crow
Inside3D Staff


Joined: 18 Jan 2005
Posts: 837
Location: Las Vegas, NV

PostPosted: Tue Apr 15, 2008 12:58 pm    Post subject: Reply with quote

In any state change you could do self.alpha whatever. This could be done by frames (an idle monster phasing in and out using their breathing frames as the instigator of the change, or being ghostly and fading in when attacking or taking damage based on those frames). DPmod has a mode (I think its skill 5 in dmm7 but I'm not for sure) which has such ghostly monsters.

You can set an alpha to any individual entity in a map, so if you want that particular ogre to be harder to spot, give him an alpha field in the editor of 0.6

But a special class of ogre, or all ogres... then yeah, just insert changes via self.alpha into his code.

Granted, I've never done any of this before =)
Back to top
View user's profile Send private message AIM Address
scar3crow
Inside3D Staff


Joined: 18 Jan 2005
Posts: 837
Location: Las Vegas, NV

PostPosted: Tue Apr 15, 2008 12:58 pm    Post subject: Reply with quote

Dammit Mauve, I was on that like suck on a recent game - but then work got busy mid typing!
Back to top
View user's profile Send private message AIM Address
ajay



Joined: 29 Oct 2004
Posts: 295
Location: Swindon, UK

PostPosted: Tue Apr 15, 2008 12:58 pm    Post subject: Reply with quote

(Rubs hands in a Mr Burns style) "Excellent"

Cheers Smile
_________________
my site
Back to top
View user's profile Send private message MSN Messenger
ajay



Joined: 29 Oct 2004
Posts: 295
Location: Swindon, UK

PostPosted: Tue Apr 15, 2008 5:54 pm    Post subject: Reply with quote

Hey cool:


It's not always going to be an ogre, nor a bricky box room (indeed if I coudl find my last test map it would a loverly house - daman hdd dying) but it's a nice ghost effect.

Ta. Smile
_________________
my site
Back to top
View user's profile Send private message MSN Messenger
CocoT



Joined: 14 Dec 2004
Posts: 599
Location: Belly-Gum

PostPosted: Wed Apr 16, 2008 7:29 pm    Post subject: Reply with quote

Hehe... Smile
UQC uses transparency (among other things) in the "Invisible Man" mutator Smile
_________________
http://www.planetcocot.net/
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Stealth Kill



Joined: 29 Dec 2006
Posts: 83

PostPosted: Wed Apr 16, 2008 8:02 pm    Post subject: Reply with quote

If the engine supports transparent water, is it possible to make transparent walls?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Engine Programming All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group