Sharper looking textures (detail textures?)

Developer discussion of experimental fixes, changes, and improvements.

Moderators: Nexuiz Moderators, Moderators

Sat Jul 04, 2009 10:15 pm

  • ai wrote:I see you or someone else have used MapZone. :p

    Those look like TRaK's textures, which were done in PS.
    Taiyo.uk
    Alien trapper
     
    Posts: 436
    Joined: Mon Apr 17, 2006 8:48 pm
    Location: Reading, IN-GER-LUND!!!

Sun Jul 05, 2009 8:57 am

  • Well, the other problem is that it applies the same detail texture to all surfaces. This makes it look even worse, e.g. on the weapon models. And I see no way to fix that other than by really implementing secondary tcmods.
    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

Sun Jul 05, 2009 10:12 am

  • @ divVerent

    Wow you weren't joking. It seems that the only way to make a "detailed" textures option is if their were an overlay created for EVERY SINGLE TEXTURE IN THE GAME. That would definitely be time consuming, a bitch to code (I think, I'm no coder), and probably give everybody's PCs a swift kick in the ass on performance. Detailed texture options like that probably are only good in games that try to look insanely realistic and would without a doubt after seeing that screenie throw the art-style off.
    I have left this website with the rest of the GPL Nexuiz community. You can find us at Xonotic.org
    User avatar
    Lee_Stricklin
    Alien trapper
     
    Posts: 404
    Joined: Sat Jun 21, 2008 8:42 pm
    Location: Midwest

Sun Jul 05, 2009 11:28 am

  • The same detail texture on every surface doesn't make much sense to me either.

    I always thought individual detail textures can be applied to a surface by the mapper, not every surface gets the same detail texture, and only on surfaces where it makes sense, and where players can get close to. At least that's what I would want to do if I would map. :)

    It would be nice if the engine supported two different texture coordinate sets and could blend the two textures, so the mapper could have detail textures if wanted. Looking at this post from divVerent it seems this is planned anyway?

    I'm a long time Blender user, mostly rendering stills, but I'm fascinated by realtime 3D and it's visual possibilities, that's why this topic caught my interest. But I haven't yet learned much about Darkplaces' possibilities and it's supported Q3 shader options, or mapping in general, so I hope I don't talk nonsense.
    Sanne
    Newbie
     
    Posts: 5
    Joined: Mon Apr 13, 2009 8:17 pm

Sun Jul 05, 2009 11:39 am

  • I don't agree with detail textures being compiled into the .bsp, I think they are best as a dynamically rendered feature. However there should be a smart way to define detail textures to many textures via scripts, so one won't have to specify each single texture the detail applies to in shaders (that would be a very long list).

    My idea was defining detail textures via shaders but allowing a detail to be applied over an entire folder (every texture in that folder), in the form of "gfx/details/metaldetail1 { ... 'applies to' textures/evil1_metals textures/evil2_metals and-every-other-folder-containing-metal-textures }, but div said he disagrees with this idea.
    User avatar
    MirceaKitsune
    Keyboard killer
     
    Posts: 593
    Joined: Thu Aug 14, 2008 6:48 am
    Location: Romania - Bucharest

