Plastic surface?

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
Chretien
Posts: 68
Joined: Mon Dec 07, 2009 12:14 am

Plastic surface?

Post by Chretien »

Hello!

I'm designing a jump pad at the moment and I want to create a surface that got a plastic feel to it, something like the macbook. Could anyone give me a hint on as where to look in the shader manual? Or even better, post a script? Would be appreciated.

I will upload the jump pad source file as soon as it's finished so anyone can use it. :q3:

By the way, a tip: google "Dropbox".

Image
User avatar
seremtan
Posts: 36013
Joined: Wed Nov 19, 2003 8:00 am

Re: Plastic surface?

Post by seremtan »

Chretien wrote:like the macbook
so a jump pad that looks ultra-cool but only a few players can bounce on it? :p

you could try using the shiny metal shader from the vanilla game, with a paler base texture..?
sumatra
Posts: 325
Joined: Sat Feb 12, 2005 10:02 pm

Re: Plastic surface?

Post by sumatra »

Take this shader, edit it and use a different environment texture. Something more simple.
The base texture should be a basic light grey surface with little structure.

This should do the job quite well..

Code: Select all

textures/base_trim/pewter_shiney
{   
 
        {
                map textures/effects/tinfx.tga       
                tcGen environment
                rgbGen identity
	}   
        {
		map textures/base_trim/pewter_shiney.tga
                blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		rgbGen identity
	} 
        {
		map $lightmap
                blendFunc GL_DST_COLOR GL_ONE_MINUS_DST_ALPHA
		rgbGen identity
	}
}
EDIT: Too slow. :eek:
Last edited by AEon on Tue Jan 26, 2010 1:45 am, edited 1 time in total.
Reason: Put shader in [code] block.
[url=http://www.pukkadesign.com][color=#41c0eb]..::pukkadesign.com[/color][/url]
Pat Howard
Posts: 494
Joined: Tue Mar 31, 2009 11:14 am

Re: Plastic surface?

Post by Pat Howard »

seremtan wrote:
Chretien wrote:like the macbook
so a jump pad that looks ultra-cool but only a few players can bounce on it? :p
zing!

--

Sumatra, you didn't mention that the base texture needs an alpha to work with this shader. That tricked me for a while :). Is it like this with all env. maps?
fKd
Posts: 2478
Joined: Sat Jun 03, 2006 2:54 am
Location: Wellington
Contact:

Re: Plastic surface?

Post by fKd »

if you manage to make this texture look cool, can you post it? i need a nice white plastic texture. cheers :D
jal_
Posts: 223
Joined: Mon Mar 24, 2008 4:13 pm

Re: Plastic surface?

Post by jal_ »

Those materials (like the plastics used in Portal, right?) are very hard to do semi-right in the Q3 engine. :/
sumatra
Posts: 325
Joined: Sat Feb 12, 2005 10:02 pm

Re: Plastic surface?

Post by sumatra »

Ye, it doesn't work really well. But I tried to come near such an effect.
Maybe you try this, needs some finetuning though:

http://rapidshare.com/files/341996389/plastic.pk3.html

Image

Problem is the lighting of such surfaces. This must be done well thought.
Otherwise you get grey surfaces which are too shiny, or you get white surface while losing the shiny effect.

Here the script:

Code: Select all

textures/plastic/plastic
{   

        {
		map textures/plastic/fx.tga       
		tcGen environment
		rgbGen identity
	}   
        {
		map textures/plastic/plastic.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		rgbGen identity
	}
	{

		map $lightmap
		blendFunc GL_DST_COLOR GL_ONE_MINUS_DST_ALPHA
		rgbGen identity
	}
	{
		map textures/plastic/plastic.tga
		rgbGen wave noise .2 0 0 0
		blendfunc GL_ONE GL_ONE
	}
}
I tried to balance the grey to a brighter tone (almost white) with the blendfunc GL_ONE GL_ONE at the end.

Maybe that helps someone.
Cheers sum

P.S. Yes Pat, sorry, missed that :-P
[url=http://www.pukkadesign.com][color=#41c0eb]..::pukkadesign.com[/color][/url]
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Plastic surface?

Post by obsidian »

If it's glossy throughout, wouldn't you want the environment map rendered after the base layer?

Nice and simple:

Code: Select all

textures/obs_test/ifrag
{
	{
		map $whiteimage 
		rgbGen const ( 0.875 0.875 0.875 )
	}
	{
		map textures/effects/envmapdim.tga
		blendfunc add
		tcGen environment 
	}
	{
		map $lightmap 
		blendfunc filter
		tcGen lightmap 
	}
}
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
Pat Howard
Posts: 494
Joined: Tue Mar 31, 2009 11:14 am

Re: Plastic surface?

Post by Pat Howard »

Sumatra,

Looks cool, but Rapidshare won't let me download it. (Servers are too backed up for free users or some shite :disgust:.) Could you host it somewhere else for download?

Coincidentally I've also been trying to create a good plastic env. map. I've been getting the best results by simply putting some very small intense white hot spots on a black background and then adding a faint plastic wrap filter for a tiny bit of gloss. I'm just using the shiny pewter shader for now. Looks best on curvy surfaces. Here's a shot of mine on a weird pillar thing:

Image
cityy
Posts: 1020
Joined: Mon Aug 10, 2009 8:23 am

Re: Plastic surface?

Post by cityy »

I would love to see a map with this sheme. Looks pretty nice Pat.
www.ferdinandlist.de/leveldesign
fKd
Posts: 2478
Joined: Sat Jun 03, 2006 2:54 am
Location: Wellington
Contact:

Re: Plastic surface?

Post by fKd »

hahahahahaha very good pat, very good indeed!

and cityy, heh you are in for a surprise!
Pat Howard
Posts: 494
Joined: Tue Mar 31, 2009 11:14 am

Re: Plastic surface?

Post by Pat Howard »

The only problem is it's so hard to light well. Either looks way too light or way too dark. Flat colors do that I guess. Perhaps someone could take a look at my blendfuncs? (I know, I know, I need to read the shader manual again.)

@Obs, your shader was good, but even brighter than mine. Also, you don't need all that gloss on a plastic.
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Plastic surface?

Post by obsidian »

Adjust the first 2 stages with rgbGen const as needed. I just wrote that off the top of my head so I don't know how it actually looks in game. It's also using a default Q3 texture, no doubt you can make your own texture better.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
Pat Howard
Posts: 494
Joined: Tue Mar 31, 2009 11:14 am

Re: Plastic surface?

Post by Pat Howard »

Hey, that helped a lot! Thanks obsidian. Here's the link to my shader if anyone's interested: http://www.divshare.com/direct/10303483-4de.zip
Chretien
Posts: 68
Joined: Mon Dec 07, 2009 12:14 am

Re: Plastic surface?

Post by Chretien »

Thanks everyone for sharing! :D
Post Reply