2-sided materials in Source?

Modelling, Textures, Animating and other general engine asset topics.

2-sided materials in Source?

Postby Wrangler249 on Fri Jul 15, 2011 9:11 pm

Hi there, I'm having a bit of a problem with a model I'm working on. In the following image you can see the cloth hanging over the side is see-through from the underside. Does anybody know how to make the material 2-sided? It appears 2-sided in 3ds Max but in the engine it looks as you can see:

Image

Thanks guys
Wrangler249
Member
Member
 
Joined: Fri Aug 29, 2008 6:50 pm

Re: 2-sided materials in Source?

Postby Surfa on Fri Jul 15, 2011 9:19 pm

$nocull 1

Put this in the .vmt
Surfa
May Contain Skills
May Contain Skills
 
Joined: Sun Dec 30, 2007 3:04 pm

Re: 2-sided materials in Source?

Postby Wrangler249 on Fri Jul 15, 2011 9:39 pm

Thanks :) works perfectly!
Wrangler249
Member
Member
 
Joined: Fri Aug 29, 2008 6:50 pm

Re: 2-sided materials in Source?

Postby kraid on Sat Jul 16, 2011 8:29 am

But keep in mind that the whole part of the model which is using this material will be rendered double sided.
Rather copy the few polygons which are visible from beyond, and invert their normals.
Goldeneye Source v4.2.3
get it now and play for FREE!!!
http://www.goldeneyesource.net
kraid
Been Here A While
Been Here A While
 
Joined: Thu Jan 22, 2009 12:09 pm

Re: 2-sided materials in Source?

Postby Wrangler249 on Sat Jul 16, 2011 10:56 am

Thanks, I'll do that wherever I can :)
Wrangler249
Member
Member
 
Joined: Fri Aug 29, 2008 6:50 pm

Re: 2-sided materials in Source?

Postby Gary on Sat Jul 16, 2011 10:51 pm

kraid wrote:But keep in mind that the whole part of the model which is using this material will be rendered double sided.
Rather copy the few polygons which are visible from beyond, and invert their normals.


Which one is more expensive.
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: 2-sided materials in Source?

Postby Gambini on Sat Jul 16, 2011 11:13 pm

Expensive or not, duplicating the polygons and inverting their normals is a better option because the backfaces are going to be lit according to their postion in the wolrd. While as nocull materials are lit only from the "real" face which gives unrealistic results.
User avatar
Gambini
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Mon Oct 20, 2008 1:52 am
Location: Buenos Aires, Argentina.

Re: 2-sided materials in Source?

Postby Gary on Sat Jul 16, 2011 11:23 pm

Oh, I see. I never messed with such things and didn't realize.
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: 2-sided materials in Source?

Postby Smurftyours on Sun Jul 17, 2011 12:35 am

What if you clone the mesh with all faces inverted, won't that cause texture clipping problems?
jangalomph wrote:Wise words from a wise man. ^
User avatar
Smurftyours
Senior Member
Senior Member
 
Joined: Tue Aug 04, 2009 6:11 pm
Location: California, US.

Re: 2-sided materials in Source?

Postby Gradius on Sun Jul 17, 2011 1:08 am

What would they clip with? Backface culling would ensure that there'd be nothing rendered for the texture to clip with.
User avatar
Gradius
1337 p0st3r
1337 p0st3r
 
Joined: Thu Aug 27, 2009 2:52 pm

Re: 2-sided materials in Source?

Postby kraid on Sun Jul 17, 2011 11:15 am

In general duplicating and inverting the normals is the better way to go.
One reason was allready mentioned by gambini.
Performance wise it depends on the model.
If all faces have to be duplicated there should be no difference for both methods, except of the time you're saving with $nocull.
Even better if your model is Unlit.
But as soon as you need to duplicate less faces, culling will save on performance.
Goldeneye Source v4.2.3
get it now and play for FREE!!!
http://www.goldeneyesource.net
kraid
Been Here A While
Been Here A While
 
Joined: Thu Jan 22, 2009 12:09 pm

Return to Art Creation

Who is online

Users browsing this forum: No registered users