Light through the window

Software: Away3D 4.x

yyovchev, Newbie
Posted: 28 July 2012 11:05 AM   Total Posts: 29

I wonder which method is lighter for rendering. Texture of window on plane and texture projection on every window or imported model of window ( just flat frame nothing special )

   

Richard Olsson, Administrator
Posted: 28 July 2012 01:29 PM   Total Posts: 1192   [ # 1 ]

I’m not sure why you need texture projection. If you can just stick with a regular plane with a texture that’s very cheap. However, a model of a window is similarly cheap, because both result in a single render call with a simple material and a texture. If the modeled window does not require a texture, but just a simple color material, it might actually be slightly cheaper.

The real performance gain comes if you merge all static geometry that have the same texture into a single Geometry instance though, because that helps both with traversal as well as sorting on the CPU (when you’re using alpha transparency) and with the number of render calls to the GPU.

You can merge meshes’ geometries using the Merge class.

   

Richard Olsson, Administrator
Posted: 28 July 2012 01:31 PM   Total Posts: 1192   [ # 2 ]

Maybe I misunderstood what you mean with “lighter”? In that case, please elaborate on what you’re trying to do and what exactly your question is.

   

yyovchev, Newbie
Posted: 28 July 2012 08:02 PM   Total Posts: 29   [ # 3 ]

By “lighter” I meant is more easy for calculating. My idea for using texture projection is because light do not pass through the alpha channel of the window texture and the shadows are not correct. I think it`s more easier just to make model of a window . Thanks!

   

Richard Olsson, Administrator
Posted: 29 July 2012 09:10 AM   Total Posts: 1192   [ # 4 ]

Ok, well performance-wise (as in easier to calculate) the window model approach is definitely a good choice. And it will also look best and work well with shadows, so you’re absolutely right to choose that approach.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X