Page 9 of 12

Posted: Tue May 13, 2008 6:22 pm
by Xplod
Up.
News ?

Posted: Wed May 14, 2008 12:51 am
by BlindSide
Sorry I haven't had much time to work on this, I'll get those improvements in. As for the WaterSceneNode, both this and the water use 2 passes in their rendering process, so this might be interfering with each other. If you could post some code about how and when you are updating each one that would be great. (You might need to update the effectwrapper twice, for the reflections and for the final output).

Cheers

Posted: Wed May 14, 2008 11:37 am
by Xplod
The RealisticWaterSceneNode updates automatically. I tried to replace every SceneManager->drawAll(); by effectsHandler->update(); but I get a DIRECT3D9 Failed error.
I'm using the original RealisticWaterSceneNode code, so I think you can take a look at it. And in my main loop, I just do a effectsHandler->update();

Posted: Wed May 14, 2008 2:45 pm
by Vsk
Did you know that you don't use #ifndef #define.. in your .h ?and that can generate horribles problems.
I had included 2 times you effectWrapper.h, and pass a day trying to find the errors that c++ compiler gives.
Just today, I found that I have two includes, and said "hey, it has nothing to do with this, this is resolved with the #ifndef" and then I saw that your files doesn't have them.
Is a little thing but with c++ compilers...
Good job again.

Posted: Wed May 14, 2008 3:09 pm
by BlindSide
I'm not using header guards? How silly, I'll fix that also in the update (Coming soon).

just an idea

Posted: Fri May 16, 2008 3:00 pm
by vectorcorpse
a few days ago i was a bit bored and decided to try a game in my linux box.
it's sauerbraten (cube 2 engine) and much to my surprise it had some interesting fetures, so i downloaded the cvs version and found even more interesting effects, so i searched throw the code and realised that it was basic and missed most of the 3d andlings file formats and animation when comparing with irrlicht, also there is no documentation and the code is non intuitive, but non the less it has correct normal mapping soft shadows, character overbright, bloom, water with refraction, reflexion and caustic, grass, etc... another thing is it uses enet and with a very stable implementation, it uses sdl sound and its is extremely fast (disabeling some shaders it runs on my old ati 9100 igp) and runs at max on my GF6200LE
anyway i am posting this here because i think sauerbraten source code (zlib style lisence) from cvs could be usefull to port some of the effects to irrlicht (soft shadows could make a good adiction the xeffects with more option to select pre computed shadows or volumetric shadows) this could bring irrlicht more close to the popular graphics engines and also some game engines even irrlicht being just a graphics engine in relation to high quality effects (has for mesh manipulation, conpreensive code and easy to use and implement irrlicht is perfect has it is). i'll be trying to do it myself (but i am not has skilled has most of the developers here and also i only develop in linux witch means no directx support) :D
note: the main developer worked on far cry fom crytech and some effects resemble the light effects on crysis, try the lvl fanatic_caves with full effects turned, light bloom set to 140 and walk arround the map on to see what i mean.

Posted: Sat Jun 14, 2008 2:39 pm
by panau
hi, I was trying Xeffects, i would like the room to only receive shadows from dwarfs and not from itself but when i change its props from ESM_BOTH to ESM_RECIEVE all shadows just disappear, i am using openGL
whats wrong here? :)

Posted: Sat Jun 14, 2008 3:10 pm
by dlangdev
Ran the latest version, here's the output...very nice.

Image

Posted: Sat Jun 14, 2008 6:47 pm
by panau
with effect->addShadowToNode(room,filterType,ESM_BOTH); or with effect->addShadowToNode(room,filterType); i've got the same result as you, but when i change to effect->addShadowToNode(room,filterType,ESM_RECIEVE); the shadows are gone..

is it bug or the main mesh has to be ESM_BOTH?

:?

Posted: Sun Jun 15, 2008 4:00 am
by BlindSide
I guess theres a bug, I'll have to take a closer look at another time. In the meantime, feel free to look through my source and point out anything suspicious.

