December 04, 2020, 02:09:51 PM

Author Topic: Ideas - crazy ideas to improve render in blitz  (Read 560 times)

Offline Santiago

  • Sr. Member
  • ****
  • Posts: 283
  • Blitz3d
    • Indiesoft
Ideas - crazy ideas to improve render in blitz
« on: April 14, 2020, 01:53:28 PM »
Hello, I was thinking of some ideas to optimize the games.

Optimize-mesh-function ()

generate a function, which generates LODs of entities that we originally loaded as high detail and high poly.

3dsmax has very simple functions to optimize mesh. some simply join vertices that are close together, another would be to generate a textured plane. but the idea would be to avoid that the developer has to model LOD's of each object of the game.

 :-X ┬┐What do you think of this idea?

-----------------------------------------------------------------------------------------

3 RENDER (Distance / resolution)

Use 3 camera renders per frame, where each range is assigned a distance and a render resolution.

1. The close render uses a render of 100% of the original resolution of the game.
camerarange (0.100)

2. The render of the medium uses half the resolution of the game, camerarange (100,1000)

3. the far render uses .25 times the original resolution.

Of course it would be necessary to dump these 3 textures (vram) on 3 planes? to be able to capture them and see them as if it were a normal render?
I see that modern engines do this kind of effect. and they also do a Render-scale, which is very effective.

 :-X Do you see it achievable? or technically possible in blitz ?.




Offline degac

  • Full Member
  • ***
  • Posts: 159
    • graphio.net
Re: Ideas - crazy ideas to improve render in blitz
« Reply #1 on: April 14, 2020, 02:36:32 PM »
Hi,

I don't use Blitz3d from ages, but I think you can 'store' 3 different entity - based on LOD - and 'show' the one you want based on the distance from the Camera().
This is sure not automatically managed by the 3d-engine built in Blitz3d, but at code level it should feasible.

Costs:
- need to calculate (maybe not constantly...) the distance of each object - or use 'fast and less accurate function
- Vram cost? It's nowadays a real problem?
- overall speed compared to GPU power?
If there's a problem, there's at least one solution.
www.blitzmax.org

Offline Matty

  • Hero Member
  • *****
  • Posts: 1258
    • MattiesGames
Re: Ideas - crazy ideas to improve render in blitz
« Reply #2 on: April 14, 2020, 02:45:59 PM »
Maybe rather than distance, the area occupied in screen pixels approx.  So...if the object occupies only afew pixels high, why use the most detailed model?

Offline degac

  • Full Member
  • ***
  • Posts: 159
    • graphio.net
Re: Ideas - crazy ideas to improve render in blitz
« Reply #3 on: April 14, 2020, 02:58:20 PM »
Maybe rather than distance, the area occupied in screen pixels approx.  So...if the object occupies only afew pixels high, why use the most detailed model?
But this means you need to render once, than calculate the area (ReadPixel) and then clear screen, and re-render using the 'right' model.
It's quite time consuming.
If there's a problem, there's at least one solution.
www.blitzmax.org

Offline Matty

  • Hero Member
  • *****
  • Posts: 1258
    • MattiesGames
Re: Ideas - crazy ideas to improve render in blitz
« Reply #4 on: April 14, 2020, 06:12:29 PM »
Not at all.  Cameraproject the top and bottom vertex on the model and get the screen coordinates and check the abs distance(height).  No render needed at all. Just a quick calculation.

Or even better tformpoint the bounding box, camera project these positions into screen space and check the area width and height of screen bounding box.

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal