Quake3World.com Forums
     Level Editing & Modeling
        Q3 - Smoother shading on edges?


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: Q3 - Smoother shading on edges?

Extreme evil
Extreme evil
Joined: 02 Mar 2002
Posts: 1637
PostPosted: 12-01-2006 03:48 AM           Profile Send private message  E-mail  Edit post Reply with quote


Is there a way to get smoothershading on edges in Q3, like when you use smoothgroups in 3DStudioMax or Hammer? Here's a screenshot of what I'm talking about.

Image

I would like the lighting to be more smooth on angles in world geometry. Can you maybe write a shader to smooth it out?




Top
                 

The Afflicted
The Afflicted
Joined: 27 Mar 2002
Posts: 793
PostPosted: 12-01-2006 05:03 AM           Profile Send private message  E-mail  Edit post Reply with quote


Add these to the main body of a shader:

q3map_nonplanar
q3map_shadeAngle 120

120 is the cut off angle for smoothing between faces. 120 should be enough for that model, but if your still getting harsh shading you can try raising it.




Top
                 

Immortal
Immortal
Joined: 12 Mar 2005
Posts: 2205
PostPosted: 12-01-2006 06:21 AM           Profile   Send private message  E-mail  Edit post Reply with quote


That's news to me.
Good to know!
:icon14: :icon14:




Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12498
PostPosted: 12-01-2006 07:00 AM           Profile Send private message  E-mail  Edit post Reply with quote


Is that a model? You should be able to just use smoothing groups in MAX or whatever modeling program you use and it'll work in Q3.



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

Extreme evil
Extreme evil
Joined: 02 Mar 2002
Posts: 1637
PostPosted: 12-01-2006 02:22 PM           Profile Send private message  E-mail  Edit post Reply with quote


It's an .ase model, generated from a .map file with q3map2. Seems shaders don't work with .ase models, all I get is a fullbright model.




Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12498
PostPosted: 12-02-2006 07:17 AM           Profile Send private message  E-mail  Edit post Reply with quote


Shaders will work with ASE models. See the archives sticky link here:
http://www.quake3world.com/ubb/Archives ... 26044.html?

But like I said above, you shouldn't need a shader if all you want to do is get smoothing to work between vertex lit models.

shadeAngle will only work with lightmapped geometry anyway, and for something small like this, you probably don't want it lightmapped.



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

Extreme evil
Extreme evil
Joined: 02 Mar 2002
Posts: 1637
PostPosted: 12-03-2006 11:32 PM           Profile Send private message  E-mail  Edit post Reply with quote


obsidian wrote:
Shaders will work with ASE models. See the archives sticky link here:
http://www.quake3world.com/ubb/Archives ... 26044.html?

But like I said above, you shouldn't need a shader if all you want to do is get smoothing to work between vertex lit models.

shadeAngle will only work with lightmapped geometry anyway, and for something small like this, you probably don't want it lightmapped.


Is there a way to make geometry or .ase models vertex lit instead of lightmapped?




Top
                 

Grunt
Grunt
Joined: 12 Aug 2005
Posts: 61
PostPosted: 12-04-2006 01:20 AM           Profile Send private message  E-mail  Edit post Reply with quote


Models will be vertex lit by default. You lightmap them by compiling with -meta and adding the keyval "spawnflags n" (n=2, lightmapped; n=6, lightmapped and autoclipped) to your model entity.




Top
                 

Extreme evil
Extreme evil
Joined: 02 Mar 2002
Posts: 1637
PostPosted: 12-04-2006 02:18 AM           Profile Send private message  E-mail  Edit post Reply with quote


Black_Dog wrote:
Models will be vertex lit by default. You lightmap them by compiling with -meta and adding the keyval "spawnflags n" (n=2, lightmapped; n=6, lightmapped and autoclipped) to your model entity.


When I compiled without any shader and just textures, my .ase models were all fullbright. I then added in the shader that it should be compiled with -meta, and now it's lightmapped. Are you sure .ase models are vertex lit by default? Because they weren't lit at all for me. Maybe I did something wrong.




Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12498
PostPosted: 12-04-2006 08:12 AM           Profile Send private message  E-mail  Edit post Reply with quote


Yes, models are always vertex lit by default. Generally speaking, small models with relatively large number of polygons should not be lightmapped. Vertex lighting in these cases will actually look better and reduce memory usage.



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

Extreme evil
Extreme evil
Joined: 02 Mar 2002
Posts: 1637
PostPosted: 12-04-2006 09:10 AM           Profile Send private message  E-mail  Edit post Reply with quote


obsidian wrote:
Yes, models are always vertex lit by default. Generally speaking, small models with relatively large number of polygons should not be lightmapped. Vertex lighting in these cases will actually look better and reduce memory usage.


Well, as I said mine were fullbright by default. Either you are wrong or I am doing something wrong. I have a feeling of the latter.




Top
                 

Extreme evil
Extreme evil
Joined: 02 Mar 2002
Posts: 1637
PostPosted: 12-04-2006 10:01 AM           Profile Send private message  E-mail  Edit post Reply with quote


Hmm, now when I deleted the shader I can't recreate what I first got with the fullbright models. Now they are lightmapped even though I deleted the shader file. Strange.




Top
                 

Etile
Etile
Joined: 19 Nov 2003
Posts: 34899
PostPosted: 12-04-2006 10:23 AM           Profile Send private message  E-mail  Edit post Reply with quote


why don't you just use gmax with the md3 export pipeline? that way you can have all the smoothing you want




Top
                 

Veteran
Veteran
Joined: 09 Feb 2005
Posts: 167
PostPosted: 12-04-2006 04:18 PM           Profile Send private message  E-mail  Edit post Reply with quote


Really, you should always import exported .ase models into a model program and clean them up before using them as a mapobject. Q3map2's .ase conversion is damned useful but it's an automatic process, so there is only so much it can do - .ase's straight out of it will have way more submeshes and verts than they need too. And of course no smoothing, as you've discovered. Human intervention will give a much better end result.




Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12498
PostPosted: 12-05-2006 07:42 AM           Profile Send private message  E-mail  Edit post Reply with quote


ALMighty wrote:
Hmm, now when I deleted the shader I can't recreate what I first got with the fullbright models. Now they are lightmapped even though I deleted the shader file. Strange.


If the model was lightmapped, you will need to recompile to see the changes. Lightmaps are stored in the BSP.



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

Extreme evil
Extreme evil
Joined: 02 Mar 2002
Posts: 1637
PostPosted: 12-05-2006 08:36 AM           Profile Send private message  E-mail  Edit post Reply with quote


obsidian wrote:
ALMighty wrote:
Hmm, now when I deleted the shader I can't recreate what I first got with the fullbright models. Now they are lightmapped even though I deleted the shader file. Strange.


If the model was lightmapped, you will need to recompile to see the changes. Lightmaps are stored in the BSP.


Yeah, I did that. Duh. :p

The thing is, I want everything to look consistent so that's why I've resisted using md3's. I have tried having one of those already, and I didn't like how it looked, it looked like it didn't fit in somehow. I should try doing that again though, because it was some time ago and I think I didn't render the texture right that time.

Thanks everyone for the help.




Top
                 
Quake3World.com | Forum Index | Level Editing & Modeling


Post new topic Reply to topic


cron
Quake3World.com
© ZeniMax. Zenimax, QUAKE III ARENA, Id Software and associated trademarks are trademarks of the ZeniMax group of companies. All rights reserved.
This is an unofficial fan website without any affiliation with or endorsement by ZeniMax.
All views and opinions expressed are those of the author.