Archived

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

Phillip Schuster

Convert Face Vertices to World Space

Recommended Posts

Hi !!

I am working on Volumetric Fog for Power Render. Everything works fine, I can create a texture during runtime, and render it on the walls.
Now, in order to draw the texture (the fog-map), I have to test if a ray from a vertex of the wall to the camera intersects the Volume. The only problem I have is, that I cannot get the world-space coordinates of the faces 3 vertices !! I need these vertices in World Space, because the camera-source and the Volume Sphere is in World Space (and the ray too).

I have tried the following:
PR_MatrixIdentity(PR_ViewMatrix)
PR_TransformEntity.
I also set the segments to be always visible.
It does not work.

I have set up a function which projects world-coordinates in the screen. A small pixel shows where the coordinate is on the screen. This works fine for all Lights, and so on. But when I Show the vertices of the room on the screen they aren't at the correct positions !!

Anyone knows how to convert these damn vertices to World Space. This is really a major problem with Power Render !!

CHRIS : PLEASE, PLEASE provide a simple function in Power Render 3, which I give a pointer to a vertex of an entity, and which returns this vertex in world space. This would make a lot of things easier, especially with collision testing.

Thanks, Phillip

Share this post


Link to post
Share on other sites