Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 14 15 [16] 17 18 ... 20

Author Topic: Dfhack: Rendermax (and it's subplugin light)  (Read 151569 times)

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: Dfhack: Rendermax (and it's subplugin light)
« Reply #225 on: February 02, 2015, 06:05:57 am »

TWBT stealing my fanbase ;(

In all seriousness: i'm a bit stuck myself. I would love to increase feature list (like real raytraced lights with metals being shiny and ambient lights) but it's already slowish+ TWBT rendering everything multiple times...

Maybe i'll talk to my graphics expert'ish friends and they could suggest some fancy algos to boost everything... But in the end it will never be as fast as vanilla df.

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Dfhack: Rendermax (and it's subplugin light)
« Reply #226 on: February 02, 2015, 06:48:04 am »

Will it be hard to take z-levels into account, so that it works better with twbt? Not to render lights for lower levels but rather just not to take lower tiles into account when calculating light for the current level. I'm storing tile 'depth' in bits 4-7 of the brightness (3rd) byte of the tile.

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: Dfhack: Rendermax (and it's subplugin light)
« Reply #227 on: February 02, 2015, 06:55:27 am »

Will it be hard to take z-levels into account, so that it works better with twbt? Not to render lights for lower levels but rather just not to take lower tiles into account when calculating light for the current level. I'm storing tile 'depth' in bits 4-7 of the brightness (3rd) byte of the tile.

I'm not sure in what order twbt and rendermax is called. It it's possible to figure out that it's trying to draw non-current level than a simple "do nothing" would increase performance greatly. I'll need to look into this because currently i have almost no idea how twbt even works with rendermax :)

Oh and another idea i had (with some help from Elle from irc) using quads in df to color tiles in 4 corners. I.e. if you have wall that is lit from one side and not lit from other, it should have nice gradient. One problem though df uses two triangles per tile with 6 points (instead of e.g. using vertex list with 4 vertexes and triangle list with vertex ids) so setting them becomes a cache nightmare and a real mess...

Edit2: can't seem to run twbt with rendermax at all... Is there some trick to it?
Edit3: Ah i heard it needs TWBT_LEGACY...
« Last Edit: February 02, 2015, 11:28:19 am by Warmist »
Logged

Baleur

  • Bay Watcher
    • View Profile
Re: Dfhack: Rendermax (and it's subplugin light)
« Reply #228 on: February 12, 2015, 03:46:07 am »

I really would love TWBT + Rendermax working together. Lighting is the final frontier in DF right now.
1. We now have multi-tile rendering. Success.
2. We now have individual tile overwrites, eventually every individual item can be unique. Success.
3. We now have a lighting engine that can simulate a day night cycle. Success.

When 1+2 can work with 3, it'll be a glorious day.
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: Dfhack: Rendermax (and it's subplugin light)
« Reply #229 on: February 12, 2015, 08:45:07 am »

Actually that is what I was trying to do (until i got sidetracked) 10 days ago.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Dfhack: Rendermax (and it's subplugin light)
« Reply #230 on: February 18, 2015, 02:53:48 am »

More like 16 days ago... :P
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

utunnels

  • Bay Watcher
  • Axedwarf
    • View Profile
Re: Dfhack: Rendermax (and it's subplugin light)
« Reply #231 on: February 25, 2015, 07:25:31 pm »

Maybe you can disable the light sources from the map edges? It looks really strange especially if you are playing a 1x1 map, when you get two bright edges.

Never mind, it seems to be a glitch with twbt enabled. I changed print mode to standard and it was fixed.
« Last Edit: February 25, 2015, 07:52:53 pm by utunnels »
Logged
The troglodyte head shakes The Troglodyte around by the head, tearing apart the head's muscle!

Risen Asteshdakas, Ghostly Recruit has risen and is haunting the fortress!

GhostDwemer

  • Bay Watcher
    • View Profile
Re: Dfhack: Rendermax (and it's subplugin light)
« Reply #232 on: February 25, 2015, 09:26:27 pm »

Just want to note that I use Rendermax to get lighting effects together with TWBT for text when I am playing the latest version of Masterwork (v6.2). In the GUI, I set print mode to STANDARD, enable Rendermax along with Creature Sprites and Item Graphics, and set Z-levels to 0. I don't care much for multi-level rendering anyway, it kinda confuses me sometimes. This combination looks amazing and works fine, I am getting 30FPS on a 20 year old fort with nearly 200 dwarves and way too many big stockpiles.

Screen shot:
Spoiler (click to show/hide)
(I love how the light coming through the clear glass and reflecting off the silver walls looks!)

Thanks for making this amazing plugin! And also thanks to Meph also for making Masterwork utilize Rendermax so nicely. Finally, a use for Large Gems!
Logged

Shonai_Dweller

  • Bay Watcher
    • View Profile
Re: Dfhack: Rendermax (and it's subplugin light)
« Reply #233 on: February 26, 2015, 04:08:53 am »

Just want to note that I use Rendermax to get lighting effects together with TWBT for text when I am playing the latest version of Masterwork (v6.2). In the GUI, I set print mode to STANDARD, enable Rendermax along with Creature Sprites and Item Graphics, and set Z-levels to 0.

You can get TWBT text with print mode set to Standard?
I thought it was an either/or option.
Logged

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Dfhack: Rendermax (and it's subplugin light)
« Reply #234 on: February 26, 2015, 04:46:41 am »

Just want to note that I use Rendermax to get lighting effects together with TWBT for text when I am playing the latest version of Masterwork (v6.2). In the GUI, I set print mode to STANDARD, enable Rendermax along with Creature Sprites and Item Graphics, and set Z-levels to 0.

You can get TWBT text with print mode set to Standard?
I thought it was an either/or option.

He's talking about DF 34.11, TWBT didn't use print_mode setting back then.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Dfhack: Rendermax (and it's subplugin light)
« Reply #235 on: May 04, 2016, 07:54:24 am »

Actually that is what I was trying to do (until i got sidetracked) 10 days ago.
Or a few more days than 10. :P
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: Dfhack: Rendermax (and it's subplugin light)
« Reply #236 on: May 04, 2016, 10:17:28 am »

Actually that is what I was trying to do (until i got sidetracked) 10 days ago.
Or a few more days than 10. :P

I did not have any success then... There were a few changes that might be relevant in the mean time. But can't say for sure when i'll have the time as this needs more time than small scripts and stuff.

Abadrausar

  • Bay Watcher
  • empowering ideas
    • View Profile
    • ♫♪♀HDFPS♂♪♫
Re: Dfhack: Rendermax (and it's subplugin light)
« Reply #237 on: May 04, 2016, 01:46:33 pm »

In all seriousness: i'm a bit stuck myself. I would love to increase feature list (like real raytraced lights with metals being shiny and ambient lights) but it's already slowish+ TWBT rendering everything multiple times... Maybe i'll talk to my graphics expert'ish friends and they could suggest some fancy algos to boost everything... But in the end it will never be as fast as vanilla df.
Why not trow the GPU in the equation? Vanilla almost do not have a use for it
A full universitary department is investigating how to use little DSLs able of being run into the GPU. The root project that group all their research lines is called AnyDSL. In this paper they explain how they are doing and the performance that they have achieved, their Impala repo shows that even if they are using a Rust dialect in their compiler, they have not bootstrapped it, as the general Rust project has, this mean that all their compiler code source is C++ like DFHACK.
They seems  to rely on a Higher-Order Intermediate Representation called Thorin to achieve their GPU optimizations. Two more reddits:
1. Impala: a Rust dialect that can partially evaluate functions at compile time and produce GPU code
2. A graph-based higher-order intermediate representation (demonstrated on Impala, a dialect of Rust)
Returning to our world now, they do not manually low level program the GPU, instead of that they are coding all their logic in the same high level language and then by means of some attributes, I believe, some fragments of code are marked by the programmers to generate GPU code while all the rest generate CPU code and both worlds interact.
Terra seems to be doing exactly the same thing, but starting over a paradigm slightly different, their repo

About which one of those is more near to DFHACK? or if any kind of integration with DFHACK is even possible?

I am completely lost. Maybe your graphics expert'ish friends know...

It would be cool to find our way into one of those algoritm crushers or something similar by the way. Call me a dreamer! If you want, but respect my right to dream.  ;)
« Last Edit: May 04, 2016, 02:14:48 pm by Abadrausar »
Logged
::: Humble Dwarf Fortress Publishing System ♫♪♀HDFPS♂♪♫ Mods Push Published in DFFD are auto updated in local Players Catalog :::

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Dfhack: Rendermax (and it's subplugin light)
« Reply #238 on: May 04, 2016, 05:04:24 pm »

Since someone necroed this thread.

Shaders is the way to go. In the iOS app I recently changed it to render background colours, tiles, and shadows all with one OpenGL call and just simple shaders. I'd be interesting to finally create a shader-based renderer for desktop DF, so that the shader code could be easily modified for different effects.

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: Dfhack: Rendermax (and it's subplugin light)
« Reply #239 on: May 04, 2016, 11:14:10 pm »

Since someone necroed this thread.

Shaders is the way to go. In the iOS app I recently changed it to render background colours, tiles, and shadows all with one OpenGL call and just simple shaders. I'd be interesting to finally create a shader-based renderer for desktop DF, so that the shader code could be easily modified for different effects.
And also to abadrausar: it would help a bit but main thing that is slow is reading shit-ton of memory (even slower- sending said data to gpu) each frame. Also it does not help any way to twbt-rendermax compatability.
Pages: 1 ... 14 15 [16] 17 18 ... 20