project-navigation
Personal tools

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - arisian

Pages: 1 2 [3] 4 5 ... 7
31
Artwork / Re: New Feature: "Glow" textures
« on: April 19, 2010, 05:15:34 pm »
Okay, glow-map intensity can now be scaled in materials.  The parameter "glowscale" is what you want to set; it will be multiplied, so 1.0 is the default.  0.5 will mean half intensity, and so forth.  The glowscale parameter can be applied either at the material level or at the stage level; if it appears in both, they will be multiplied to get the value used for a given stage.  As an example, in the following material, the texture "grass_gm" will be multiplied by 0.1 (since 0.5 * 0.2 = 0.1) when it is being rendered to the glow-buffer.  Note that this only works for materials; this won't let you scale the glow on models or surfaces, for example.

{
   material tex_nature/grass001
   hardness 0.2
   specular 0.2
   glowscale 0.5
   {
      texture tex_nature/grass
      dirtmap 1.0
      lightmap
      glowscale 0.2
   }
}

32
Artwork / Re: New Feature: "Glow" textures
« on: April 19, 2010, 03:11:06 pm »
Wow, glad to see all the interest here!

I'll try to answer the questions I've spotted:

1.) None of the real-time glow stuff will ever work without GLSL.  There's just no way to implement those features without using shader programs (in particular, for the postprocessing step itself).  The only thing you can do without shaders is make sprite-style "glow," by slapping a transparent texture with pre-rendered glow effects on top of an object (this is the way the halos around lights are done now, as I recall).

2.) Having a parameter that lets you control intensity in the material shouldn't be too difficult; "pulse" animations already adjust intensity on the fly, and it shouldn't be too hard to add a parameter to control the "base" intensity to the .mat file.  By the way, the "pulse" effect should already allow glow to fluctuate over time.  The stretch, rotate, and scroll effects should work with glow-maps, too.

3.) There's no reason glow couldn't be applied to the particles.  Essentially, if you want something to glow, you just need to make sure the "glow" part gets rendered to the glow buffer, and everything else is taken care of by the existing post-processing code.  I know nothing about the particle system, so we'd have to figure out how glow should be specified there.

3.) The glow "radius" is something which can be adjusted in the code, but not on the fly (at least, not at the moment).  Reducing the intensity will reduce the effective distance that it spreads, though.  In terms of what the glow radius is, there's a tradeoff between performance, quality, and size.  You can adjust any one of those three parameters, but doing so will affect the other two.  For example, right now there's a sort of "sparkle" effect to the glow when you move the camera, particularly if you have small, bright spots of glow.  This is essentially an aliasing artifact; it's easy to reduce, but doing so would either decrease the glow radius, or increase the computational cost of doing the postprocessing.  If you want to play around, look at the DOWNSAMPLE_PASSES and DOWNSAMPLE_SCALE macros in r_state.h, as well as the FILTER_SIZE macro in r_program.c

4.) I'm disinclined to decouple glow-maps from normal textures too much, so I don't want to have one-to-many mappings (ie. one "normal" texture with several "glow" textures for animation frames).  However, I think it should be possible to add a material parameter that would cause the "standard" textures to be rendered to the glow-buffer.  This would let you have only the textures you needed for your animation frames, if I understand what you're asking for.  

5.) Mattn, I've got no idea what's going on for you; let me know if you figure anything out, or want help.

If I've missed any other questions, I appolagize; there were a lot of them :)

33
Artwork / Re: New Feature: "Glow" textures
« on: April 19, 2010, 04:59:51 am »
At least some of the transformations should now work; I briefly tested rotation, scrolling, and pulsing, and they seemed to do more or less what was expected.  I'm going to bed now; I'll work on it some more another day.

34
Artwork / Re: New Feature: "Glow" textures
« on: April 19, 2010, 03:56:57 am »
Okay, I think that the frame-based animations should work with glow now.  Each frame of the animation can have its own glow-map, which will be applied when that texture is used (based on the animation sequence/timing parameters).  Transform-based animations (eg. rotate, pulse, stretch, etc.) aren't implemented yet.  I haven't done extensive testing, though, so let me know if you run into issues.

35
Artwork / Re: New Feature: "Glow" textures
« on: April 19, 2010, 01:19:40 am »
I'll work on trying to integrate the glow-maps better with the matterial/animation system, though it may take me a bit to get around to it.  I'm not familiar with the animation system or how it works, so I'll have to learn how it works before I can effectively modify it.

36
Artwork / Re: New Feature: "Glow" textures
« on: April 18, 2010, 11:02:39 pm »
At the moment, this isn't really integrated with the material system; glow-maps are associated with textures, not materials.  Being able to specify more detailed things about glow in the material system would probably be useful, but I haven't done that yet.

The material system docs should probably be updated, as should the modeling docs.  Also, most of the code I've added has some comments, but could use more, and in general would probably benefit from some cleaning and/or refactoring in places, both for clarity and for optimization.  I wouldn't call any of it "production-ready" code at this point, but it should be enough to let people start figuring out what they can do with it, and what needs to be changed/added so the system accomodates their needs better.  If you want to document things, be my guest ;)  otherwise, I'm inclined to wait until I'm more confident that the code has stabilized before doing lots of documentation.

Artists, modelers, and mappers; if you'd like to be able to do something related to post-processing and can't figure out how, let me know and I'll see how difficult it would be to add.  I welcome feedback about what you do/don't like about the new system; now is the time to comment, while it's still new and flexible.

37
Artwork / Re: New Feature: "Glow" textures
« on: April 18, 2010, 10:20:43 pm »
Okay, glowmap textures should now be used for materials and surfaces as well as meshes.  Screenshot attached; note the glow from the top rack of magazines, and the glowing spot on the grass texture.  Note that I have not added these two glow textures to the SVN, as they are not at all useful or appropriate; they were just a proof of concept.  I'll attach them to this post, along with a screenshot, in case anyone is interested.  Now it's up to the artists to start making glowmaps (and everyone else to beta-test and report bugs in the new features) :)

38
Artwork / Re: New Feature: "Glow" textures
« on: April 18, 2010, 09:18:41 pm »
Um...wow.  How on earth did you get that?  It's actually kind of pretty...I've got no idea how that "rainbow" effect is happening.  Is it constant, or do the colors change?  Are you getting anything in the log?  And are all the shaders up to date?

39
Artwork / Re: New Feature: "Glow" textures
« on: April 18, 2010, 08:34:59 pm »
It doesn't look like your copy of mesh_fs.glsl is the latest version.  Have you made any modifications of your own to that file?  If not, try deleting it and then doing an "svn update" to make sure you've got the latest version.

40
Artwork / Re: New Feature: "Glow" textures
« on: April 18, 2010, 08:29:26 pm »
MCR, could you attach the file "base/shaders/mesh_fs.glsl" that you have right now?

41
Artwork / Re: New Feature: "Glow" textures
« on: April 18, 2010, 08:16:13 pm »
MCR, are you getting any abnormal output in the log?  It works fine for me, but I only have one system to test on.  Have you tried doing `make clean` and then re-building everything?

Oh, also, I've just noticed that using the IR goggles seems to de-activate the mesh-glow, though the mesh-glow resumes as soon as the IR-goggle effect stops.  I'll look into why, but it shouldn't be a show-stopper in any case. Should be fixed now.

42
Artwork / Re: New Feature: "Glow" textures
« on: April 18, 2010, 06:50:43 pm »
Okay, I've got a basic proof-of-concept for glowing textures associated with meshes.  SVN r29460 contains the new code, along with a new image, base/models/weapons/plasrifle/plasrifle_gm.png.  The texture I've included was made very simply; I just copied the standard texture, did a color-select on the blue parts, and painted everything else black.  I also reduced the intensity somewhat.  I'm sure that our artists can do better than this, but my goal was just to demonstrate what was possible, and how easy it should be for the artists.  All you need to do is have a glowmap texture associated with any standard mesh texture.  If the mesh is called <modelname>.jpg, you just need an image called <modelname>_gm.jpg (or .png or whatever) in the same directory.  It will automatically be loaded and interpreted as a glowmap, in much the same way that a normalmap would work.  Currently, glow-maps will only get renderd when they're associated with meshes, but it should be fairly straightforward to extend the system to other types of surfaces as well.

Again, adding a glow texture doesn't require any changes to code, or the model, or anything; just drop an image with  "_gm" at the end of the object's name ("gm" for "glowmap"; we can change the abberiation if people don't like "gm"), and everything else should be handled automatically.

43
If you disable GLSL, it automatically disables postprocessing (which is what does the glow), since it depends on GLSL.  Re-enabling GLSL doesn't automatically re-enable postprocessing; you have to re-select the "postprocessing" checkbox in the graphics menu as well (it's all the way at the bottom) before you'll get the glow effects again.  The thing with the black models in the battlescape is unrelated to the new features I've added, so far as I know, and I'm not sure what's causing it, as I can't replicate it (it seems to only be happening to a couple of people).  I'll try to figure out what's going on, but it's not my top priority.  If someone who's actually seeing the problem wants to take a crack at it (or whoever wrote the code in the first place), that would be great ;)

44
Bugs prior to release 2.3 / Re: Geoscape is transparent
« on: April 18, 2010, 02:11:34 am »
Overlays should be fixed again (both with and without GLSL/postprocessing).  If there are other issues with the geoscape rendering, please post to the bugtracker with logs (and screenshots if applicable), as I'm much more likely to notice bug reports there.

45
Coding / Re: mouse control of battlescape camera rotation
« on: April 16, 2010, 11:52:57 pm »
A good idea; I'll try to make it a standard "bindable" keysym.  Any thoughts on the default?  CTRL and SHIFT are in use, but ALT isn't bound in the default config, so far as I know...

Pages: 1 2 [3] 4 5 ... 7