No phong shading for .ase models?

Post anything to do with editing Nexuiz here. Whether its problems you've had, questions, or if you just want to show off your work.

Moderators: Nexuiz Moderators, Moderators

No phong shading for .ase models?

Postby Clueless Newbie » Sat Oct 25, 2008 7:25 pm

I couldn't figure out why the phong shading wouldn't "take" on my boulder models, so I hacked up a brush for comparison. Here is the result:
The .ase model:
Image
The brush: (no, it's not touching the ground)
Image

It's pretty obvious which has phong and which does not. Is there a way to convince the light renderer that the models are supposed to have phong shading?

Oh, and here's a screenie of the map I'm working on:
Image
The only really big "to do" left now is the skybox. And fixing all the bugs I'm bound to find real soon.. ;)
2 GHz Mac Pro
Mac OS X 10.6.2
nvidia GeForce 8800 GT
Clueless Newbie
Keyboard killer
 
Posts: 518
Joined: Wed Jan 03, 2007 1:01 pm

Postby divVerent » Sat Oct 25, 2008 8:37 pm

For models, you need to do the phong shading (also known as smoothing of the normals) in your modeling app.
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby TVR » Sat Oct 25, 2008 9:40 pm

Per-luxel lighting requires visibility data, it is not performed on models, only structural brushes.
TVR
Alien trapper
 
Posts: 404
Joined: Fri Jun 01, 2007 12:56 am

Postby Clueless Newbie » Sat Oct 25, 2008 9:45 pm

divVerent wrote:For models, you need to do the phong shading (also known as smoothing of the normals) in your modeling app.

That would be GTKRadiant. How do I do that? A full BSP, VIS, and LIGHT compile of the model?
2 GHz Mac Pro
Mac OS X 10.6.2
nvidia GeForce 8800 GT
Clueless Newbie
Keyboard killer
 
Posts: 518
Joined: Wed Jan 03, 2007 1:01 pm

Postby SavageX » Sat Oct 25, 2008 9:52 pm

modeling app = (in this context) where you created your .ase model.
SavageX
Site Admin
 
Posts: 442
Joined: Wed Mar 01, 2006 9:34 am

Postby torus » Sat Oct 25, 2008 10:39 pm

SavageX: Are you saying that if smoothing is enabled in the modeling app, it will appear in-game? Or that we need to bake the shading into the texture with the modeling app?
Image
torus
Forum addon
 
Posts: 1341
Joined: Sun Dec 24, 2006 6:59 am
Location: USA

Postby tZork » Sun Oct 26, 2008 10:12 am

Code: Select all
textures/where_your/rockshader_texture_is
{   
    q3map_nonplanar
    q3map_shadeangle 40

// Remove next two lines if you dont want the model to be solid.
    q3map_clipmodel 
    q3map_forcemeta

    {
        map $lightmap
        rgbGen identity
    }

    {
         map textures/where_your/rock_texture_is
        blendFunc filter
    }

}


Set q3map_shadeangle to the maximum angle you want smoothed. save as scripts/yourmapname.shader, add to scripts/shaderlist.txt

compile and enjoy :P

tbh i think the non smoothed rocks looks more rocky :O
HOF:
<Diablo> the nex is a "game modification"
<Diablo> quake1 never had a weapon like that.
<Vordreller> there was no need for anything over 4GB untill Vista came along
<Samua>]Idea: Fix it? :D
<Samua>Lies, that only applies to other people.
tZork
tZite Admin
 
Posts: 1337
Joined: Tue Feb 28, 2006 6:16 pm
Location: Halfway to somwhere else

Postby SavageX » Sun Oct 26, 2008 10:32 am

torus wrote:SavageX: Are you saying that if smoothing is enabled in the modeling app, it will appear in-game? Or that we need to bake the shading into the texture with the modeling app?


The former, I guess. The modeling app has to write smooth normals, q3map2 apparently will only smooth normals for brush geometry.
SavageX
Site Admin
 
Posts: 442
Joined: Wed Mar 01, 2006 9:34 am

Postby Clueless Newbie » Sun Oct 26, 2008 5:55 pm

tZork wrote:
Code: Select all


Set q3map_shadeangle to the maximum angle you want smoothed. save as scripts/yourmapname.shader, add to scripts/shaderlist.txt

compile and enjoy :P

I tried that, but it didn't work with the models. Maybe I did something wrong.
tbh i think the non smoothed rocks looks more rocky :O

I set the phong to 120 just to make sure the difference was really obvious. I think maybe 90 would be a better value. 8)
2 GHz Mac Pro
Mac OS X 10.6.2
nvidia GeForce 8800 GT
Clueless Newbie
Keyboard killer
 
Posts: 518
Joined: Wed Jan 03, 2007 1:01 pm

Postby torus » Sun Oct 26, 2008 6:02 pm

Did you try what SavageX said, with smoothnormals in the modeling app?
Image
torus
Forum addon
 
Posts: 1341
Joined: Sun Dec 24, 2006 6:59 am
Location: USA

Next

Return to Nexuiz - Editing

Who is online

Users browsing this forum: No registered users and 1 guest

cron