Archived

This topic is now archived and is closed to further replies.

Alpha, Vertex Buffers and World/Camera space

This topic is 6352 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

3 questions 1) Can someone write up a tutorial on how to do alpha texture blending with the diffuse material color? No matter what I try, I can''t change the alpha intensity. It seems either I have no alpha, or 50% alpha and that is it... I can''t get anything else. I know I''m doing something wrong, and I heard others on this board running into the same problem. 8) 2) What is the advantage of using a vertex buffer? Does it allow you to do T&L? I use draw primitive, and I was wondering if converting to a Vertex Buffer would give me any benefits (I don''t have a Geforce) 3) Is it better to generally move the camera within world space, or is it better to move the world around the camera? I made a skybox, but it seemed I could only position and align it when I transformed and scaled world space, then "Sphere->Draw()" it. I was using a D3DXSimpleShape. It doesn''t appear the simpleshapes have a matrix inside it (that I had access to) to manipulate.

Share this post


Link to post
Share on other sites
1) I don''t have time right now, I haven''t even been able to finish my particle tutorial. Someone else will have to write this one (Unless you feel like waiting)

2) Depending on what you are rendering you should be able to see an increase of performance by switching to vertex buffers even if you don''t have T&L. The benefits with the vertex buffers is that it allows Direct3D to handle the memory which means that you don''t have to wait for the data to move from the buffer to the card until you change it again as is done with DrawPrimitive. With vertex buffers Direct3D can also store transformations between renderings so that two renderings from the same mesh with no change of transform matrices will not recompute the transforms.

3) The skybox example is a special case, it should always be centered around the camera. So when rendering the skybox set the world matrix to translate the skybox to the camera position. The view matrix is set to the normal camera matrix. For the general case I suggest moving the camera in world space and not the world in camera space as it is easier to think that way. From Direct3D''s point of view it has absolutely no difference.

- WitchLord

Share this post


Link to post
Share on other sites