Skip to main content
gamedev.net
🔒 Locked

Hardware Transforms

Started by Peter Cunliffe Oct 11, 2000 at 6:00 PM 6 replies 300+ views
Original Post
Peter Cunliffe
Peter Cunliffe
When I enable Hardware T&L lights turn off. I understand that Hardware Lighting is not ready yet but can Hardware Transforms & normal lighting coexist in the current beta?
Thanks in advance for helping!Petrovski
ChrisE
ChrisE
I have only done directional lighting with T&L so far.
I''ve also found a major problem when combining T&L and the regular pipeline... the zbuffer values do not match.
You''ll have to wait until I solve this before combining hardware and software T&L in the same scene.

Author of Power Render (http:/www.powerrender.com)
Peter Cunliffe
Peter Cunliffe
Thanks for your reply Chris.

You indicate that Directional Lights should work in Hardware
or mix with Hardware Transforms but I can''t get it to work.

I am using DIRECTIONAL_LIGHT.

I am calling PR_SetD3DPipeline(1) before creating Entities
in Main loop.

If Directional Lights don''t work in hardware at all but mix ok,
do I have to use PR_SetD3DPipeline(0) somwhere before lights?

BTW FPS for my test scene has doubled with the Hardware Transforms!
Thanks in advance for helping!Petrovski
ChrisE
ChrisE
Another thing I''ve found is that scaled objects did not light properly because the normals were getting scaled as well.

PRO Edit is the program you should be testing with. If you can load your object and turn on T&L from the menus it should work within your own application.

Chris

Author of Power Render (http:/www.powerrender.com)
Peter Cunliffe
Peter Cunliffe
OK Thanks Chris

I find that I need to change render methods from Gouraud to Flat
to get PROEDIT to display models ok with Hardware Transforms
which is fine till the next Beta but when I view the same models
in my Project they are still dark as if I hadn''t changed them
to FLAT rendering.

There must something I need to add to my code regarding Hardware
Transforms other than just the PR_SetD3DPipeline(1); or do I
remove all/some code regarding Lights since you say they don''t mix at present?

Thanks Again

Thanks in advance for helping!Petrovski
Peter Cunliffe
Peter Cunliffe
I''ve found the causes of all my "dark" models with Hardware Transforms.

1) FlipFaceNormals not working.

2) Double sided Textured planes not working.

3) Needed to set all models to Flat Textured instead of Gouraud.
Thanks in advance for helping!Petrovski
ChrisE
ChrisE
1) You cannot modify an object after it has been loaded using the T&L pipeline. All the data is stored in vertex buffers and you can''t change it. This means the FlipFaceNormals will not affect the vbuffers.

2) I have fixed the problems with front/back culling, and have added an option in the material structure to make it double sided. You can no longer have different materials on each side of a face.

3) I don''t know about the flat/gouraud, but I suspect it''s from the scaling. If any of your objects have a scale in the matrices it wouldn''t light correctly. This has been fixed already.

The T&L code in PR3 never made it past the experimental stage. The next beta of PR4 should have everything working correctly and capable of changing pipelines multiple times per frame.
Now that I have the terrain engine running with T&L I want get the objects working perfectly as well so I can do the entire scene with it.

Chris
Author of Power Render (http:/www.powerrender.com)
Peter Cunliffe
Peter Cunliffe
Thanks for your help Chris.

Looking forward to the next beta.
Thanks in advance for helping!Petrovski

Topic Locked

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

Sign in to reply to this topic.