SSS (SubSurface Scattering) Fake filter (Images updated)
-
- OGRE Team Member
- Posts: 5446
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1348
SSS (SubSurface Scattering) Fake filter (Images updated)
Hi all!
It's been a long time since my last shader.
Well... I'm back!
This time an SSS (Sub-surface Scattering) fake filter. Very easy to integrate, and relatively fast.
I'm still working on the code, so no downloads yet. But no worries I will publish it as Open Source for the OGRE Team.
EDIT: This is what I have
EDIT2: Here's a more updated demo. It's not complete, but will show you an interactive demo to see how it works. It's easy to modify to try another model. The only drawback is that you have to slightly modify the model's material. (See the demo) I'm in a hurry so I haven't tested the package. Let me know if what I've uploaded doesn't compile, I may have forgotten a file
EDIT3: Reuploaded.
FPS is quite impressive, though I should look at it in a real world application.
It has several parameters to customize.
It's written in Cg
Hardware Requierements:
*VS 1.1
*PS 3.0
*A video card cappable of of using PF_FLOAT32_R textures (32-bit float)
These images were taken in a GeForce 6200 256 MB AGP 8x
The fun part:
Without any effect (the well-known OGRE head):
With the filter:
With Different parameters (these were taken w/ FSAA x4):
Known issues:
*OpenGL is half slow as Direct3D. Pherhaps wrong profiles?
*Renders the whole scene three times. That can causes bottlenecks in very populated areas
Edit:
This demo is based on the Cel-shaded demo. (A light going around the head, etc)
It's been a long time since my last shader.
Well... I'm back!
This time an SSS (Sub-surface Scattering) fake filter. Very easy to integrate, and relatively fast.
I'm still working on the code, so no downloads yet. But no worries I will publish it as Open Source for the OGRE Team.
EDIT: This is what I have
EDIT2: Here's a more updated demo. It's not complete, but will show you an interactive demo to see how it works. It's easy to modify to try another model. The only drawback is that you have to slightly modify the model's material. (See the demo) I'm in a hurry so I haven't tested the package. Let me know if what I've uploaded doesn't compile, I may have forgotten a file
EDIT3: Reuploaded.
FPS is quite impressive, though I should look at it in a real world application.
It has several parameters to customize.
It's written in Cg
Hardware Requierements:
*VS 1.1
*PS 3.0
*A video card cappable of of using PF_FLOAT32_R textures (32-bit float)
These images were taken in a GeForce 6200 256 MB AGP 8x
The fun part:
Without any effect (the well-known OGRE head):
With the filter:
With Different parameters (these were taken w/ FSAA x4):
Known issues:
*OpenGL is half slow as Direct3D. Pherhaps wrong profiles?
*Renders the whole scene three times. That can causes bottlenecks in very populated areas
Edit:
This demo is based on the Cel-shaded demo. (A light going around the head, etc)
Last edited by dark_sylinc on Sat May 03, 2008 10:57 pm, edited 4 times in total.
-
- Halfling
- Posts: 48
- Joined: Fri Mar 31, 2006 5:08 pm
-
- Greenskin
- Posts: 131
- Joined: Tue Feb 25, 2003 10:33 pm
- Location: Seattle, Washington USA
Nice work!
just for a reference as to what it might be good for:
http://www.blender.org/development/rele ... cattering/
just for a reference as to what it might be good for:
http://www.blender.org/development/rele ... cattering/
-
- Silver Sponsor
- Posts: 2703
- Joined: Mon Aug 29, 2005 3:24 pm
- Location: Kuala Lumpur, Malaysia
- x 51
That is very nice example of SSS usechmod wrote:Nice work!
just for a reference as to what it might be good for:
http://www.blender.org/development/rele ... cattering/
A willow deeply scarred, somebody's broken heart
And a washed-out dream
They follow the pattern of the wind, ya' see
Cause they got no place to be
That's why I'm starting with me
And a washed-out dream
They follow the pattern of the wind, ya' see
Cause they got no place to be
That's why I'm starting with me
-
- OGRE Team Member
- Posts: 5446
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1348
Hi!
Here's the code submitted to SF.net Note it includes a binary sample too!
A mirror here (SF.net didn't want to accept my file I guess)
Thanks for the suggestions. Although it's not easy to change the material in the middle of development
Note that parameters can be customized. For example "Offset" changes how opaque the object looks. The demo defaults to a low value which means very semi-transparent.
The only missing thing is a template material to tell the object that it DOESN'T want to be Subsurface-scattered. Right now all objects in the scene will be applied with the same parameters.
I'm afraid I have other duties and I won't be able to make the changes soon. However be happy with what this!!
Athena' face doesn't look nice. It's a texture problem, not the shader.
It is definately taking shape, the following pics were taken with my new Geforce 8600 GTS 256MB @ 1440x900:
The last one shows the debug output of the shader, which tells how thickness is computed.
Here's the code submitted to SF.net Note it includes a binary sample too!
A mirror here (SF.net didn't want to accept my file I guess)
Thanks for the suggestions. Although it's not easy to change the material in the middle of development
Note that parameters can be customized. For example "Offset" changes how opaque the object looks. The demo defaults to a low value which means very semi-transparent.
The only missing thing is a template material to tell the object that it DOESN'T want to be Subsurface-scattered. Right now all objects in the scene will be applied with the same parameters.
I'm afraid I have other duties and I won't be able to make the changes soon. However be happy with what this!!
Athena' face doesn't look nice. It's a texture problem, not the shader.
It is definately taking shape, the following pics were taken with my new Geforce 8600 GTS 256MB @ 1440x900:
The last one shows the debug output of the shader, which tells how thickness is computed.
-
- OGRE Team Member
- Posts: 5446
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1348
Hi!
A friend made me realize the material parameters were wrong. (Like diffuse color, for example)
Now it looks much better, specially when seen in real time.
I haven't updated the materials yet (hey, it's just adding some diffuse and specular parameters!). Now I'm terrible busy, but I saw OGRE moved to SVN which is great, because I can now submit the code in the Patch form (CVS and I can't just get along ).
Besides, I'll be making a more usefull shader soon.
First the SSSe'd, then without it.
A friend made me realize the material parameters were wrong. (Like diffuse color, for example)
Now it looks much better, specially when seen in real time.
I haven't updated the materials yet (hey, it's just adding some diffuse and specular parameters!). Now I'm terrible busy, but I saw OGRE moved to SVN which is great, because I can now submit the code in the Patch form (CVS and I can't just get along ).
Besides, I'll be making a more usefull shader soon.
First the SSSe'd, then without it.
-
- Halfling
- Posts: 99
- Joined: Fri Dec 07, 2007 8:47 pm
- Location: Bristol, UK
-
- OGRE Team Member
- Posts: 5446
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1348
I saw it as a positive graphic appealing. But other people may not think the same. Mostly sure some blurring can soften it.hpesoj wrote:It looks very cool indeed, but are you thinking of trying to get rid of the harsh outlines on the models? I'm not sure how it looks in realtime, but in those images it looks kind of distracting.
The strange line in OGRE's chin is caused by a deformation in the mesh. It is hidden when opaque, but when it becomes semi transparent it is a bit more visible.
One thing about this technique is that it is very sensitive to mesh models unnacuracies.
The lines on the edges are caused due to the low thickness that borders have (near zero). I can wipe them out by removing incredible thin spaces.
New ideas have come to my mind, but I'm afraid I'll keep you waiting until I can write them.
Cheers
Dark Sylinc
-
- Gnoblar
- Posts: 2
- Joined: Fri Feb 12, 2010 2:05 pm
Re: SSS (SubSurface Scattering) Fake filter (Images updated)
Hi, I came across this a couple days ago and tried running it to see its effects. It works beautifully when rendering in OpenGL but when it comes to rendering in Direct3D9 all I get is a blank screen. Any ideas why? I have a GeForce GTS 240 graphics card and the ogre log is posted below. If additional information is needed please let me know.
Code: Select all
09:41:43: Creating resource group General
09:41:43: Creating resource group Internal
09:41:43: Creating resource group Autodetect
09:41:43: SceneManagerFactory for type 'DefaultSceneManager' registered.
09:41:43: Registering ResourceManager for type Material
09:41:43: Registering ResourceManager for type Mesh
09:41:43: Registering ResourceManager for type Skeleton
09:41:43: MovableObjectFactory for type 'ParticleSystem' registered.
09:41:43: OverlayElementFactory for type Panel registered.
09:41:43: OverlayElementFactory for type BorderPanel registered.
09:41:43: OverlayElementFactory for type TextArea registered.
09:41:43: Registering ResourceManager for type Font
09:41:43: ArchiveFactory for archive type FileSystem registered.
09:41:43: ArchiveFactory for archive type Zip registered.
09:41:43: FreeImage version: 3.10.0
09:41:43: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
09:41:43: Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,g3,sgi,exr,j2k,j2c,jp2
09:41:43: DDS codec registering
09:41:43: Registering ResourceManager for type HighLevelGpuProgram
09:41:43: Registering ResourceManager for type Compositor
09:41:43: MovableObjectFactory for type 'Entity' registered.
09:41:43: MovableObjectFactory for type 'Light' registered.
09:41:43: MovableObjectFactory for type 'BillboardSet' registered.
09:41:43: MovableObjectFactory for type 'ManualObject' registered.
09:41:43: MovableObjectFactory for type 'BillboardChain' registered.
09:41:43: MovableObjectFactory for type 'RibbonTrail' registered.
09:41:43: Loading library .\RenderSystem_Direct3D9_d
09:41:43: Installing plugin: D3D9 RenderSystem
09:41:43: D3D9 : Direct3D9 Rendering Subsystem created.
09:41:43: D3D9: Driver Detection Starts
09:41:43: D3D9: Driver Detection Ends
09:41:43: Plugin successfully installed
09:41:43: Loading library .\RenderSystem_GL_d
09:41:43: Installing plugin: GL RenderSystem
09:41:43: OpenGL Rendering Subsystem created.
09:41:44: Plugin successfully installed
09:41:44: Loading library .\Plugin_ParticleFX_d
09:41:44: Installing plugin: ParticleFX
09:41:44: Particle Emitter Type 'Point' registered
09:41:44: Particle Emitter Type 'Box' registered
09:41:44: Particle Emitter Type 'Ellipsoid' registered
09:41:44: Particle Emitter Type 'Cylinder' registered
09:41:44: Particle Emitter Type 'Ring' registered
09:41:44: Particle Emitter Type 'HollowEllipsoid' registered
09:41:44: Particle Affector Type 'LinearForce' registered
09:41:44: Particle Affector Type 'ColourFader' registered
09:41:44: Particle Affector Type 'ColourFader2' registered
09:41:44: Particle Affector Type 'ColourImage' registered
09:41:44: Particle Affector Type 'ColourInterpolator' registered
09:41:44: Particle Affector Type 'Scaler' registered
09:41:44: Particle Affector Type 'Rotator' registered
09:41:44: Particle Affector Type 'DirectionRandomiser' registered
09:41:44: Particle Affector Type 'DeflectorPlane' registered
09:41:44: Plugin successfully installed
09:41:44: Loading library .\Plugin_BSPSceneManager_d
09:41:44: Installing plugin: BSP Scene Manager
09:41:44: Plugin successfully installed
09:41:44: Loading library .\Plugin_CgProgramManager_d
09:41:44: Installing plugin: Cg Program Manager
09:41:44: Plugin successfully installed
09:41:44: Loading library .\Plugin_PCZSceneManager_d.dll
09:41:44: Installing plugin: Portal Connected Zone Scene Manager
09:41:44: PCZone Factory Type 'ZoneType_Default' registered
09:41:44: Plugin successfully installed
09:41:44: Loading library .\Plugin_OctreeZone_d.dll
09:41:44: Installing plugin: Octree Zone Factory
09:41:44: Plugin successfully installed
09:41:44: Loading library .\Plugin_OctreeSceneManager_d
09:41:44: Installing plugin: Octree & Terrain Scene Manager
09:41:44: Plugin successfully installed
09:41:44: *-*-* OGRE Initialising
09:41:44: *-*-* Version 1.6.3 (Shoggoth)
09:41:44: Creating resource group Bootstrap
09:41:44: Added resource location '../../../Media/packs/OgreCore.zip' of type 'Zip' to resource group 'Bootstrap'
09:41:44: Added resource location '../../../Media' of type 'FileSystem' to resource group 'General'
09:41:44: Added resource location '../../../Media/fonts' of type 'FileSystem' to resource group 'General'
09:41:44: Added resource location '../../../Media/materials/programs' of type 'FileSystem' to resource group 'General'
09:41:44: Added resource location '../../../Media/materials/scripts' of type 'FileSystem' to resource group 'General'
09:41:44: Added resource location '../../../Media/materials/textures' of type 'FileSystem' to resource group 'General'
09:41:44: Added resource location '../../../Media/models' of type 'FileSystem' to resource group 'General'
09:41:44: Added resource location '../../../Media/overlays' of type 'FileSystem' to resource group 'General'
09:41:44: Added resource location '../../../Media/particle' of type 'FileSystem' to resource group 'General'
09:41:44: Added resource location '../../../Media/gui' of type 'FileSystem' to resource group 'General'
09:41:44: Added resource location '../../../Media/DeferredShadingMedia' of type 'FileSystem' to resource group 'General'
09:41:44: Added resource location '../../../Media/PCZAppMedia' of type 'FileSystem' to resource group 'General'
09:41:44: Added resource location '../../../Media/packs/cubemap.zip' of type 'Zip' to resource group 'General'
09:41:44: Added resource location '../../../Media/packs/cubemapsJS.zip' of type 'Zip' to resource group 'General'
09:41:44: Added resource location '../../../Media/packs/dragon.zip' of type 'Zip' to resource group 'General'
09:41:44: Added resource location '../../../Media/packs/fresneldemo.zip' of type 'Zip' to resource group 'General'
09:41:44: Added resource location '../../../Media/packs/ogretestmap.zip' of type 'Zip' to resource group 'General'
09:41:44: Added resource location '../../../Media/packs/skybox.zip' of type 'Zip' to resource group 'General'
09:41:44: D3D9 : RenderSystem Option: Allow NVPerfHUD = No
09:41:44: D3D9 : RenderSystem Option: Anti aliasing = Level 8
09:41:44: D3D9 : RenderSystem Option: Floating-point mode = Fastest
09:41:44: D3D9 : RenderSystem Option: Full Screen = No
09:41:44: D3D9 : RenderSystem Option: Rendering Device = NVIDIA GeForce GTS 240
09:41:44: D3D9 : RenderSystem Option: VSync = No
09:41:44: D3D9 : RenderSystem Option: Video Mode = 1280 x 720 @ 32-bit colour
09:41:44: D3D9 : RenderSystem Option: sRGB Gamma Conversion = No
09:41:46: CPU Identifier & Features
09:41:46: -------------------------
09:41:46: * CPU ID: GenuineIntel: Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz
09:41:46: * SSE: yes
09:41:46: * SSE2: yes
09:41:46: * SSE3: yes
09:41:46: * MMX: yes
09:41:46: * MMXEXT: yes
09:41:46: * 3DNOW: no
09:41:46: * 3DNOWEXT: no
09:41:46: * CMOV: yes
09:41:46: * TSC: yes
09:41:46: * FPU: yes
09:41:46: * PRO: yes
09:41:46: * HT: no
09:41:46: -------------------------
09:41:46: D3D9 : Subsystem Initialising
09:41:46: D3D9RenderSystem::_createRenderWindow "OGRE Render Window", 1280x720 windowed miscParams: FSAA=8 FSAAQuality=0 colourDepth=32 gamma=false useNVPerfHUD=false vsync=false
09:41:46: D3D9 : Created D3D9 Rendering Window 'OGRE Render Window' : 1280x720, 32bpp
09:41:46: D3D9 : WARNING - disabling VSync in windowed mode can cause timing issues at lower frame rates, turn VSync on if you observe this problem.
09:41:46: Registering ResourceManager for type Texture
09:41:46: Registering ResourceManager for type GpuProgram
09:41:46: D3D9: Vertex texture format supported - PF_FLOAT16_RGB
09:41:46: D3D9: Vertex texture format supported - PF_FLOAT16_RGBA
09:41:46: D3D9: Vertex texture format supported - PF_FLOAT32_RGB
09:41:46: D3D9: Vertex texture format supported - PF_FLOAT32_RGBA
09:41:46: D3D9: Vertex texture format supported - PF_FLOAT16_R
09:41:46: D3D9: Vertex texture format supported - PF_FLOAT32_R
09:41:46: D3D9: Vertex texture format supported - PF_FLOAT16_GR
09:41:46: D3D9: Vertex texture format supported - PF_FLOAT32_GR
09:41:46: RenderSystem capabilities
09:41:46: -------------------------
09:41:46: RenderSystem Name: Direct3D9 Rendering Subsystem
09:41:46: GPU Vendor: nvidia
09:41:46: Device Name: NVIDIA GeForce GTS 240
09:41:46: Driver Version: 8.17.11.9621
09:41:46: * Fixed function pipeline: yes
09:41:46: * Hardware generation of mipmaps: yes
09:41:46: * Texture blending: yes
09:41:46: * Anisotropic texture filtering: yes
09:41:46: * Dot product texture operation: yes
09:41:46: * Cube mapping: yes
09:41:46: * Hardware stencil buffer: yes
09:41:46: - Stencil depth: 8
09:41:46: - Two sided stencil support: yes
09:41:46: - Wrap stencil values: yes
09:41:46: * Hardware vertex / index buffers: yes
09:41:46: * Vertex programs: yes
09:41:46: * Fragment programs: yes
09:41:46: * Geometry programs: no
09:41:46: * Supported Shader Profiles: hlsl ps_1_1 ps_1_2 ps_1_3 ps_1_4 ps_2_0 ps_2_a ps_2_b ps_2_x ps_3_0 vs_1_1 vs_2_0 vs_2_a vs_2_x vs_3_0
09:41:46: * Texture Compression: yes
09:41:46: - DXT: yes
09:41:46: - VTC: no
09:41:46: * Scissor Rectangle: yes
09:41:46: * Hardware Occlusion Query: yes
09:41:46: * User clip planes: yes
09:41:46: * VET_UBYTE4 vertex element type: yes
09:41:46: * Infinite far plane projection: yes
09:41:46: * Hardware render-to-texture: yes
09:41:46: * Floating point textures: yes
09:41:46: * Non-power-of-two textures: yes
09:41:46: * Volume textures: yes
09:41:46: * Multiple Render Targets: 4
09:41:46: - With different bit depths: yes
09:41:46: * Point Sprites: yes
09:41:46: * Extended point parameters: yes
09:41:46: * Max Point Size: 8192
09:41:46: * Vertex texture fetch: yes
09:41:46: - Max vertex textures: 4
09:41:46: - Vertex textures shared: no
09:41:46: * Render to Vertex Buffer : no
09:41:46: * DirectX per stage constants: yes
09:41:46: ***************************************
09:41:46: *** D3D9 : Subsystem Initialised OK ***
09:41:46: ***************************************
09:41:46: ResourceBackgroundQueue - threading disabled
09:41:46: Particle Renderer Type 'billboard' registered
09:41:46: SceneManagerFactory for type 'BspSceneManager' registered.
09:41:46: Registering ResourceManager for type BspLevel
09:41:46: SceneManagerFactory for type 'PCZSceneManager' registered.
09:41:46: MovableObjectFactory for type 'PCZLight' registered.
09:41:46: PCZone Factory Type 'ZoneType_Octree' registered
09:41:46: PCZone Factory Type 'ZoneType_Terrain' registered
09:41:46: SceneManagerFactory for type 'OctreeSceneManager' registered.
09:41:46: SceneManagerFactory for type 'TerrainSceneManager' registered.
09:41:46: Added resource location 'c:/ogreResources' of type 'FileSystem' to resource group 'General'
09:41:46: Added resource location 'c:/ogreResources/shaders' of type 'FileSystem' to resource group 'General'
09:41:46: Added resource location 'C:/ogre-v1-6-3/ogre/Samples/Media/materials/scripts' of type 'FileSystem' to resource group 'General'
09:41:46: Parsing scripts for resource group Autodetect
09:41:46: Finished parsing scripts for resource group Autodetect
09:41:46: Parsing scripts for resource group Bootstrap
09:41:46: Parsing script OgreCore.material
09:41:46: Parsing script OgreProfiler.material
09:41:46: Parsing script Ogre.fontdef
09:41:46: Parsing script OgreDebugPanel.overlay
09:41:46: Texture: New_Ogre_Border_Center.png: Loading 1 faces(PF_A8R8G8B8,256x128x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x128x1.
09:41:46: Texture: New_Ogre_Border.png: Loading 1 faces(PF_A8R8G8B8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x256x1.
09:41:46: Texture: New_Ogre_Border_Break.png: Loading 1 faces(PF_A8R8G8B8,32x32x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1.
09:41:46: Font BlueHighwayusing texture size 512x512
09:41:46: Info: Freetype returned null for character 127 in font BlueHighway
09:41:46: Info: Freetype returned null for character 128 in font BlueHighway
09:41:46: Info: Freetype returned null for character 129 in font BlueHighway
09:41:46: Info: Freetype returned null for character 130 in font BlueHighway
09:41:46: Info: Freetype returned null for character 131 in font BlueHighway
09:41:46: Info: Freetype returned null for character 132 in font BlueHighway
09:41:46: Info: Freetype returned null for character 133 in font BlueHighway
09:41:46: Info: Freetype returned null for character 134 in font BlueHighway
09:41:46: Info: Freetype returned null for character 135 in font BlueHighway
09:41:46: Info: Freetype returned null for character 136 in font BlueHighway
09:41:46: Info: Freetype returned null for character 137 in font BlueHighway
09:41:46: Info: Freetype returned null for character 138 in font BlueHighway
09:41:46: Info: Freetype returned null for character 139 in font BlueHighway
09:41:46: Info: Freetype returned null for character 140 in font BlueHighway
09:41:46: Info: Freetype returned null for character 141 in font BlueHighway
09:41:46: Info: Freetype returned null for character 142 in font BlueHighway
09:41:46: Info: Freetype returned null for character 143 in font BlueHighway
09:41:46: Info: Freetype returned null for character 144 in font BlueHighway
09:41:46: Info: Freetype returned null for character 145 in font BlueHighway
09:41:46: Info: Freetype returned null for character 146 in font BlueHighway
09:41:46: Info: Freetype returned null for character 147 in font BlueHighway
09:41:46: Info: Freetype returned null for character 148 in font BlueHighway
09:41:46: Info: Freetype returned null for character 149 in font BlueHighway
09:41:46: Info: Freetype returned null for character 150 in font BlueHighway
09:41:46: Info: Freetype returned null for character 151 in font BlueHighway
09:41:46: Info: Freetype returned null for character 152 in font BlueHighway
09:41:46: Info: Freetype returned null for character 153 in font BlueHighway
09:41:46: Info: Freetype returned null for character 154 in font BlueHighway
09:41:46: Info: Freetype returned null for character 155 in font BlueHighway
09:41:46: Info: Freetype returned null for character 156 in font BlueHighway
09:41:46: Info: Freetype returned null for character 157 in font BlueHighway
09:41:46: Info: Freetype returned null for character 158 in font BlueHighway
09:41:46: Info: Freetype returned null for character 159 in font BlueHighway
09:41:46: Info: Freetype returned null for character 160 in font BlueHighway
09:41:46: Texture: BlueHighwayTexture: Loading 1 faces(PF_BYTE_LA,512x512x1) with 0 generated mipmaps from Image. Internal format is PF_BYTE_LA,512x512x1.
09:41:46: Parsing script OgreLoadingPanel.overlay
09:41:46: Finished parsing scripts for resource group Bootstrap
09:41:46: Parsing scripts for resource group General
09:41:46: Parsing script Examples.program
09:41:47: Parsing script StdQuad_vp.program
09:41:47: Parsing script deferred.glsl.program
09:41:47: Parsing script deferred.hlsl.program
09:41:47: Parsing script deferred.program
09:41:47: Parsing script deferred_post_ambient.program
09:41:47: Parsing script deferred_post_debug.glsl.program
09:41:47: Parsing script deferred_post_debug.hlsl.program
09:41:47: Parsing script deferred_post_debug.program
09:41:47: Parsing script deferred_post_minilight.glsl.program
09:41:47: Parsing script deferred_post_minilight.hlsl.program
09:41:47: OGRE EXCEPTION(2:InvalidParametersException): Parameter called lightFalloff does not exist. in GpuProgramParameters::_findNamedConstantDefinition at c:\ogre-v1-6-3\ogre\ogremain\src\ogregpuprogram.cpp (line 1097)
09:41:47: Compiler error: invalid parameters in deferred_post_minilight.hlsl.program(27): setting of constant failed
09:41:47: Parsing script deferred_post_minilight.program
09:41:47: Parsing script deferred_post_multipass.glsl.program
09:41:47: Parsing script deferred_post_multipass.hlsl.program
09:41:47: Parsing script deferred_post_onepass.glsl.program
09:41:47: Parsing script deferred_post_onepass.hlsl.program
09:41:47: Parsing script deferred_post_vs.program
09:41:47: Parsing script newDepthShadowmap.program
09:41:47: Parsing script newLighting.program
09:41:48: OGRE EXCEPTION(2:InvalidParametersException): Parameter called iLightAtt does not exist. in GpuProgramParameters::_findNamedConstantDefinition at c:\ogre-v1-6-3\ogre\ogremain\src\ogregpuprogram.cpp (line 1097)
09:41:48: Compiler error: invalid parameters in newLighting.program(113): setting of constant failed
09:41:48: OGRE EXCEPTION(2:InvalidParametersException): Parameter called iLightAtt does not exist. in GpuProgramParameters::_findNamedConstantDefinition at c:\ogre-v1-6-3\ogre\ogremain\src\ogregpuprogram.cpp (line 1097)
09:41:48: Compiler error: invalid parameters in newLighting.program(133): setting of constant failed
09:41:48: OGRE EXCEPTION(2:InvalidParametersException): Parameter called iSpotParams does not exist. in GpuProgramParameters::_findNamedConstantDefinition at c:\ogre-v1-6-3\ogre\ogremain\src\ogregpuprogram.cpp (line 1097)
09:41:48: Compiler error: invalid parameters in newLighting.program(134): setting of constant failed
09:41:48: OGRE EXCEPTION(2:InvalidParametersException): Parameter called iLightAtt does not exist. in GpuProgramParameters::_findNamedConstantDefinition at c:\ogre-v1-6-3\ogre\ogremain\src\ogregpuprogram.cpp (line 1097)
09:41:48: Compiler error: invalid parameters in newLighting.program(172): setting of constant failed
09:41:48: OGRE EXCEPTION(2:InvalidParametersException): Parameter called iLightAtt does not exist. in GpuProgramParameters::_findNamedConstantDefinition at c:\ogre-v1-6-3\ogre\ogremain\src\ogregpuprogram.cpp (line 1097)
09:41:48: Compiler error: invalid parameters in newLighting.program(192): setting of constant failed
09:41:48: OGRE EXCEPTION(2:InvalidParametersException): Parameter called iSpotParams does not exist. in GpuProgramParameters::_findNamedConstantDefinition at c:\ogre-v1-6-3\ogre\ogremain\src\ogregpuprogram.cpp (line 1097)
09:41:48: Compiler error: invalid parameters in newLighting.program(193): setting of constant failed
09:41:48: Parsing script normalmapping.program
09:41:48: OGRE EXCEPTION(2:InvalidParametersException): Parameter called worldViewProj does not exist. in GpuProgramParameters::_findNamedConstantDefinition at c:\ogre-v1-6-3\ogre\ogremain\src\ogregpuprogram.cpp (line 1097)
09:41:48: Compiler error: invalid parameters in normalmapping.program(9): setting of constant failed
09:41:48: OGRE EXCEPTION(2:InvalidParametersException): Parameter called texelOffsets does not exist. in GpuProgramParameters::_findNamedConstantDefinition at c:\ogre-v1-6-3\ogre\ogremain\src\ogregpuprogram.cpp (line 1097)
09:41:48: Compiler error: invalid parameters in normalmapping.program(10): setting of constant failed
09:41:48: OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resource normalmappingFP.cg in resource group General or any other group. in ResourceGroupManager::openResource at c:\ogre-v1-6-3\ogre\ogremain\src\ogreresourcegroupmanager.cpp (line 753)
09:41:48: High-level program normalmappingFP encountered an error during loading and is thus not supported.
OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resource normalmappingFP.cg in resource group General or any other group. in ResourceGroupManager::openResource at c:\ogre-v1-6-3\ogre\ogremain\src\ogreresourcegroupmanager.cpp (line 753)
09:41:48: Parsing script shadowCaster.program
09:41:48: Parsing script SSSFake.program
09:41:48: Parsing script Examples.program
09:41:48: Parsing script StdQuad_vp.program
09:41:48: Parsing script ASCII.material
09:41:48: Parsing script ASMSwizzle.material
09:41:48: Compiler error: object unsupported by render system in ASMSwizzle.material(1)
09:41:48: Parsing script BlackAndWhite.material
09:41:48: Parsing script Bloom.material
09:41:48: Parsing script Bloom2.material
09:41:48: Parsing script CGSwizzle.material
09:41:48: Parsing script DepthShadowmap.material
09:41:48: Parsing script Dither.material
09:41:48: Parsing script DOF.material
09:41:48: Parsing script Embossed.material
09:41:48: Parsing script Example-DynTex.material
09:41:48: Parsing script Example-Water.material
09:41:48: Parsing script Example.material
09:41:49: Parsing script Examples-Advanced.material
09:41:49: Parsing script facial.material
09:41:50: Parsing script Glass.material
09:41:50: Parsing script GLSLSwizzle.material
09:41:50: Parsing script Halftone.material
09:41:50: Parsing script hdr.material
09:41:50: Parsing script HeatVision.material
09:41:50: Parsing script Hurt.material
09:41:50: Parsing script instancing.material
09:41:50: Parsing script Invert.material
09:41:50: Parsing script IsoSurf.material
09:41:50: Parsing script Laplace.material
09:41:50: Parsing script MotionBlur.material
09:41:50: Parsing script MRTtest.material
09:41:50: Parsing script NightVision.material
09:41:50: Parsing script Ocean.material
09:41:50: Parsing script OffsetMapping.material
09:41:51: Parsing script Ogre.material
09:41:51: Parsing script OldMovie.material
09:41:51: Parsing script OldTV.material
09:41:51: Parsing script ParticleGS.material
09:41:51: OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/ParticleGS/GenerateVS: CG ERROR : "The compile returned an error."
(0) : error C6015: Output 'POSITION' not completely written
in CgProgram::loadFromSource at c:\ogre-v1-6-3\ogre\plugins\cgprogrammanager\src\ogrecgprogrammanagerdll.cpp (line 66)
09:41:51: High-level program Ogre/ParticleGS/GenerateVS encountered an error during loading and is thus not supported.
OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/ParticleGS/GenerateVS: CG ERROR : "The compile returned an error."
(0) : error C6015: Output 'POSITION' not completely written
in CgProgram::loadFromSource at c:\ogre-v1-6-3\ogre\plugins\cgprogrammanager\src\ogrecgprogrammanagerdll.cpp (line 66)
09:41:51: OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/ParticleGS/DisplayVS: CG ERROR : "The compile returned an error."
(249) : warning C7050: "output.color" might be used before being initialized
(0) : error C6015: Output 'POSITION' not completely written
in CgProgram::loadFromSource at c:\ogre-v1-6-3\ogre\plugins\cgprogrammanager\src\ogrecgprogrammanagerdll.cpp (line 66)
09:41:51: High-level program Ogre/ParticleGS/DisplayVS encountered an error during loading and is thus not supported.
OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/ParticleGS/DisplayVS: CG ERROR : "The compile returned an error."
(249) : warning C7050: "output.color" might be used before being initialized
(0) : error C6015: Output 'POSITION' not completely written
in CgProgram::loadFromSource at c:\ogre-v1-6-3\ogre\plugins\cgprogrammanager\src\ogrecgprogrammanagerdll.cpp (line 66)
09:41:51: OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/ParticleGS/DisplayPS: CG ERROR : "The compile returned an error."
(323) : fatal error C9999: unexpected cast operation
in CgProgram::loadFromSource at c:\ogre-v1-6-3\ogre\plugins\cgprogrammanager\src\ogrecgprogrammanagerdll.cpp (line 66)
09:41:51: High-level program Ogre/ParticleGS/DisplayPS encountered an error during loading and is thus not supported.
OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/ParticleGS/DisplayPS: CG ERROR : "The compile returned an error."
(323) : fatal error C9999: unexpected cast operation
in CgProgram::loadFromSource at c:\ogre-v1-6-3\ogre\plugins\cgprogrammanager\src\ogrecgprogrammanagerdll.cpp (line 66)
09:41:51: Parsing script Posterize.material
09:41:51: Parsing script pssm.material
09:41:51: Parsing script RadialBlur.material
09:41:51: Parsing script RZR-002.material
09:41:51: Parsing script SharpenEdges.material
09:41:51: Parsing script smoke.material
09:41:51: Parsing script Tiling.material
09:41:51: Parsing script VarianceShadowmap.material
09:41:51: Parsing script deferred.material
09:41:51: Parsing script deferreddemo.material
09:41:51: Parsing script deferred_post_ambient.material
09:41:51: Parsing script deferred_post_debug.material
09:41:51: Parsing script deferred_post_minilight.material
09:41:51: Parsing script deferred_post_multipass.material
09:41:51: Parsing script deferred_post_onepass.material
09:41:51: Parsing script ROOM.material
09:41:51: Parsing script RomanBath.material
09:41:51: Parsing script applicator.material
09:41:51: Parsing script ball.material
09:41:51: Parsing script bones.material
09:41:51: Parsing script bottomPanel.material
09:41:51: Parsing script button.material
09:41:51: Parsing script cervix.material
09:41:51: Parsing script cervix_01.material
09:41:51: Parsing script dog.material
09:41:51: Parsing script Hand-Lit.material
09:41:51: Parsing script hand.material
09:41:51: Parsing script mirena.material
09:41:51: Parsing script panel.material
09:41:51: Parsing script Pointer.material
09:41:51: Parsing script Pointer2.material
09:41:51: Parsing script sheet.material
09:41:51: Parsing script speculum.material
09:41:51: Parsing script squishey.material
09:41:51: Parsing script testpanel.material
09:41:51: Parsing script text.material
09:41:51: Parsing script topPanel.material
09:41:51: Parsing script whiteball.material
09:41:51: Parsing script newDepthShadowmap.material
09:41:51: Parsing script newLighting.material
09:41:52: Parsing script normalmapping.material
09:41:52: Parsing script shadowCaster.material
09:41:52: Parsing script SSSFake.material
09:41:52: Parsing script ASCII.material
09:41:52: Parsing script ASMSwizzle.material
09:41:52: Compiler error: object unsupported by render system in ASMSwizzle.material(1)
09:41:52: Parsing script BlackAndWhite.material
09:41:52: Parsing script Bloom.material
09:41:52: Parsing script Bloom2.material
09:41:52: Parsing script CGSwizzle.material
09:41:52: Parsing script DepthShadowmap.material
09:41:52: Parsing script Dither.material
09:41:52: Parsing script DOF.material
09:41:52: Parsing script Embossed.material
09:41:52: Parsing script Example-DynTex.material
09:41:52: Parsing script Example-Water.material
09:41:52: Parsing script Example.material
09:41:52: Parsing script Examples-Advanced.material
09:41:52: Parsing script facial.material
09:41:52: Parsing script Glass.material
09:41:52: Parsing script GLSLSwizzle.material
09:41:52: Parsing script Halftone.material
09:41:53: Parsing script hdr.material
09:41:53: Parsing script HeatVision.material
09:41:53: Parsing script Hurt.material
09:41:53: Parsing script instancing.material
09:41:53: Parsing script Invert.material
09:41:53: Parsing script IsoSurf.material
09:41:53: Parsing script Laplace.material
09:41:53: Parsing script MotionBlur.material
09:41:53: Parsing script MRTtest.material
09:41:53: Parsing script NightVision.material
09:41:53: Parsing script Ocean.material
09:41:53: Parsing script OffsetMapping.material
09:41:53: Parsing script Ogre.material
09:41:53: Parsing script OldMovie.material
09:41:53: Parsing script OldTV.material
09:41:53: Parsing script ParticleGS.material
09:41:53: Parsing script Posterize.material
09:41:53: Parsing script pssm.material
09:41:53: Parsing script RadialBlur.material
09:41:53: Parsing script RZR-002.material
09:41:53: Parsing script SharpenEdges.material
09:41:53: Parsing script smoke.material
09:41:53: Parsing script Tiling.material
09:41:53: Parsing script VarianceShadowmap.material
09:41:53: Parsing script emitted_emitter.particle
09:41:53: Parsing script Example-Water.particle
09:41:53: Parsing script Example.particle
09:41:53: Parsing script smoke.particle
09:41:53: Parsing script Examples.compositor
09:41:54: Parsing script deferred.compositor
09:41:54: Parsing script SSSFake.compositor
09:41:54: Parsing script Examples.compositor
09:41:54: Parsing script main.menu
09:41:54: Parsing script OneDevice.haptics
09:41:54: Parsing script TwoDevices.haptics
09:41:54: Parsing script ball.hapticScene
09:41:54: Parsing script cervix.hapticScene
09:41:54: Parsing script dog.hapticScene
09:41:54: Parsing script hand.hapticScene
09:41:54: Parsing script sample.fontdef
09:41:54: Parsing script Compositor.overlay
09:41:54: Parsing script DP3.overlay
09:41:54: Parsing script Example-CubeMapping.overlay
09:41:54: Parsing script Example-DynTex.overlay
09:41:54: Parsing script Example-Water.overlay
09:41:54: Parsing script Shadows.overlay
09:41:54: Finished parsing scripts for resource group General
09:41:54: Parsing scripts for resource group Internal
09:41:54: Finished parsing scripts for resource group Internal
09:41:54: Could not open UTF16 language file.
09:41:54: Texture: diffuse.png: Loading 1 faces(PF_R8G8B8,2048x2048x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,2048x2048x1.
09:41:55: Mesh: Loading hand.mesh.
09:41:55: Texture: specular.png: Loading 1 faces(PF_R8G8B8,2048x2048x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,2048x2048x1.
09:41:55: Texture: normal.png: Loading 1 faces(PF_R8G8B8,2048x2048x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,2048x2048x1.
09:41:56: Mesh: Loading mirena.mesh.
09:41:56: Texture: measurements.png: Loading 1 faces(PF_A8R8G8B8,226x1038x1) with 5 generated mipmaps from Image. Internal format is PF_A8R8G8B8,226x1038x1.
09:41:56: Texture: cervix_01_colour.png: Loading 1 faces(PF_R8G8B8,2048x2048x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,2048x2048x1.
09:41:56: Texture: cervix_01_spec.png: Loading 1 faces(PF_R8G8B8,1024x1024x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,1024x1024x1.
09:41:57: Texture: cervix_01_normal.png: Loading 1 faces(PF_A8R8G8B8,2048x2048x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,2048x2048x1.
09:41:57: *** Initializing OIS ***
09:41:58: Texture: spot_shadow_fade.png: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
09:42:05: PCZone Factory Type 'ZoneType_Octree' unregistered
09:42:05: PCZone Factory Type 'ZoneType_Terrain' unregistered
09:42:05: Unregistering ResourceManager for type BspLevel
09:42:05: *-*-* OGRE Shutdown
09:42:05: Unregistering ResourceManager for type Compositor
09:42:05: Unregistering ResourceManager for type Font
09:42:05: Unregistering ResourceManager for type Skeleton
09:42:05: Unregistering ResourceManager for type Mesh
09:42:05: Unregistering ResourceManager for type HighLevelGpuProgram
09:42:05: Uninstalling plugin: Octree & Terrain Scene Manager
09:42:05: Plugin successfully uninstalled
09:42:05: Unloading library .\Plugin_OctreeSceneManager_d
09:42:05: Uninstalling plugin: Octree Zone Factory
09:42:05: Plugin successfully uninstalled
09:42:05: Unloading library .\Plugin_OctreeZone_d.dll
09:42:05: Uninstalling plugin: Portal Connected Zone Scene Manager
09:42:05: Plugin successfully uninstalled
09:42:05: Unloading library .\Plugin_PCZSceneManager_d.dll
09:42:05: Uninstalling plugin: Cg Program Manager
09:42:05: Plugin successfully uninstalled
09:42:05: Unloading library .\Plugin_CgProgramManager_d
09:42:05: Uninstalling plugin: BSP Scene Manager
09:42:05: Plugin successfully uninstalled
09:42:05: Unloading library .\Plugin_BSPSceneManager_d
09:42:05: Uninstalling plugin: ParticleFX
09:42:05: Plugin successfully uninstalled
09:42:05: Unloading library .\Plugin_ParticleFX_d
09:42:05: Uninstalling plugin: GL RenderSystem
09:42:05: *** Stopping Win32GL Subsystem ***
09:42:05: Plugin successfully uninstalled
09:42:05: Unloading library .\RenderSystem_GL_d
09:42:05: Uninstalling plugin: D3D9 RenderSystem
09:42:05: D3D9 : Shutting down cleanly.
09:42:05: Unregistering ResourceManager for type Texture
09:42:05: Unregistering ResourceManager for type GpuProgram
09:42:05: D3D9 : Direct3D9 Rendering Subsystem destroyed.
09:42:05: Plugin successfully uninstalled
09:42:05: Unloading library .\RenderSystem_Direct3D9_d
09:42:05: Unregistering ResourceManager for type Material
-
- Gnome
- Posts: 336
- Joined: Sat Dec 08, 2007 4:28 am
- Location: Canada
- x 7
Re: SSS (SubSurface Scattering) Fake filter (Images updated)
Nice shader, could you explain a little how you're doing it?
Did you check this one out? I saw it in gamedev some time ago.
http://www.gamedev.net/community/forums ... _id=403656
Did you check this one out? I saw it in gamedev some time ago.
http://www.gamedev.net/community/forums ... _id=403656
-
- Halfling
- Posts: 72
- Joined: Wed Jul 16, 2008 10:01 am
Re: SSS (SubSurface Scattering) Fake filter (Images updated)
this does not work for me on gf 8800gtx and 8600m gt 256 under direct3d - just a black screen.
-
- Gremlin
- Posts: 164
- Joined: Mon Sep 07, 2009 10:44 pm
- Location: Brazil
Re: SSS (SubSurface Scattering) Fake filter (Images updated)
That is an old post from 2008... and that demo don't look good... at last compared to other photos i see in the net (the demo still works for me).
Excuse me if my english fail!
-
- Halfling
- Posts: 72
- Joined: Wed Jul 16, 2008 10:01 am
Re: SSS (SubSurface Scattering) Fake filter (Images updated)
which screenshots do you mean? can you give me some links?
i really want to integrate this into my project but it doesn't work
for me, shows only a blank screen.
thanks
regards,
christian
i really want to integrate this into my project but it doesn't work
for me, shows only a blank screen.
thanks
regards,
christian
-
- Gremlin
- Posts: 164
- Joined: Mon Sep 07, 2009 10:44 pm
- Location: Brazil
Re: SSS (SubSurface Scattering) Fake filter (Images updated)
The demo in the first post makes the ogre head "half transparent" and add brightness to its borders. (AntiAliasing don't work in that demo, it make the effect look worse).
That is one of the photos posted by the author of that shader, that photo is of what was supposed to be one marble statue:
But, that is a 3d modeled "marble statue" rendered with REAL SubSurface Scattering:
Other photos of REAL SubSurface Scattering
SubSurface Scattering in a 3d modeled hand:
Now the same thing in real life (the REAL hand of someone):
This example show SSS more clearer, the light is on the backs of the 3d model (note that this is one simple low poly model) :
I don't think the code of that shader is of any real use for you...
But what you mean when you say "it doesn't work for me, shows only a blank screen"? The demo don't work or even integrating the code in a simple program don't work? I tested just the demo and it works for me (I'm using one Geforce 8600GT with 256MB in Windows XP 32Bit, driver version 195.62).
Maybe because the shader and it's code is from 2008 you can't use it with newer versions of Ogre without some workarounds? Take a look in the .log file of your program.
That is one of the photos posted by the author of that shader, that photo is of what was supposed to be one marble statue:
But, that is a 3d modeled "marble statue" rendered with REAL SubSurface Scattering:
Other photos of REAL SubSurface Scattering
SubSurface Scattering in a 3d modeled hand:
Now the same thing in real life (the REAL hand of someone):
This example show SSS more clearer, the light is on the backs of the 3d model (note that this is one simple low poly model) :
I don't think the code of that shader is of any real use for you...
But what you mean when you say "it doesn't work for me, shows only a blank screen"? The demo don't work or even integrating the code in a simple program don't work? I tested just the demo and it works for me (I'm using one Geforce 8600GT with 256MB in Windows XP 32Bit, driver version 195.62).
Maybe because the shader and it's code is from 2008 you can't use it with newer versions of Ogre without some workarounds? Take a look in the .log file of your program.
Excuse me if my english fail!
-
- Halfling
- Posts: 72
- Joined: Wed Jul 16, 2008 10:01 am
Re: SSS (SubSurface Scattering) Fake filter (Images updated)
no the demo isn't working, just shows a black screen in direct3d (macbook pro 4.1)
-
- OGRE Team Member
- Posts: 5446
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1348
Re: SSS (SubSurface Scattering) Fake filter (Images updated)
Hi all!
Quite some feedback 2 years later.
As for the black screen D3D9, I'm clueless. Seems you're integrating the code into your own project and may be you're doing it wrong.
At that time I had a lot more ideas to throw at this filter, but other stuff (university and work) deviated completely my attention from it.
@Matheus Martino:
Yes, the pictures look lame compared to true SSS.
The idea of this fake filter is that you can tweak the parameters until it looks good. I wanted to have more than 3 parameters to configure. Furthermore if the model had polygons inside (which would be GPU-unfriendly, but that could be replaced with a texture look up) it could look much more realistic. Anyway, I'm afraid I left this shader in a very unfinished state.
Probably FSAA isn't working because you can't average depths, it makes no sense. It will only sharpen the edges. This is the same problem that affects Deferred Shading, naive FSAA averages the G-Buffer instead of the final output, which is wrong.
I wanted it to be more sophisticated, by taking the overall depth complexity (not just difference), using a couple textures samplers for randomization and adding more parameters and variations from the pixels in the vicinity, and some screen space raycasts (just like SSAO does), but my attention is focused somewhere else currently.
Quite some feedback 2 years later.
As for the black screen D3D9, I'm clueless. Seems you're integrating the code into your own project and may be you're doing it wrong.
At that time I had a lot more ideas to throw at this filter, but other stuff (university and work) deviated completely my attention from it.
@Matheus Martino:
Yes, the pictures look lame compared to true SSS.
The idea of this fake filter is that you can tweak the parameters until it looks good. I wanted to have more than 3 parameters to configure. Furthermore if the model had polygons inside (which would be GPU-unfriendly, but that could be replaced with a texture look up) it could look much more realistic. Anyway, I'm afraid I left this shader in a very unfinished state.
This shader basically exploited the depth difference in the models. There are 2 passes, the first outputs depth from front faces, the 2nd draws back faces and calculates the depth difference. Then a formula that takes the depth difference is applied an hence the results.Nice shader, could you explain a little how you're doing it?
Probably FSAA isn't working because you can't average depths, it makes no sense. It will only sharpen the edges. This is the same problem that affects Deferred Shading, naive FSAA averages the G-Buffer instead of the final output, which is wrong.
I wanted it to be more sophisticated, by taking the overall depth complexity (not just difference), using a couple textures samplers for randomization and adding more parameters and variations from the pixels in the vicinity, and some screen space raycasts (just like SSAO does), but my attention is focused somewhere else currently.
-
- Greenskin
- Posts: 122
- Joined: Fri Jan 20, 2012 6:44 pm
- Location: Russia,Moscow
- x 1
Re: SSS (SubSurface Scattering) Fake filter (Images updated)
reupload please
-
- Halfling
- Posts: 85
- Joined: Mon Jul 24, 2006 11:06 am
- Location: Malaysia
- x 2
Re: SSS (SubSurface Scattering) Fake filter (Images updated)
never knew that mac supports directxartn3r wrote:no the demo isn't working, just shows a black screen in direct3d (macbook pro 4.1)
-
- OGRE Team Member
- Posts: 5446
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1348
Re: SSS (SubSurface Scattering) Fake filter (Images updated)
I just found a version of the SSS demo with source code and with exes.
Here it is reuploaded.
It builds against an old version of Ogre. I won't port it, and I won't support it. Please don't ask me about it.
Here it is reuploaded.
It builds against an old version of Ogre. I won't port it, and I won't support it. Please don't ask me about it.
-
- Gnoblar
- Posts: 2
- Joined: Thu Jan 23, 2014 3:46 am
Re: SSS (SubSurface Scattering) Fake filter (Images updated)
The demo shows a black screen when I run it in directX.dark_sylinc wrote:I just found a version of the SSS demo with source code and with exes.
Here it is reuploaded.
It builds against an old version of Ogre. I won't port it, and I won't support it. Please don't ask me about it.
My rendering device is NVIDIA GeForce GT 420.
The ogre sdk version is 1.7.2.
I found the texture-coordinate conversion is incorrect.
The materials need add "vertex_program_ref" like this:
Code: Select all
material Ogre/Compositor/SSS/SSS_BlendSSS
{
technique
{
pass
{
.....
vertex_program_ref Ogre/Compositor/StdQuad_Cg_vp//when run in directX,need convert to image-space
{
}
fragment_program_ref SSS/mainBlendSSS_fp
{
}
.....
}
}
}
Finally,I found many warning in log file. Some like this :
Code: Select all
10:48:44: Render Target 'rtt/101394144' Average FPS: 454.821 Best FPS: 460.539 Worst FPS: 449.102
10:48:44: Render Target 'rtt/101394080' Average FPS: 454.545 Best FPS: 460.539 Worst FPS: 448.551
10:48:44: Render Target 'rtt/101394272' Average FPS: 454.545 Best FPS: 460.539 Worst FPS: 448.551
10:48:44: Render Target 'rtt/101394208' Average FPS: 454.821 Best FPS: 460.539 Worst FPS: 449.102
10:48:45: Creating viewport on target 'rtt/101394208', rendering from camera 'PlayerCam', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
10:48:45: Creating viewport on target 'rtt/101394272', rendering from camera 'PlayerCam', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
10:48:45: Creating viewport on target 'rtt/101394080', rendering from camera 'PlayerCam', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
10:48:45: Creating viewport on target 'rtt/101394144', rendering from camera 'PlayerCam', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
10:48:45: WARNING: Texture instance 'CompositorInstanceTexture41' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
10:48:45: WARNING: Texture instance 'CompositorInstanceTexture40' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
10:48:45: WARNING: Texture instance 'CompositorInstanceTexture43' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
10:48:45: WARNING: Texture instance 'CompositorInstanceTexture42' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.