Jump to content

  • Log In with Google      Sign In   
  • Create Account

Questions about Environment Mapping


Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
No replies to this topic

#1   Members   -  Reputation: 102

Like
0Likes
Like

Posted 30 April 2014 - 04:48 AM

Hi,

I try to do Environment Mapping (in OpenGL). I have some questions about how it works.

The scenario I think I now how to do is the following:
If I have a simple mirror (for example) I need to calculate the virtual viewers position and render the whole scene from that position to a texture.

 

The problems I have now are the following:

- How can I compute the projection matrix if I have convex or concave or more complex surfaces, i.e. a surface with waves?

- If I render a cubemap for a whole object, should I render each side separatly or have a projection matrix which has a 360° FOV?

- Can I program this using a recursive approach:

SceneNode::draw(int pass) {
    switch (pass) {
    case 0:
        //activate texture framebuffer
        scene.render(pass+1);
        //activate standard framebuffer
        render();
        break;
    case 1:
        render();
    }
}

somewhat of a pseudocode... Would that work with OpenGL?

 

I hope you can help me clarify my issues and maybe solve them...






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.




PARTNERS