Cheers

Posted: Sun Jun 15, 2008 6:11 am
by dlangdev
Oh, is that so...

There's a bug I found, really big bug...

I tried assigning a bump map and nothing got rendered.

:-)

Posted: Sat Jun 21, 2008 3:35 pm
by christianclavet
Just tried your demo on my new machine (Vista 64 with a GeForce 9800GX2)
It work really well.

Here is a screenshot with a 4096 pixel shadow map and the filtering at the maximum (16PCF)

DirectX 9.0
Image

OpenGL
Image

Have someone have ideas about the FPS rate on a GeForce 7600?
Have this been tried with Normal maps? (From the thread seem to have a little problem with bump maps, so perhaps normal maps are affected as well)

Posted: Sat Jun 21, 2008 4:29 pm
by vectorcorpse
if i remember correctly what blindside said, xeffects are not integrated with the irrlicht shaders inside the engine therefore until someone get the time to do it will only work with post process shaders applyed over xeffects (ex: tgm shader pack). from what i understand it has something to do with the textures, both xeffects and the irrlicht (normal, bump or parallax mapping, maybe some others too) works by modifying and reapplying the textures so the 2nd applyed shader will completly mess up what the 1st applyed shader has done resulting in either no change on the image, a messed up image or no image at all.

Posted: Sun Jun 22, 2008 6:09 am
by BlindSide
Ok small update, the "update()" function now takes an (optional) parameter for the output rendertarget. Before it would carelessly render to the backbuffer, but now you are free to specify what rendertarget you want to output to. If you don't use this parameter, it will just output to the backbuffer, so you can still use it exactly the same way as before.

I also added a new method "setPostProcessingUserTexture" to allow the user to specify a 4th custom texture to be used in post-processing effects. This allows things beyond trivial multiple blur style post-processing effects, and may be used for things such as a random texture for offsetting lookups or a screen overlay.
Have this been tried with Normal maps? (From the thread seem to have a little problem with bump maps, so perhaps normal maps are affected as well)
I think dlangdev is being sarcastic here about it being a bug (But it is hard to tell with him sometimes :P ). What he is actually saying is that he would like a feature to allow shadowing on bumpmapped objects (Currently I only implemented materials for solid, detailmap and lightmapped.).

Here are some important things to note:
- Any material scene node can be used in EMT_CAST only mode, as the scene node itself only casts shadows, it does not need its material modified for shadow rendering.
- There is an easy way to have the entire scene shadowed regardless of what material is used (Normalmapping, bumpmapping, even a custom shader.):

You see, I added the features from before (A custom output texture in update() and a custom user texture in post-processing) specifically because, if you do the rendering in two passes, and combine the shadowed output with the original output, you can get over the different material type limitations and use any material you wish. I may add a specific method for this later, but it is possible to do this yourself using the current version.

Basically you:
- Render the normal shadow mapping output using white textures, and pass a screen-size render target as the parameter to "update()" (The black/white shadow and lighting will be outputted to this texture.)
- Render your scene nodes again using any materials, setting the textures back to normal.
- Set the render target you used before as the post-processing user texture.
- Combine the two textures by multiplying in a post-processing pass.

It may be a little fiddly to get working at first (Alot of setting/unsetting of textures/materials etc), so I'll post a clear example based on the 08.SpecialFX example when I have time. (Or better yet make a new XEffects version specifically for this multiple-pass technique).

Good luck.

Posted: Mon Jun 23, 2008 3:07 am
by christianclavet
Thanks Blindside. So it could work as a "pre-render" solution (as it create some kind of "realtime" ligthmap? (From what I can understand)

If I could use it, I would like to use it with the IRRcg (Normal maps).

I would like to have shadowing with normal mapped models (and some static meshes that have pre-rendered lightmaps (occlusion shading perhaps). I plan to use normal mapping on everything in my project.
(Millions poly details environnement & character baked in a normal maps), so the detail would look great.

My first prototype would not use that, but I really plan to use that in the next release of the prototype.