Some questions

View previous topic View next topic Go down

Some questions

Post by octane468 on Mon Aug 08, 2011 10:33 am

Hey there! First of all, let me say your engine is quite incredible. So I've got some questions about this project of yours Razz
1.) As far as I know, each mesh can only have one material. You divide your map in chunks, so each chunk is a separate mesh. So, how is it possible you have different bump maps for most of your blocks? (It's one mesh-one material in the Unity 3D Game Engine, not sure how you did it though)
2.) Again, not sure how you did it, but; do you generate chunk mesh data in another thread as I have noticed very little lag present.
3.) Lighting - how do you do it? I have heard it's flood-fill, but mind explaining this a bit more or giving a link to a good tutorial?
Thanks a lot for answering.

octane468

Posts : 3
Join date : 2011-08-08

View user profile

Back to top Go down

Re: Some questions

Post by Slaihne on Mon Aug 08, 2011 12:42 pm

Hi there,

1. I use DirectX 10. One of the main reasons is Texture Arrays. Imagine a single texture that contains 'pages' all the same size, and all mip-mapped properly. It's like a 3d texture but without the 3d mip-mapping (where it blends layers together). Each 'page' is a single texture for a block face. I (basically) use 4 such texture arrays and combine them using a custom pixel shader. Color, Normals, Height and Specular. So, the whole mesh for a chunk uses 4 textures as such but the vertices contain a 'page number' to say which 'page' to reference.

2. The main thread only issues draw calls (and uploads already generated meshes to the GFX card). Everything else is done on other threads.

3. The thread http://blokworld.forumotion.co.uk/t6-lighting-technique goes into a bit of detail about the lighting. This doesn't cover everything in complete detail since there are a good few optimisations that can be performed.
avatar
Slaihne

Posts : 264
Join date : 2011-03-17
Age : 49

View user profile

Back to top Go down

Re: Some questions

Post by octane468 on Mon Aug 08, 2011 10:12 pm

Well, that cleared some things up, thank you Very Happy

octane468

Posts : 3
Join date : 2011-08-08

View user profile

Back to top Go down

Re: Some questions

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum