level of display using render to texture

ok in short im trying to achieve a LOD with the render to texture module. my thought Process is that an object off in the distance does not really change much. when your looking at it and step to ether side it wont change much so a video texture with a low frame rate and low resolution wont be too taxing on your system.
as your character approaches the video texture obj it will seamlessly swap out with the real object. making the pop up negligible.

this is what i have so far

I’ll upload a blend when i can find a good spot to do so lol any suggestion of some free web space?

  1. In short what i need to do is add ability to get plane angle and set camera angle on multiple planes. so i can use the same object over and over.

  2. make the process easy to implement like make it where the object you wish to have auto swapped with have a property of LOD = True for a LOD script. so have the script running in the scene and all the objects that have that property will get sent to a green room to get its picture taken so to speak.

im posting here because i don’t understand the video texture module very well and have kind of hit a wall on how to duplicate and edit each plane so it looks good any advice or ideas would be Appreciated :slight_smile:

update on my progress

Pretty cool. Have you done any benchmarks to see what kind of speedup it provides?

i had a monkey head with about a million faces on it with the normal game render it gave me about 700 fps and when using the render to texture it jumped to 1400 fps. but that speed up was with a 100% of it being rendered through the video texture module isn’t the bet example but it shows that the fps does improve. i also use the camera clipping to cut off anything past the plane.

is this separate layer rendered on another thread?

splitting a scene into multiple layers could end up with a tremendous speed boost.

8-threads tearing at a scene…

1 “physics scene”

Nifty. If I understand correctly, it’s like a billboard system that generates new angles in semi-real time?
Less performance, but without the aerial view problem.
It would be interesting to see a benchmark.

Or do I have this completely backwards.

ok hope that clears up what im doing and sorry for saying umm so much lol the benchmark isnt as clear as my original i did(but dont have it any more) but u will get the idea. should double fps for objects outside of the main scene view because that resolution is around half of the normal render. the objects in the clipping distance the view of the main cam will be treated like normal. i would hope i get it set up so i can get 20% of the scene in the main view and 80% of the scene in the video texture view :slight_smile:

oh and this is not using its own thread its just as i explain in the video

I think the benefits on the rendering side will probably get wiped-out by the additional logic processing, required to properly orient the rtt cameras, and the proxy planes, and then rendering the same scene multiple times (for each angle view).

Also, framerate delta doesn’t really matter when you’re still in the 100s range - It’s only below 60 where the slowdown actually matters, and requires optimization.

i kinda gave up on the method in my first video where the camera orbits an object to give multiple angles of it. im having a problem stress testing without crashing lol any ideas on a way to stress my system? any thing much over 2 million faces crashes blender.

Your idea is great!
You realize you still render the 2nd scene, right? Your scenegraph counts all objects too!
So you could use a background scene with low poly versions of the objects! So you wont have the triple rendering?!

Can the resolution of the background seen Be reduced? If so that would be a better way to go.

ok i set it up Similar to what torakunsama was suggested and it solved that patches of blue when i move the camera but im having problems lowering the resolution. i googled it and bge.render.setWindowSize(width, height) does not seem to work. any idea what im doing wrong?
http://www.blender.org/documentation/blender_python_api_2_68_2/bge.render.html#bge.render.setWindowSize

i got windows 7 intel i7 3.5Ghz ati radeon HD 7970 graphics and 16gb ram if that helps

You can’t lower the resolution of a background scene. That’s why I suggested to use very low poly models on the background, and use near clip on it for the low poly models not to be rendered with the hi poly.
So the background scene clipping starts where the foreground’s ends!

ya i was using the camera clipping already with my video texture set up. :slight_smile: the main reason for me wanting to cut the resolution instead of making a low poly model is well im lazy lol thought it sounded like an easy way to make lower quality versions of game assets will little effort lol

hey Goran your pretty good with the video textures right? how would u make the texture update more often im still having a trouble getting rid of the blue background from popping through when i move the camera :frowning:

This is a cool idea, but I don’t think it’ll scale well to complicated scenes with a lot of different objects. Probably better to pre-render billboard textures from multiple angles for each object, store them at a low resolution in a large texture page, and then select the best one according to the viewing angle. That’s actually a very common technique used in a lot of games.

textureLOD.blend (529 KB)
this is one of my blends of what i got so far.
im using one scene with 2 cameras and a video texture with the resolution chopped down.so there is not doubling of the scenes. i still have that darn line.
is there a way to hide a object from one camera and not an other?

textureLOD 1.0.blend (550 KB)
ok i got rid of the line and i would think that i am done with what i set out to do. now if i could have some people help stress test it to see how much it will benefit to use it. im having trouble getting my system to stress without crashing blender :\ anyhow u should let me know if it improves performance. oh and to turn up the resolution turn up the capsize in the script.