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

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

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.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

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

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

Sat Oct 25, 2008 9:52 pm

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

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
    User avatar
    torus
    Forum addon
     
    Posts: 1341
    Joined: Sun Dec 24, 2006 6:59 am
    Location: USA

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.
    User avatar
    tZork
    tZite Admin
     
    Posts: 1337
    Joined: Tue Feb 28, 2006 6:16 pm
    Location: Halfway to somwhere else

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.
    User avatar
    SavageX
    Site Admin
     
    Posts: 442
    Joined: Wed Mar 01, 2006 9:34 am

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

Sun Oct 26, 2008 6:02 pm

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

Sun Oct 26, 2008 6:07 pm

  • SavageX wrote:
    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.

    I've figured it out. To use Phong with models, you need to run both BSP and LIGHT on them. VIS doesn't work. Not sure what tags you need to turn on in the LIGHT phase though. I used -deluxe, -fast and -shading, but it might not be necessary to use any at all. Dunno yet.
    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



Return to Nexuiz - Editing




Information
  • Who is online
  • Users browsing this forum: No registered users and 1 guest