Skip to main content
GameDev.net gamedev.net
🔒 Locked

Various Questions

Started by Drath Oct 8, 2002 at 11:36 AM 4 replies 300+ views
Original Post
Drath
Drath
Many questions... 1. What is the best way to tackle lighting. I''ve been thinking of using the old 2d lightmaps but if I use them, what is the best ratio of world coordinates to image size. I want detail but I don''t want massive levels. Also, what is the best way to add dynamic lighting to light maps? Render a seperate texture the same size and blend it? I understand how to but I just don''t know the practicality of it all! 2. What is the best way to use T&L verticies. I read that UT2k3 uses them for the multitudes of static objects but how exactly? I still should have thought a ton of transformation would be needed for the objects are stored externally just with, presumably, a position and oriantation within the level. 3. How can I go about using vertex and pixel shaders practically? I''ve read about them, I''ve experimented with them, but what is the best way to use them in a real-time application? I heard that pixel shaders are often used to blend lightmaps, bump maps and textures together. I really need to know how efficient they are. 4. How should I implament shadows? There are many techniques but I have no idea which is the best one and how to implament it into an application''s rendering phase. 5. What is the best way to cull? I have made myself a CSG level editor and I was thinking of using portals between large sectors, and because there are solid things in the middle and objects, frustrum cull using the outline of them for it. Would that be fast enough or should I go for BSP? This is primarily for indoor. 6. Finally, should I bother to learn DX8 or is ) on the way very soon? I really need a site for intermediate tutorials.
Fluid FX
Fluid FX
hm sounds to me that you kinda need to read a bit more tutorials.. some of these questions are explained thousand times, many shadow techniques have been explained differently, some not totally cause they are new tho ;-)

lightning is explained several times..

try google.com search on this site?
Drath
Drath
One more question...

7. Does anyone know of any good sites for DX matricies? I really need various tips and tricks and ideas for usage.
Fuzztrek
Fuzztrek
Er.. yes. I agree with fluid FX. A lot of your questions, while perhaps may not be totally explained, are at least addressed in the DirectX 8.1 SDK. Also, there are TONS of sites out there with tutorials on intermediate and advanced topics. Good sites to look at are hosted sites on gamedev and on flipcode. The search engine is also a glorious tool =)

¬_¬
Drath
Drath
Yes... but I have not seen so much preformence related articles. I know or understand most of the techniques, I just have no idea about how long the processes take and I havn''t found any specific information on thet. I will try a couple of searches though...
Jim Adams
Jim Adams
To answer some of the questions or give some guidance:

quote:

1. What is the best way to tackle lighting. I''ve been thinking of using the old 2d lightmaps but if I use them, what is the best ratio of world coordinates to image size. I want detail but I don''t want massive levels. Also, what is the best way to add dynamic lighting to light maps? Render a seperate texture the same size and blend it? I understand how to but I just don''t know the practicality of it all!


Small textures work perfectly, plus you can reuse lightmaps over and over for various surfaces (instead of one lightmap per surface). I suggest starting small, like at 64x64, then move up if you find it''s not working out for you. Check out Quake and Quake 2 sites for information on lightmaps.

quote:

2. What is the best way to use T&L verticies. I read that UT2k3 uses them for the multitudes of static objects but how exactly? I still should have thought a ton of transformation would be needed for the objects are stored externally just with, presumably, a position and oriantation within the level.


If you''re using DX 8+, then you''re using T&L.

quote:

3. How can I go about using vertex and pixel shaders practically? I''ve read about them, I''ve experimented with them, but what is the best way to use them in a real-time application? I heard that pixel shaders are often used to blend lightmaps, bump maps and textures together. I really need to know how efficient they are.


If you''re using DX8+, then you''re already using vertex shaders natively (DX uses vertex shaders for all rendering, whether it''s your shader or a FVF shader). Speed-wise, they don''t slow anything down.

quote:

4. How should I implament shadows? There are many techniques but I have no idea which is the best one and how to implament it into an application''s rendering phase.


Lots of ways, but do a search for Carmack''s Reverse for a shadow method that''s used a lot now-a-days.

quote:

5. What is the best way to cull? I have made myself a CSG level editor and I was thinking of using portals between large sectors, and because there are solid things in the middle and objects, frustrum cull using the outline of them for it. Would that be fast enough or should I go for BSP? This is primarily for indoor.


Depends on geometry. There''s BSP/PVS, Octree/quadtree, raycasting, etc. BSP is common, with octree/quadtree being used quite a bit also.

quote:

6. Finally, should I bother to learn DX8 or is ) on the way very soon? I really need a site for intermediate tutorials.


Yes, learn it. DX9 is based off DX8, so you won''t lose anything when that comes out. DX will be around for quite a while - video card manufacturers are not going to suddenly stop supporting it when that''s of their marketing strategy. As for sites to check out - you''re already here



Jim Adams
home.att.net/~rpgbook
Author, Programming Role-Playing Games with DirectX
and Focus On: Advanced Animation with DirectX

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.