FOnline Development > 3D Development

Shaders and effects

<< < (2/16) > >>

Johnnybravo:

--- Quote --- does it use up processing power to calculate the specular stuff without a texture 2 layer
--- End quote ---
AFAIK "if(statement)" is not that costy on GPU, so it should be fine, but as I said, it'd probably make sense to just make it without this, to avoid some confusion and perhaps little FPS gain.


--- Quote ---1) Default effect for all 3D models. Uses diffuse map (layer 0) and normal map (layer 1). Uses the improved lighting and shadow settings you've developed.

--- End quote ---
Normal map would not work for default because you need to specify game to calculate tangent space for given model. If you load just normal map effect by for example renaming files, you will get nasty artifacts instead of base lighting as one would expect.
But making default effect using per-pixel lighting calculation would probably work.

I cannot tell what is the best but should be easy to try different stuff. people might sound like overkill for small undetailed models - but also keep in mind they are still small so you have not much pixels to calculate anyway.

Well to be honest, best would be just to have 2 effects for 3D

Default and NormalMapped, where default will have techniques for vertex and per-pixel lighting (with specularity based on data from fo3d) and normal map would just add one technique ( because vertex lighting does not make any sense in this case :d).
Every other effect would be fancy stuff (glass, stealthboy,... whatever you can think of and might use in Fallout, like fancy glowing ghouls hehe :d).
But this will require some additions to game engine so script interface might ineract with techniques.

Normal maps for every model is not good idea because even such small objects will probably require about 512x512 to look good (compression decreases quality rapidly, and filtering is important factor as well).

Oh and in case people are interested in "pixelization", that would be better to have models rendered to texture and use that one as sprite, because artificialy adding it per fragment basis might not look that right.

Surf:

--- Quote from: Johnnybravo on August 25, 2011, 09:47:49 pm ---
Oh and in case people are interested in "pixelization", that would be better to have models rendered to texture and use that one as sprite, because artificialy adding it per fragment basis might not look that right.

--- End quote ---

What do you mean with that?

Johnnybravo:
It's simplier to have engine do it :d.
Since 2000s graphics hardware can just render directly into texture (think like dynamicly creating sprites), so you setup scene for your model, render it to texture in original dimensions ( I have no idea how big fallout sprites are, but you guys should know ), and then just resize it to fit game screen. This will have the same effect as having small sprites - eg. blurred out/pixelizated details like face on sprites.
It should be also quite cheap, because it wouldn't eat much GPU memory in that small dimensions, and you wouldn't stress GPU with complex fragment shader aproximating detail loss. Instead all you do is just map that texture on quad.

It is possible that some old hardware does not support render to texture, but that wouldn't support PS either.
And the best thing is that players will be able to chose their own settings that fit them the best.

That is this particular effect would look the best if it was done on software level using render targets, instead of rellying on post-processing. It needs engine change however.

Here is some example, though probably not the best one because of 512x512 scene on 640x480 screen looks sharp.
http://www.paulsprojects.net/opengl/rtotex/rtotex.html

Surf:
Ah, ok - I totally misunderstood you then. I thought you were suggesting to render all the 3d anims etc again to 2d sprites and pixelate them there then. ;)

Indeed, players being able to adjust the pixelisation (or disable) would be the best. If that is what you are aiming for, then all power to you and keep up the good work!

Luther Blissett:
I haven't managed to get anything out of the Normal maps yet - I've tried a lot of different things, but seem to be getting no results with any. Have you managed to get anything working with this?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version