logo
Main

Forums

Downloads

Unreal-Netiquette

Donate for Oldunreal:
Donate

borderline

Links to our wiki:
Wiki

Walkthrough

Links

Tutorials

Unreal Reference

Usermaps

borderline

Contact us:
Submit News
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Crappy software renderer (Read 1148 times)
yrex
Betatester
Offline


Oldunreal member

Posts: 181
Joined: May 6th, 2015
Gender: Male
Crappy software renderer
May 8th, 2018 at 1:49pm
Print Post  
Something I've done some time ago. It sucks, but... well, the point is to show that it can be done, and I've never seen anyone else doing something like that before.

https://www.youtube.com/watch?v=0jyHSKZhKWU
  

Quality content | mail me instead of PMing: ampoyrex(a)wp(.)pl
Back to top
 
IP Logged
 
Smirftsch
Forum Administrator
*****
Offline



Posts: 7913
Location: at home
Joined: Apr 30th, 1998
Gender: Male
Re: Crappy software renderer
Reply #1 - May 8th, 2018 at 4:20pm
Print Post  
if you really wrote an own software renderer here, this is quite impressive, it's a hard and very difficult piece of work!
  

Sometimes you have to lose a fight to win the war.
Back to top
WWWICQ  
IP Logged
 
AlexNitro44
Junior Member
**
Offline


Oldunreal member

Posts: 59
Location: United Kingdom
Joined: Jun 9th, 2017
Gender: Male
Re: Crappy software renderer
Reply #2 - May 12th, 2018 at 7:05pm
Print Post  
Video looks fairly decent actually, except for masked textures being opaque! It's a shame I can't try it out, gives me a GPF at UOpenGLRenderDevice::Unlock every time, no matter what bit depth, resolution and fullscreen settings I choose. (It DOES use OpenGLDrv.OpenGLRenderDevice, right?)

As for why this hasn't been done before, it's probably because Unreal's software renderer is so good, there's likely little room for improvement. Translucent surfaces don't slow the renderer down as much as in games like Half-Life (even with FastTranslucency disabled). The only real issue with the stock render is how it handles meshes: sometimes they are drawn when not needed, other times they disappear or are drawn on top of BSP surfaces.

Heck, Unreal's software render is faster than Direct3D on some era-correct cards such as the ATI Rage Pro & RIVA 128. Today, there's generally little reason to write a software renderer, given that even integrated graphics can do a far better job and run much faster.

Also, the use of Basic and X86 assembly together is quite unusual.  Smiley
  
Back to top
 
IP Logged
 
yrex
Betatester
Offline


Oldunreal member

Posts: 181
Joined: May 6th, 2015
Gender: Male
Re: Crappy software renderer
Reply #3 - May 12th, 2018 at 10:23pm
Print Post  
Okay, so if you feel masochistic enough to actually try to run this...

- Yes, choose OpenGLDrv.OpenGLRenderDevice (it has nothing to do with OpenGL).
- It will only work on Unreal 226 (Gold).
- Use 512x384, other resolutions may crash for some reason.
- Use 32 bits.
- Both fullscreen and windowed mode should work, although the second one is a safer bet if your computer is less than 9 years old.
- Try opening multiple maps, or the same map for the second time.
- I have UseDirectDraw=true and SlowVideoBuffering=false if it matters...

The reason for making a software renderer is that once you've already made it, there's lots of cool stuff you can do with it relatively easily:

- Postprocessing such as bloom or waving screen when you're underwater. Decreasing saturation as brightness decreases. Color look-up tables. Maybe even a crude depth of field if you have a Z-buffer. Low color depth simulation with dither (an "8-bit" filter). A brightness/contrast/gamma filter.
- Or you can redirect the output to e.g. a console window or some other weird stuff.
- You can dither meshes and sprites just like in the '96 betas.
- Water and glass surfaces warping what's behind them, just like in UE3.
- Perspective-correct and correctly clipped meshes.
- Alpha blending, of course.
- Changing the way translucent/modulated mode works e.g. to simulate Glide-style translucency.

Indeed, the Unreal's software renderer is faster than the hardware ones for me, especially when drawing lots of dynamic lights and fog. My guess is that it's because of constant reuploading of lightmaps and fogmaps, which is a costly operation. Perhaps sending all lightmaps as one big texture would make it faster?
  

Quality content | mail me instead of PMing: ampoyrex(a)wp(.)pl
Back to top
 
IP Logged
 
AlexNitro44
Junior Member
**
Offline


Oldunreal member

Posts: 59
Location: United Kingdom
Joined: Jun 9th, 2017
Gender: Male
Re: Crappy software renderer
Reply #4 - May 13th, 2018 at 8:14pm
Print Post  
Thanks, managed to get it to run - 400x300 proved to be most stable, but 512x384 worked too. Results were beautiful:



Over ~1200 BSP nodes causes things to disappear, starting with the HUD, then models and finally level geometry. Things can look crazy when that happens, especially if a skybox is in view.



Can anyone say modern art?  Cheesy

I can agree on fog and dynamic lights being massive performance killers, turning those effects off help greatly.
  
Back to top
 
IP Logged
 
lowenz
Full Member
Betatester
***
Offline


Unreal Veteran

Posts: 222
Location: Berghem Haven
Joined: Dec 28th, 2007
Gender: Male
Re: Crappy software renderer
Reply #5 - May 17th, 2018 at 7:14pm
Print Post  
yrex wrote on May 8th, 2018 at 1:49pm:
Something I've done some time ago. It sucks, but... well, the point is to show that it can be done, and I've never seen anyone else doing something like that before.

https://www.youtube.com/watch?v=0jyHSKZhKWU

Amazing!
  

The task is not so much to see what no one has yet seen, but to think what nobody has yet thought, about that which everybody sees - E.S.
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint
Bookmarks: del.icio.us Digg Facebook Google Google+ Linked in reddit StumbleUpon Twitter Yahoo