Devil Shadow System
Blitz3D Forums/Blitz3D Programming/Devil Shadow System
| ||
Why can't I hide entities when I'm using the Devil Shadow System? |
| ||
the entity comes automatically qualified from the motor of the shadows, would have to insert a flag in the object in order to hide in way permanete the object and to create one small function of for this ;) you ask support DevilChild |
| ||
hi sorry, thats one of my tiny dis-compatible bugs. i guess you have to use entityalpha ..., 0 yet *sorry* and deleteshadowcaster() |
| ||
Does my gfx card have to support bump mapping for this engine? |
| ||
yes. but cards which are supporting stencil buffers are supporting bump mapping. |
| ||
Not true ... my card supports both yet continues to fail due to your use of bumpmapping. Stevie. |
| ||
On my notebook Ati x700 bump mapping (DSS 1.2) works fine but on my gf6600 not. |
| ||
i dont know if it is your graphics card or the dx7 wrapper of tom. i think some problems could be caused by toms dx7 wrapper (i dont know) if you have these problems, just comment everything out which contains words like 'enbm' or 'bump'. there are only a few lines... |
| ||
But then when I want to show the entity again it doesn't have shadows. :( What I want to do is if the entity is far enough off screen it is ignored by the shadow system (so it doesn't bother even building the shadow volumes). When I have 1000+ entities with 400+ polys each (50 entities is about the max I expect to be on screen at once), I don't want a shadow mesh to be updated for every single one of them. |
| ||
I have successfully allowed a shadow to be turned on and off without erasing the shadow data (does NOT turn the entity on and off - use "EntityAlpha". By not automatically using "EntityAlpha" it allows you to do some LOD stuff a.k.a. not having entities more than a certain distance from the camera casting shadows but still have the entity visible). The way I did it bypasses the shadowvolume creation, thus saving processing time and not drawing the shadow. I added these two commands to "DevilShadowSystem.bb" Function HideShadowMesh(ent) For etem.ETE_Mesh=Each ETE_Mesh If etem\ent=ent Then etem\hidden=True Next End Function Function ShowShadowMesh(ent) For etem.ETE_Mesh=Each ETE_Mesh If etem\ent=ent Then etem\hidden=False Next End Function Added the field "hidden" to the ETE_Mesh type in "ShadowVolumes.bb" Type ETE_Mesh Field ent,hidden Field cnt_tris, tri.ETE_Triangle[ETE_MaxTriang] End Type And added a IF/Then to the "UpdateVolumes" function in "ShadowVolumes.bb" Function UpdateVolumes(light, parallel = False, top_caps = True) light_x# = EntityX(light, True) * (1 + parallel * 1000000) light_y# = EntityY(light, True) * (1 + parallel * 1000000) light_z# = EntityZ(light, True) * (1 + parallel * 1000000) For etem.ETE_Mesh = Each ETE_Mesh If etem\hidden=False; <---Added "If" here cnt_tris = etem\cnt_tris For v = 0 To cnt_tris etet.ETE_Triangle = etem\tri[v] ... Next EndIf; <---And "EndIf" here Next End Function Please verify that my modifications don't cause problems (I don't seem to have any). |
| ||
verified :) in my eula is a special permission for mods ;) cya |
| ||
Hi all, I've been trying to incorporate the shadow system into our WIP game (Gizmo) and I've been getting strange problems. The demos work fine, but when I try the same simple tests in Gizmo, the results look like they've been 'turned-inside-out'! It's a z-buffering problem by the looks of it, with faces further away appearing in front of those closer to the camera. Any idea what could be going wrong? Thanks. |
| ||
i know those problems form the dss 0.6 version. the 1.35 update should not do this. please send me a screenshot with the error :) |
| ||
Out of interest, is it yet possible to have a shadow caster without self shadowing? |
| ||
no. except if you make it bright using the 1 flag |
| ||
Thanks a lot for the reply. Sorry for all the questions. Is it possible to have a low-poly model for shadow casting only, and not be visible? For example, a low poly human would cast a shadow on the environment, whilst a normally lit human would walk around in the same position. |
| ||
i dont think so. i would implement a lot more features if there wouldnt be that many limitations by blitz... |
| ||
Just to mention GF6600 and GF6800 have a hardware restriction: non square non power of 2 textures will fail Perhaps thats a reason its going wrong on that end ... |
| ||
your 2 demos are doing an amazing "memory error"...just let you know about it |
| ||
well, there is no bugfix without a bug! you may turn your debugger on and see what line tells you an error. |