Sun Jul 05, 2009 4:07 pm

  • We don't have a free texture unit for global detail textures on many widespread GPUs - we'd have to use the one used for texture blending (or some other feature) anyway.

    Which is why I suggest doing detail textures as a case of texture blending.

    Also, they would NOT be compiled in the map! q3map2 does not do shader stage processing. Also, to be able to dynamically enable the second shader stage, one could have a shader keyword that makes the shader stage depend on whether a cvar is set or not.

    What I also want is pattern rules for shaders, so you can e.g. write:

    textures/foo/*
    {
    surfaceparm nonsolid
    }

    and it will make ALL textures in foo/ nonsolid. This can not work for all shader features, but for some, and if we are VERY lucky, this could be used to add a detail texture shader stage. Even if not, we could make an "autodetail" cvar that makes all one-stage shaders two-stage shaders with a detail texture.
    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

Sun Jul 05, 2009 4:19 pm

  • Yes, there's no reason why specifying something to all textures in a folder shouldn't work for any shader property, so one can easily make the folder have the chosen properties in one line :)

    I'm wondering about something. Suppose one wants to specify the scaling, strength and / or distance of detail textures from cvars, could a shader use cvars for different values? eg: textures\evil1_metals\* { tcBlend gfx/detail/metaldetail1 , tcBlend intensity cvar("cl_detailtexture_intensity"), tcBlent distance cvar("cl_detailtexture_distance"), etc.

    Of course a possibility for any shader property, if anyone would want to make a shader value be a given cvar. For instance with such a feature, one could locally colorize a logo on a wall to each user's HUD color :D
    User avatar
    MirceaKitsune
    Keyboard killer
     
    Posts: 593
    Joined: Thu Aug 14, 2008 6:48 am
    Location: Romania - Bucharest

Sun Jul 05, 2009 4:28 pm

  • There is no distance setting for detail textures in my screenshots. The distance fading is done how it should be - using mipmapping only.

    And there ARE good reasons why it can't be done per-directory right now, but that goes too far into engine details...
    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

Mon Jul 06, 2009 4:14 pm

  • detail textures (the way i know them) can already be done in dp, to some extent. what you do is use a large scale rough "colour map" for texture and a normal map with the fine detail.

    Image

    The cave here is we cant scale the normals and the colour map individually, so the gain of detail maps (to save memory) is more or less lost. If what your looking for is sharper textures, "all" you have to do is create higher res textures (and often scale them smaller in radiant).

    The way i would like to see, to overcome this is letting mappers specify normals and other extra maps in the shader script. Perhaps this would also free up more texture units as i imagine it would be up to the mapper to make sure it wont use more then available.
    Code: Select all
    textures/bla/blabla-v1
    {
       qer_editorimage textures/bla/blabla_qei

       q3map_shadeangle 120
       surfaceparm nomarks
       
       dp_normaldepth 4

       {
          map textures/bla/blabla_dark
       }

       {
          normalmap textures/bla/noisemap
          tcMod scale 0.1 0.1
       }
    }


    I don't know how (un)realistic it is to code a feature like this for dp, but personally i think it would help a good bit for getting nexuiz content to the next level.
    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

Mon Jul 06, 2009 4:45 pm

  • tZork wrote:detail textures (the way i know them) can already be done in dp, to some extent. what you do is use a large scale rough "colour map" for texture and a normal map with the fine detail.


    If I am understanding you and your visual examples correctly, the problem with this is that you also want large scale normal map detail and small scale diffuse and specular/gloss detail.

    So I think it still comes down to main normal/bump maps lossing opaqueness to detail normal/bump maps as the camera approaches the surface and the main color maps losing opaqueness to detail color maps as the camera approaches the surface.

    Or. . .

    We on the art side just have to make really high resolution detailed textures for the players with GPUs that can handle them (which will eventually be all of us, let's keep in mind), while project coders improve the game's graphics by instead tackling the archaic character model/animation limitations. :wink: :D
    Flying Steel
    Keyboard killer
     
    Posts: 623
    Joined: Fri May 08, 2009 9:13 pm

Mon Jul 06, 2009 5:00 pm

  • I guess i should have explained the example =)

    Top left is the normal map, right is the diffuse. Bottom left is diffuse+normals, right is diffuse only. The textures are 256x256 scaled at '2' in raidant (large, normally blurry). However, the normal map is not designed to enhance the diffuse like you usually do, but just a noise pattern rendered into a normal map, in a much smaller scale. This sort of creates the same effect as detail maps do. This approach is far from perfect, and the example made in a haste ;) but perhaps someone finds it useful.

    some useful reading on the subject:
    http://blogs.msdn.com/shawnhar/archive/ ... tures.aspx
    http://www.opengl.org/resources/code/sa ... ode88.html

    edit:
    oh gah, forgot to mention; this way also requires decent res light mapping and a fairly sharp angle of attack for the main light source.
    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

Tue Jul 07, 2009 11:27 am

  • Darkplaces SVN, rev 9042 wrote:Support a separate texture matrix for the background layer.

    Example shader stages using it:

    {
    map textures/savdm6ish/#lava1.jpg
    }
    {
    map textures/final_rage/lava.blend.tga
    tcMod rotate 50
    tcMod scale 2 2
    tcMod scroll 0.05 0.05
    alphaGen vertex
    blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
    }

    NOTE: you still have to specify alphaGen vertex, or DP will not use the
    secondary stage! To allow static mixing of two textures, the second texture
    currently must have its own alpha channel.

    Stuff also possible with this: detail textures...


    Since I am good with Photoshop but still unsure how to make good details at a big size, I was wondering if anyone knows any high quality GPL detail textures which could be used (best would be 1024 x 1024).

    A question - Does mipmapping still apply with this method, or the blending can have no distance limit? I think details might actually look good without a limit though that could rather be too much.

    This also makes another thing possible: UT2004-style masked reflections / env-maps when gloss isn't enough :D
    User avatar
    MirceaKitsune
    Keyboard killer
     
    Posts: 593
    Joined: Thu Aug 14, 2008 6:48 am
    Location: Romania - Bucharest

Tue Jul 07, 2009 2:58 pm

  • Great! :D
    Sanne
    Newbie
     
    Posts: 5
    Joined: Mon Apr 13, 2009 8:17 pm

Tue Jul 14, 2009 3:30 pm

  • MirceaKitsune wrote:This also makes another thing possible: UT2004-style masked reflections / env-maps when gloss isn't enough :D


    I wonder if someone could make q3map2 calculate the envmaps if specified in the shader, could make some cheap good looking reflections like that I think.
    User avatar
    FruitieX
    Keyboard killer
     
    Posts: 588
    Joined: Mon Nov 13, 2006 4:47 pm
    Location: Finland

Fri Jul 24, 2009 8:50 am

  • Done.

    ImageImageImage
    ImageImageImage
    User avatar
    FruitieX
    Keyboard killer
     
    Posts: 588
    Joined: Mon Nov 13, 2006 4:47 pm
    Location: Finland

Fri Jul 24, 2009 10:34 am

Fri Jul 24, 2009 11:03 am

  • FruitieX wrote:Done.
    Oh m.. thats... mm.. perdy *drooling*
    Last edited by paperclips on Fri Jul 24, 2009 2:36 pm, edited 1 time in total.
    [Want to develop? Look HERE]. Image Image Gif sauce.
    paperclips
    Alien trapper
     
    Posts: 346
    Joined: Mon Jan 12, 2009 10:27 am
    Location: internets

Fri Jul 24, 2009 1:19 pm

  • FruitieX wrote:Done.

    ImageImage


    :D Somebody get this into SVN!
    Flying Steel
    Keyboard killer
     
    Posts: 623
    Joined: Fri May 08, 2009 9:13 pm

Fri Jul 24, 2009 1:33 pm

  • Looking better FruitieX, are there any bump maps for these textures?
    User avatar
    [-z-]
    Site Admin and Nexuiz Ninja
     
    Posts: 1794
    Joined: Mon Nov 13, 2006 12:20 am
    Location: Florida

Fri Jul 24, 2009 7:53 pm

  • [-z-] wrote:Looking better FruitieX, are there any bump maps for these textures?

    Yup, through the alpha channel in the normalmaps. Almost all of them also have glossmaps.
    User avatar
    FruitieX
    Keyboard killer
     
    Posts: 588
    Joined: Mon Nov 13, 2006 4:47 pm
    Location: Finland

Tue Jul 28, 2009 4:52 pm

  • I believe more maps should be retextured with the new trak textures, and with the eX pack.
    User avatar
    MirceaKitsune
    Keyboard killer
     
    Posts: 593
    Joined: Thu Aug 14, 2008 6:48 am
    Location: Romania - Bucharest

Tue Jul 28, 2009 5:42 pm

  • MirceaKitsune wrote:I believe more maps should be retextured with the new trak textures, and with the eX pack.


    I'm working on stormkeep next, from the unfinished stormkeep v2 by tZork.
    User avatar
    FruitieX
    Keyboard killer
     
    Posts: 588
    Joined: Mon Nov 13, 2006 4:47 pm
    Location: Finland

Tue Jul 28, 2009 6:17 pm

  • FruitieX wrote:
    MirceaKitsune wrote:I believe more maps should be retextured with the new trak textures, and with the eX pack.


    I'm working on stormkeep next, from the unfinished stormkeep v2 by tZork.


    Awesome, can't wait to see this. Aggressor looks great.
    User avatar
    [-z-]
    Site Admin and Nexuiz Ninja
     
    Posts: 1794
    Joined: Mon Nov 13, 2006 12:20 am
    Location: Florida

Previous


Return to Nexuiz - Development




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