couple of questions

Blitz3D Forums/Blitz3D Beginners Area/couple of questions

stayne(Posted 2006) [#1]
1) What is the best way to do static shadows for trees, buildings, etc. on a Blitz terrain?

2) For a 512x512 terrain, would it be better to use a native Blitz terrain via heightmap, or convert a heightmap based Blitz terrain to a mesh? I've seen the code to do that, but there is no LOD and coding LOD is way down the road for me. I imagine a 512x512 mesh terrain would be pretty poly intensive.


GfK(Posted 2006) [#2]
1) It depends what your 'goal' is.

If you want something basic but very, very fast, use a simple quad with a basic (graduated circle) shadow texture applied. If you need something more realistic then you might want to look at some of the shadow systems by other Blitz users.

2) For a terrain made of 512x512 quads, you're looking at around half a million polys. How you do it, depends on the level of detail you need.

Blitz terrains are very fast - even if you use 1024x1024, but they're fairly limited in their use, and you'll need to get around how to stop the player wandering off the terrain and falling into infinity.


stayne(Posted 2006) [#3]
Thanks Gfk. I'm looking for something basic, but not too basic. Just a rough image of a tree for instance, blurred a bit. My project has time of day but no sun rotation so the shadow will stay in one spot. I have swift's shadow system but it does not cast shadows onto Blitz terrains... which is why I'm going to need to find another option. The shadows being included on the terrain's lightmap is what I'd like to accomplish.

Half a million polys... that's waaay too many. I figured it would be that high. Stopping the player from wandering off is not a problem. I figure I'll just use a giant invisible quad for that.


Stevie G(Posted 2006) [#4]
This any good?

http://www.blitzbasic.com/codearcs/codearcs.php?code=1462

I don't have sswifts system but after talking to him about it you could create a large mesh terrain out of , say 16 x 16 sections. Blitz will cull whatever is out of the camera view fostrum and sswifts system will do the same in terms of shadows. May be plenty fast enough.

Stevie


stayne(Posted 2006) [#5]
Thanks Stevie, but all my meshes are types, and that code requires the meshes to be indexed in an Dim array.