Jump to content

[SOLVED] Linking texture atlas and camera position


photo

Recommended Posts

Posted

I am attempting to get my Grass_impostor_base to show the correct image based on camera position. For example: The camera is viewing a tree impostor from the side and it's standing upright. As the camera travels up and over the tree impostor, the texture atlas image fades from the side view to the top view of the tree.

 

I've noticed the Port Angeles demo trees' Far LOD impostors do this. I've tried emulating this but cannot seem to get the atlas to line up.

 

My imposter grabber and texture parameter settings are attached.

 

Thank you.

 

Edit: upon further investigation, I think my issue is associated with the imposter's Vec4 coordinates. I can't seem to get them lined up properly. I would think that having a 4x4 atlas would need a Vec4(4.0f,4.0f,0.0f, 0.0f) to align each cell to the impostors, but this doesn't not work.

 

Edit #2: turns out I had the wrong setting on the Number of textures used. I had it set to 4 where it needed to be set to 1

post-1532-0-45573100-1431537999_thumb.jpg

post-1532-0-04352200-1431538001_thumb.jpg

post-1532-0-05621200-1431538140_thumb.jpg

×
×
  • Create New...