this looks interesting, cant wait to try it out! It also would be nice if we had some sort of "field of view" or "fog of war", so that we don't know what lies within an unlit area, unless a dwarf approaches it, or a torch or something like that is built in there.Currently the system works as a layer on top of view (to be precise it just multiplies the color value of each tile) thus does not modify the actual working of the game. That being said it is possible to do some features like that but imho it's enough that it's too dark to see.
Minecraft style: forgotten beasts spawning in unlit areas :)
Oh WOW!for torches/lamps/etc -> i'll let modders do that (by making custom 1x1 workshops). My work is to create a system. Modders -> create implementations (magical crystals?, glowing fungus trees?, maybe lava only lighting and then megaprojects that all the corridors would have lava?) and users to play :)
any torches/lamps/etc planned?
ps: assuming you gave code to Toady, what do you think chances will be that wee see this in main game in current release?
Yeah :)It's not as slow as you would think, but it is a bit slower. But due to Japa's persistence it's multi threaded now and hopefully will be more efficient as time goes on. Currently it only calculates lighting for visible part of world (so smaller screen, less of performance drop).
You did it :)
I already have brazier, candelabra and fireplace set up as 1x1 workshops, and plan on glowing fungus for the caverns. It will look great. Did you experience any FPS-affects when running this?
I will gladly wait for dfhack r4 for this.
i love the name for your "ultra high settings" variable, btwThanks. That was inspired by a better algo pictured here: image (http://i.imgur.com/ikZHIFb.png) that eats your cpu like crazy (something like O(n!) vs our O(n^2) ) but it looks nice.
So, screenshot mode then?That is a whole different idea...
Damn! I have been lurking on forums since about 2007 but almost never post. Just wanted to say this looks amazing, and if it works smoothly would add real flavour to DF. So mad props for doing it! This kind of tuff blows my mind not being a programmer, can this pass back info to df? Could you use this to simulate gas? Like saturate a tile in green then kill stuff that enters it?It could. But currently it does not (for purity and separability). Also there is an issue that this only calculates everything in viewscreen only, thus anything involving said gases out of screen will not work.
Between this and digging invaders there are some really interesting new plugins out. Sadly I tend bottom out at about 20 fps with 80 dwarves pop limit after a while but hopefully lighting wont impact that too much.
Also wanted to say a big thanks to Meph, who I know has been pushing for this. I have been playing masterwork almost exclusively now for a while and im kinda in awe of how much work it must have taken. I know it uses alot of different mods as well to thanks to Putnam et al + anyone else who contributes to masterwork and the DF/Hack collection.
will it be rendered by CPU or GPU? I mean, will the be any benefit from a good videocard or not?Cpu. It is theoretically possible to offload it to e.g. shader but currently the light itself (which could be offloaded) is not very computation intensive and general reading (and computing) the map is taking most of the time and it can not be done on gpu (it also requires locking df, so it would not change the map in the middle of computation)
put dll into hack/plugins
put lua file into same dir as df exe file is.
for best effect set black (in data/colors.txt) to non-black e.g. :
[BLACK_R:40]
[BLACK_G:40]
[BLACK_B:40]
I tried to use it on a save, but either it shows nothing, or it crashes. I use dfhack r3 with the latest MasterworkDF version, Df34.11.Unfortunately i can't help you there. This is (currently?) opengl only. Maybe upgrading drivers might work? Btw does it crash with rendermax enabled when loading or just "STANDARD" mode?
If I use 2D or 2DASYNC mode it says that I need a non-2D mode, and should try STANDARD, once I type "rendermax enable" into dfhack. It complains about missing open GL. So I changed the init to STANDARD, but the game instantly crashes back to desktop when trying to load a world. I get this message:
(http://i.imgur.com/4AD7u2i.png)
It probably is a limitation of the netbook, running Win7. Anyone else getting this?
I am also unsure how to link the light generation to a plant, creature or workshop. I assume that part has not been written yet?
EDIT: I could only find this, so it seems a problem with the GPU. Although I have no idea why it can run graphics just fine, but not your rendermax plugin. http://www.bay12forums.com/smf/index.php?topic=41858.0 (http://www.bay12forums.com/smf/index.php?topic=41858.0)
addMaterial("PLANT:TOWER_CAP",nil,{0.65,0.65,0.65},6)
addMaterial("PLANT:MUSHROOM_CUP_DIMPLE",nil,{0.03,0.03,0.5},3)
addMaterial("PLANT:CAVE MOSS",nil,{0.1,0.1,0.4},2)
addMaterial("PLANT:MUSHROOM_HELMET_PLUMP",nil,{0.2,0.1,0.6},2)
Buildings:addBuilding("Statue",{1,1,1},{0.9,0.75,0.3},8)
addBuilding("Bed",{1,1,1},{0.3,0.2,0.0},2)
addBuilding("WindowGlass",nil,nil,0,{"useMaterial"})
addBuilding("WindowGem",nil,nil,0,{"useMaterial"})
addBuilding("Door",nil,nil,0,{"useMaterial"}) -- special case, only closed door obstruct/emit light
addBuilding("Floodgate",nil,nil,0,{"useMaterial"}) -- special case, only closed door obstruct/emit light
Also supports custom workshops: "Workshop:Custom:<your name>" works. Did not do anything fancy with it. Japa suggested setting setting emision and occlusion to each workshop tile if it has more than one tile. This might be what i will do.It works, and even didnt crash on disableYou can try "rendermax lights reload" after changing settings.
seems like light cycling isnt working, or i dont know how its supposing to work
[edit]: it works after reloading game
I assume dwarves automatically generate light?Dwarves generate light, though not very much.
this defines how much light they emit/occlude (i forget if they occlude or they ignore that param)I assume dwarves automatically generate light?Dwarves generate light, though not very much.
special.CITIZEN=makeMaterialDef(nil,{0.80,0.80,0.90},6)
Plants and workshops seem fine to me. Creatures was just an idea. I assume dwarves automatically generate light? Or do people really have to outfit everything underground with the fitting workshops (1xtile ones for light generation)? I'd rather like that.The usematerial does use material but not that way. It tries to use material provided (e.g. cinnabar -> blocking light and not emitting light) and if it does not find it then it uses the one defined in lua. This should be used with e.g. modded in glowing crystals or just set to emit light always (like statues and beds currently do).
I assume that this "{"useMaterial"})" means that the workshop generates light the color of the build-mat? So a marble-candelabra would make white light, but a cinnabar/realgar-candelabra produces red light?
I dont know about items. While it would be fun to make a blessed armor or a sword that glows blue when greenskins are close, I think it would be more of a gimmick then anything else.
X=<color ocupancy>, <color emmisive>, <radius>
Y=<color ocupancy>, <color emmisive>, <radius>
and then
X Y
YY X
XXXX
@Hommit:special.AMBIENT=makeMaterialDef({0.85,0.85,0.85}) --ambient fog
Actually they are not circular :D. Although with current light propagation it's a bit limited (i.e. looks ugly) if you lower the amount of light the air blocks (because it's exponential).Hmm i see what you mean. Player with values, and i think value around 0.88-0.9 is better - its more brighter, but not that much as 0.95. Need to correct light radius for entries, but they can be put for as giht as 20 or more, and then light will decay on its own anyway.
addMaterial("PLANT:FUNGIWOOD",nil,{0.5,0.6,0.1},6)
addMaterial("PLANT:TUNNEL_TUBE",nil,{0.7,0.3,0.6},6)
addMaterial("PLANT:SPORE_TREE",nil,{0.1,0.5,0.5},6)
addMaterial("PLANT:NETHER_CAP",nil,{0.2,0.2,0.9},6)
addMaterial("PLANT:BLOOD_THORN",nil,{0.6,0.1,0.2},6)(stitched from 3 images)Could You (the adventurer) also emit light by default? ???I'll add that to next version (if i don't forget). The main annoyance to me in adv mode is that we can't override the default view distance. If it was my choice i would set it to fullscreen and then only use the rendermax to light up stuff.
It wouldn't really have much of an effect in the adventurer mode, but it'd make things a bit gloomier.
Feature Request: Temporary lightsource from reaction.I'm not sure how this would work. Maybe it's already possible with low ignition point materials? Like bonfire mod?
Example: Workshop Oil-Lamp. Reaction: Light the oil lamp. Reagent: Oil. Product: 1 ingame month of light.
Just leaving this here, because I think its a neat idea. Weak lightsources that are constant, and powerful lightsources that need reagents.
If you manage to read out what's on the lower levels and overlay it graphically to show something akin to the screenshot you posted, the DF interface wouldn't recognize it. So you can see the trees on Z3 while on Z5, but you cant designate them for cutting... it would be purely graphical, like Stonesense.
I'd say lets wait for warmist to finish rendermax and the lighting first. ;)Actually I am already working on that. I needed an offscreen renderer (i.e. a renderer that allows to draw anything from anyplace in a map) for mutiplayer. But that combined with rendermax can work to make a multilevel view.
offscreen renderer (i.e. a renderer that allows to draw anything from anyplace in a map) for mutiplayer.
So... The multilevel view is possible and might even happen (!!!), and no news yet on full graphics? Sounds pretty good to me.Same thing can also be used for full graphics support (when you are drawing everything yourself you can draw it anyway you wish). Though currently it does not do a lot of stuff: no blinking stuff, incorrect lower level drawing, grasses might be incorrect, no item drawing. Basically this:
I really like this idea. It's way better than the void of nothingness that we get with Vanilla Dwarf Fortress.Spoiler: multi-level view mockups (click to show/hide)
I really like this idea. It's way better than the void of nothingness that we get with Vanilla Dwarf Fortress.Spoiler: multi-level view mockups (click to show/hide)
This was also proposed in the depth by darkening/fog (http://www.bay12forums.com/smf/index.php?topic=30114.0) thread, which I should have linked to before. See also the thread for full graphics support (http://www.bay12forums.com/smf/index.php?topic=41266.0). There was even a FotF where Toady discussed depth-viewing issues (http://www.bay12forums.com/smf/index.php?topic=1788.msg27992#msg27992)... in 2007.Spoiler: mockup of this '2.5d' via scaling (click to show/hide)
While I think it's a neat idea, I'd guess that it would be enough work to eg get the offsets and scaling right that we'd be better off putting the same work into a simpler fog effect and then later on full graphics.
What I was going to suggest has been suggested already it appears... Items in buildings/workshops... and potentially Creatures emitting light. Perhaps there could be a flag on buildings or creatures to check it for the first item that could potentially emit light and set that light for the entire building, which would work really well for the oil lamp building as suggested. Maybe a building should, if it could, distinguish a material it was built with from an item currently inside it though.It already does that to some extent (this being only the first material matters? or sth... dunno it should work same as pumps get their material: from blocks?)
This was also proposed in the depth by darkening/fog (http://www.bay12forums.com/smf/index.php?topic=30114.0) thread, which I should have linked to before. See also the thread for full graphics support (http://www.bay12forums.com/smf/index.php?topic=41266.0). There was even a FotF where Toady discussed depth-viewing issues (http://www.bay12forums.com/smf/index.php?topic=1788.msg27992#msg27992)... in 2007.unfortunately, if nobody does it, it's outside of my interests (meaning i might do it some day, but not someday soon). The main problem being: this would need rewriting renderer that is quite big and uses either sdl or opengl. Although source code for them exist (the only part of df that is opensource) it's very complicated and i would like to avoid messing too much with that (same idea with 2d modes not working with rendermax).
<2.5 idea>
[DFHack]# rendermax light
Sorry, this plugin needs open gl enabled printmode. Try STANDARD or non-2d
[DFHack]#
Sounds and look pretty neat, but... I can´t imagine the FPS killer you are crafting here!!!Actually the funny thing is it takes away from your "graphical fps" not the "game fps" because it only performs work on drawing part of the game cycle and most forts have low "game fps" because the game complexity increases, but not the drawing of it.
(nope I don´t have a crappy machine, not godly, but not crappy)
It's absolutely possible, I just haven't gotten around to doing so.So yeah, TTF and OpenGL together is possible. :) Warmist, if you want to have a chat with him, you can get in touch on IRC, on Rizon or Freenode. Nickname Baughn.
I tried making all gems glow in their color, but I guess addMaterial("INORGANIC:GEM_ID",{useMaterial},{useMaterial},5) doesnt work? Do I need to manually fit the hue of the light to the color of the gem?The gems are added as a list of them all by a function (was too lazy to list all gems out so made a function), you can overwrite any one of them.
All the rest is working fine. My UI now includes a button to toggle Rendermax on and off... I just wish I could make screenshots. ^^
EDIT: Actually, I cant get gems to glow at all. Metal veins, yes. Gems clusters, no.
The custom workshops do glow now, with the one upper-left tile giving light. Dont know if thats intended or not. Its fine for my 1x1 workshops that should give light, but I thought about adding a little bit of light to all workshops/furnaces, and it does look odd on the larger ones, like 11x11. ^^
I'm not really familiar with the technology around this project. The light showing through the different colors of glass in the demo looks absolutely amazing. Is there any chance this could be packaged into a Mac .so instead of a Windows .dll?If you find somebody with mac to build it.
If you find somebody with mac to build it.
Source is public as of all dfhack. Though i think there was some mac specific build problems but if you are willing to try it, you will need:If you find somebody with mac to build it.
Is the source public somewhere? I don't mind giving it a shot if it's not dependent on windows libraries.
I noticed that gems let light through, but I wanted to make them emit light. Cant find that in the files.The syntax is:
For workshops, using the "work-tile" would be fine. :)
addMaterial(<token>,<absorb color>,<emit color>,<range>)
here: <token> is something from raws. <absorb color>/<emit color> is in form {value,value,value} where value is any number, range is either -1 (meaning auto calculate range) or some integer (afair).addgems ("INORGANIC:DIAMOND",{0.6,0.6,0.6},{0.6,0.6,0.6},5) is ok?addMaterial thing. Also yes, that probably needs to be ALSO RAW_ADAMANTINE, because i wanted both stuff from adamantine and veins to be a bit glowy.
OR
addMaterial("INORGANIC:DIAMOND",{0.6,0.6,0.6},{0.6,0.6,0.6},5), which I used so far, but didnt work... but I can try in that different location you posted.
BTW, you example shows ADAMANTINE, which is the metal... did you mean RAW_ADAMANTINE, which is the mineral vein?
Source is public as of all dfhack.
OMG this plugin is amazing! Dwarf Fortress just took Brogue out for dinner. :P
This link includes a compiled version for Mac using universal so it should run on most systems.
https://anonfiles.com/file/1b25f461a52c99a787ed8e0ea9c52615 (https://anonfiles.com/file/1b25f461a52c99a787ed8e0ea9c52615)
About Baugh: i think Toady One mentioned that he disappeared somewhere. Theoretically somebody else could implement it just as well. I can even point to the line where it needs to be put.
The Internet-Install-Guy is coming by tomorrow, then I can move away from this netbook and run my real PC again... I'll check IRC and try to find Baughn and see what he can come up with, concerning the OpenGl vs. TTF issue.
Boltgun: Can I merge the first lines from your build into mine, with the different colors for sunrise and sunset?
Warmist, the game always crashes when you window it... if you cant fix this, why dont you add a hotkey that disables rendermax when people press F11? It would eliminate that problem.It crashes when you disable it. There is rendermax disable. You can bind it to anything.
http://www.bay12forums.com/smf/index.php?topic=94528.0
Theoretically this new renderer should work better than Baugh's version, IF Toady decides to support it... AFAIK OpenGL and TTF is implemented, problem is it's only working on linux at the moment. :(
addMaterial("PLANT:bitterroot",nil,{0.4,0.4,0.1},2)
addMaterial("PLANT:cave wheat",nil,{0.3,0.3,0.3},2)
addMaterial("PLANT:dimple cup",nil,{0.1,0.1,0.4},2)
addMaterial("PLANT:fly-agaric",nil,{0.4,0.1,0.1},2)
addMaterial("PLANT:gnome moss",nil,{0.1,0.4,0.1},2)
addMaterial("PLANT:plump helmet",nil,{0.4,0.1,0.4},2)
addMaterial("PLANT:shadowleaf",nil,{0.2,0.2,0.5},2)
addMaterial("PLANT:silkweed",nil,{0.5,0.5,0.5},2)
addMaterial("PLANT:sweet pod",nil,{0.4,0.1,0.1},2)
addMaterial("PLANT:blood boil",nil,{0.4,0.1,0.1},2)
addMaterial("PLANT:glowberry",nil,{0.9,0.9,0.1},4)
addMaterial("PLANT:glowstring",nil,{0.2,0.4,0.4},3)
addMaterial("PLANT:mossberry",nil,{0.1,0.4,0.1},2)
addMaterial("PLANT:purple stalk",nil,{0.4,0.1,0.4},2)
addMaterial("PLANT:crystal cane",nil,{0.1,0.7,0.7},2)
addMaterial("PLANT:quarry bush",nil,{0.3,0.3,0.3},2)
addMaterial("PLANT:rock melon",nil,{0.1,0.3,0.3},2)
addMaterial("PLANT:shard thorn",nil,{0.5,0.5,0.7},2)
addMaterial("PLANT:starapple",nil,{0.4,0.6,0.8},3)
addMaterial("PLANT:stone root",nil,{0.5,0.5,0.7},2)
addMaterial("PLANT:FUNGIWOOD",nil,{0.5,0.5,0.1},5)does not make plants and fungiwood to glow.Strange, it does not crash for me when I disable it. However resizing game window makes the game stuck.Warmist, the game always crashes when you window it... if you cant fix this, why dont you add a hotkey that disables rendermax when people press F11? It would eliminate that problem.It crashes when you disable it. There is rendermax disable. You can bind it to anything.
Also everytime you press something in the same column with the Printmode, the settings.exe changes the ini.txt and sets the printmode into something else other than STANDART.Actually that should only happen when you change the tileset, since it replaces the entire init with a new one. All the other settings just toggle values inside the file and shouldnt interfere with the print mode.
current version only accepts creatur mats, so you can do blood or a secretion that covers the creatur. But warmist mentioned a version that supports both creatures and itmems... the drawback is that it is a lot slower then the current build.I haven't noticed big slowdown. But my pc is quite a monster :P
Windows r4 link: http://dffd.wimbli.com/file.php?id=8068
Linux r4 link: http://dffd.wimbli.com/file.php?id=8067
New stuff: https://github.com/expwnent/dfhack/blob/0.34.11-r4/NEWS
Also forgot to put in that document: the eventful script now exposes EventManager events to lua scripts. See the lua documentation for details.
Thank you. I will add it asap. :)ah my nemesis. I'll think about adding light propagation in reverse direction (i.e. lava pits lighting from below) and maybe generalize the light in z direction (big spaces could be lit up by chandeliers hanging up above, could be hard/processor intensive). Currently what i don't like that the light falls off too fast imho. Maybe a hdr mode? Like having sunlight 1000 or something that big and simulating eyes getting saturated (no values over 1 displayed) and renormalized (like reading from lcd is impossible in sunlight, so lava would not appear to glow in sunlight)...
I am not aware of any bugs in the last version, except for the "crash when window/resize".
ret.items={}Oh... AWESOME :)
ret.creatures={}
Thats fine by me. I just wanted to have unstockpileable items called "fire" or "burning torch" anyway. They wither away, so after 2 weeks its "withered fire" and after 4 weeks its gone.Fill up the minecart with various coloured gem lights and make a minecart-shotgun :D
Same thing for my "gem of light". Its white light, and if you touch it, it generates a withering item of the wanted color. So dwarves have reactions like "turn gem yellow" or "turn gem red", and the item makes the fitting color. :)
At least thats the plan. I did write the raws at some point, but items were not supported... guess I have to go looking for them again.
So that I can puke rainbows at invaders? :DThat too, also fireworks. Oh i just remembered that projectiles probably don't glow :/
addMaterial("PLANT:CATTAIL",{1,1,1},{1,1,1},4) -- this means that cattail structural material will glow.
addItem("PLANT",nil,nil,nil,{"useMaterial","onGround","hauling"}) --now plants will try to glow if they have material defined
addMaterial("PLANT:GLOW_RED",{1,0,0},{1,0,0},50)
addItem("PLANT",nil,nil,0,{"useMaterial","onGround"})Currently what i don't like that the light falls off too fast imho. Maybe a hdr mode? Like having sunlight 1000 or something that big and simulating eyes getting saturated (no values over 1 displayed) and renormalized (like reading from lcd is impossible in sunlight, so lava would not appear to glow in sunlight)...yeah. when i tried, basically, u have to place some light in every room corner and somehow (grated lava under floor) light up all corridors. too dark everywhere otherwise :(
I'm a bit torn about this, my original idea was to add lights into df so that you would have reason to do magma piping and skylights (also that underwater forts would look cool, and colored lights...). So i'm not yet sure if it's enough to play with the variables (and add more light sources like meph does) or some more fancy logic is needed.Currently what i don't like that the light falls off too fast imho. Maybe a hdr mode? Like having sunlight 1000 or something that big and simulating eyes getting saturated (no values over 1 displayed) and renormalized (like reading from lcd is impossible in sunlight, so lava would not appear to glow in sunlight)...yeah. when i tried, basically, u have to place some light in every room corner and somehow (grated lava under floor) light up all corridors. too dark everywhere otherwise :(
and the fort itself: Build custom workshops that make light. Thats the point. ^^Make them, then we build them :) Not everyone have awesome modding skills like you ;)
BRAZIER
[BUILDING_FURNACE:BRAZIER]
[NAME:Brazier]
[NAME_COLOR:7:0:1]
[WORK_LOCATION:1:1]
[BUILD_LABOR:ARCHITECT]:MASON]
[BUILD_KEY:CUSTOM_R]
[DIM:1:1]
[WORK_LOCATION:1:1]
[BLOCK:1:0]
[TILE:0:1:245]
[COLOR:0:1:0:0:0]
[TILE:1:1:32]
[COLOR:1:1:0:0:0]
[TILE:2:1:32]
[COLOR:2:1:0:0:0]
[TILE:3:1:245]
[COLOR:3:1:7:0:0]
[BUILD_ITEM:1:BOULDER:NONE:NONE:NONE]
chandelier
[BUILDING_FURNACE:CHANDELIER]
[NAME:Candelabra]
[NAME_COLOR:7:0:1]
[WORK_LOCATION:1:1]
[BUILD_LABOR:ARCHITECT]:MASON]
[BUILD_KEY:CUSTOM_X]
[DIM:1:1]
[WORK_LOCATION:1:1]
[BLOCK:1:0]
[TILE:0:1:145]
[COLOR:0:1:7:0:0]
[TILE:1:1:96]
[COLOR:1:1:7:0:0]
[TILE:2:1:96]
[COLOR:2:1:7:0:0]
[TILE:3:1:145]
[COLOR:3:1:7:7:1]
[BUILD_ITEM:1:BOULDER:NONE:NONE:NONE]
[BUILDING_FURNACE:FIREPLACE]
[NAME:Fireplace]
[NAME_COLOR:7:0:1]
[BUILD_LABOR:ARCHITECT]:MASON]
[BUILD_KEY:CUSTOM_Z]
[DIM:1:1]
[WORK_LOCATION:1:1]
[BLOCK:1:0]
[TILE:0:1:216]
[COLOR:0:1:7:0:0]
[TILE:1:1:249]
[COLOR:1:1:7:0:1]
[TILE:2:1:135]
[COLOR:2:1:7:0:1]
[TILE:3:1:216]
[COLOR:3:1:7:7:1]
[BUILD_ITEM:1:BOULDER:NONE:NONE:NONE]
[BUILDING_FURNACE:TORCHBEARER_STATUE]
[NAME:Torchbearer Statue]
[NAME_COLOR:7:0:1]
[BUILD_LABOR:ARCHITECT]:MASON]
[BUILD_KEY:CUSTOM_NONE]
[DIM:1:1]
[WORK_LOCATION:1:1]
[BLOCK:1:0]
[TILE:0:1:234]
[COLOR:0:1:7:4:1]
[TILE:1:1:234]
[COLOR:1:1:7:4:1]
[TILE:2:1:234]
[COLOR:2:1:7:4:1]
[TILE:3:1:234]
[COLOR:3:1:7:4:1]
[BUILD_ITEM:1:STATUE:NONE:NONE:NONE][CAN_USE_ARTIFACT]
[BUILDING_FURNACE:GLOWING_ORB]
[NAME:Gem of Light]
[NAME_COLOR:7:0:1]
[BUILD_LABOR:ARCHITECT]:MASON]
[BUILD_KEY:CUSTOM_NONE]
[DIM:1:1]
[WORK_LOCATION:1:1]
[BLOCK:1:0]
[TILE:0:1:4]
[COLOR:0:1:5:7:1]
[TILE:1:1:4]
[COLOR:1:1:5:7:1]
[TILE:2:1:4]
[COLOR:2:1:5:7:1]
[TILE:3:1:4]
[COLOR:3:1:5:7:1]
[BUILD_ITEM:1:GEM:NONE:NONE:NONE][CAN_USE_ARTIFACT]
addBuilding("Furnace:Custom:BRAZIER",{1,1,1},{0.9,0.75,0.3},12)
addBuilding("Furnace:Custom:TORCHBEARER_STATUE",{1,1,1},{0.8,0.1,0.1},20)
addBuilding("Furnace:Custom:CHANDELIER",{1,1,1},{0.9,0.65,0.2},35)
addBuilding("Furnace:Custom:FIREPLACE",{1,1,1},{0.7,0.45,0.3},5)
addBuilding("Furnace:Custom:GLOWING_ORB",{1,1,1},{1,1,1},50)Did you set your mode to STANDARD in the init?
I think its because you are using dfhack r3, but downloaded rendermax for dfhack r4. (or the other way around)
Does this plugin limit creatures' fields of vision in the dark or not?1. No, does not limit anything, just a visual thing.
Does it work on dfhack for Mac?
Does it work on dfhack for Mac?2. It would if somebody would build it for mac.
OMG this plugin is amazing! Dwarf Fortress just took Brogue out for dinner. :P
This link includes a compiled version for Mac using universal so it should run on most systems.
https://anonfiles.com/file/1b25f461a52c99a787ed8e0ea9c52615 (https://anonfiles.com/file/1b25f461a52c99a787ed8e0ea9c52615)
Hello there!Could you give me more info? It certainly sounds like a MasterworkDF specific question. Which tileset do you use, which OS, which Mod version ? (you can see the version number in the main menu). When you say "light a fire", is that the reaction that actually starts fires that spread?
I have this particular problem in which fireplaces and braziers dont give off light after i light a fire in there although the sun cycles and dwarfs emit light alright.
rendermax, standard and no true type fonts.
Any ideas ?
would it be better if workshop would glow from every tile?Yes. Otherwise large workshops look odd. Either every tile, every corner tile, or only the worktile, or preset tiles per workshop that can be done by hand. Whatever suits you most. ;)
Don't mean to sound impatient but any estimates as to when the next update will be? That screenshot of adventure mode is really exciting for me, it breathes some life into it.Well i was thinking of waiting for new dfhack release. Not sure when that will happen. I'll try to compile a version myself (though windows only probably)
Should I assume that the .dll means that this only works on Windows?Not quite, i think there was someone who built it on linux (that was for dfhack r3). I just don't have linux to build on.
Is the source for that in the download?No it's in github with dfhack.
Don't mean to sound impatient but any estimates as to when the next update will be? That screenshot of adventure mode is really exciting for me, it breathes some life into it.Well i was thinking of waiting for new dfhack release. Not sure when that will happen. I'll try to compile a version myself (though windows only probably)
Hello. I think it's time for a status update!
I'm not dead... yet :D
The past year, I've been busy with finishing university, getting a job, MultiMC5 (http://multimc.org/), having a job and MultiMC5 some more (http://multimc.org/). DFHack and any other related activities just went out of the window.
Anyway, today I've started making some changes.
- DFHack and related projects are now under a github organization, with me, angavrilov and Quietust: https://github.com/DFHack - this should allow more people than just me to make releases.
- Releases will be moved from my site (http://dethware.org/dfhack/download/) back to github (https://github.com/DFHack/dfhack/releases). I've already begun doing that.
- Release 4 for 0.34.11 will be entirely skipped. I'm pretty sure I've done no builds of it, so they are all 'unofficial'. It's chaotic. I will salvage whatever changelog information I can from it and move on.
- I will begin merging in changes and work towards Release 5. This might take a week or two, because I still have a job and a MultiMC5 to worry about ;)
- I'm getting a Mac! So we might even have proper OSX support. If not in r5, then surely in r6.
I'll try to answer any PMs sent up to this point now.
Unless you think there's something in the many thread pages I'm skipping right now that I should *really* know about, I'll skip them. There's just too many to read :)
I just gitcloned your whole fork of dfhack to build. For future reference, would it work to just clone your stuff into the "vanilla dfhack" plugins/ directory and add the rendermax stuff to CMakeLists?For the record...
Is there a place where I can check out r4 or r5?r5 nope, r4 is https://github.com/expwnent/dfhack/tree/0.34.11-r4
Can rendermax be modified to add a hue to the game that fits the season? Something like a changed color scheme, but without the need to restart the game every time the season changes.You mean sun? yes it could be.
Happier, more saturated colors in spring, maybe some brighter slightly yellow summer, some greyish-reddishness in autumn, and cold-blueish in winter? It could add a lot more atmosphere. :)
Sun? I dont mean day/night cycles, but I saw a suggestion by someone for vanilla DF that the color scheme should change between seasons to visually show the season a bit more. I know that wont work without restarting the game, but I thought Rendermax could simulate that. Just adding a cold hue for winter and a warm hue for summer for example.Yeah it's possible.
Checked it out and it's great! It's just a shame advmode isn't functional. :(New version should have functioning advmode. Not sure what you meant by that.
Thanks for uploading it! :D
FYI, the link to the Linux version says I need permission to get it.Just the rendermax. And you can't use it with r3.
Also, when you say you uploaded r4, does that mean your entire dfhack r4, or just rendermax? (And in the latter case, cany you use it with dfhack r3?)
Just the rendermax. And you can't use it with r3.
Looking over the forums, it's quite hard to find r4 (especially linux build and mac-os might be non-existant). I'll see what i can do.
Edit: also fixed the permission thing.
Also in irc peterix mentioned having mac now, so maybe even official mac builds will be possible.Just the rendermax. And you can't use it with r3.
Looking over the forums, it's quite hard to find r4 (especially linux build and mac-os might be non-existant). I'll see what i can do.
Edit: also fixed the permission thing.
Linux r4 is on dffd somewhere near the windows build, lethosor managed to build on r4 and it seems to work well on my barely-to-date mac here (http://www.bay12forums.com/smf/index.php?topic=91166.msg4876842;topicseen#msg4876842).
Looking at the recent commits, cross platform might be easier for r5.
(/snip) lethosor managed to build on r4 and it seems to work well on my barely-to-date mac here (http://www.bay12forums.com/smf/index.php?topic=91166.msg4876842;topicseen#msg4876842).
Looking at the recent commits, cross platform might be easier for r5.
Edit: here's some links:Thanks. For the record, the Linux kit doesn't extract properly (loses the internal directory structure), so you probably want to extract it on Windows and copy it over.
Linux dfhack-r4 (http://dffd.wimbli.com/file.php?id=8067)
Windows dfhack-r4 (http://dffd.wimbli.com/file.php?id=8068)
Edit: here's some links:Thanks. For the record, the Linux kit doesn't extract properly (loses the internal directory structure), so you probably want to extract it on Windows and copy it over.
Linux dfhack-r4 (http://dffd.wimbli.com/file.php?id=8067)
Windows dfhack-r4 (http://dffd.wimbli.com/file.php?id=8068)
However, I'm getting into all kinds of library dependency issues.
I tried rendermax on Windows and it's gorgeous, but makes it pretty hard to see what you're doing.
Deleting the offending library from df fixed it for me. I had it installed through apt.That gets me over one hump, but it also wants a newer libstdc++ than I find in the Ubuntu repository, and I'm reluctant to start jacking with my system libraries. I can play on Windows for now.
Not likely, sorry. But it will be included in release of DFHack r5 :)
Please annoy peterix so he will have to release it :) Usually he has more time in the weekends but this weekend only sort-of-like feature freeze happened (well at least lot of merging and tidying up before release). So it will be released very soon but in "valve time". ;)Not likely, sorry. But it will be included in release of DFHack r5 :)
Dare I ask when r5 will be released? I've been getting "soon (tm)" for months...
Wow; I just came across this and it looks amazing. Any chance we could get a version of the plugin for the Mac-native DFHack R3?Someone compile a version last september, you can get it here. (https://db.tt/WxEAU5Gb)
Am I missing something or is rendermax simply missing in dfhack r5? I can't find it in PE's pack either FWIW.I'm looking to include it in the next starter pack release, but can't find a build for Windows dfhack-r5. Anyone got a link?
Wait a sec. I'll upload it.Am I missing something or is rendermax simply missing in dfhack r5? I can't find it in PE's pack either FWIW.I'm looking to include it in the next starter pack release, but can't find a build for Windows dfhack-r5. Anyone got a link?
Wait a sec. I'll upload it.Am I missing something or is rendermax simply missing in dfhack r5? I can't find it in PE's pack either FWIW.I'm looking to include it in the next starter pack release, but can't find a build for Windows dfhack-r5. Anyone got a link?
EDIT: there. Due to my error it got skipped in release of dfhack r5 (except osx version).
Few changes. I think most important that rendermax.lua is now in raws folder and is per-save.
I get the 'plugin compiled for r4, you have r5' error, and I have checked that I got it from the r5 link.
I'm aware that I'm using dfhack-r5, the problem is that the link at the top of this thread to Rendermax compiled for windows dfhack-r5 is actually compiled for r4, so I can't use it.Gah... I think i know what happened. :/
addBuilding("Table",nil,{0.8,0.8,0.8},6,{"useMaterial"})but these don't: (line 61-103)addBuilding("Trap:Lever",{1,1,1},{1.3,1.3,0.3},4)
addBuilding("Workshop:Masons",{1,1,1},{1,1,0.8},10)
addBuilding("Furnace:WoodFurnace",{1,1,1},{1.2,0.5,0.5},15)data/save/region2/raw/rendermax.lua:61: attempt to concatenate field '?' (a nil value)
stack traceback:
data/save/region2/raw/rendermax.lua:61: in function 'buildingLookUp'
data/save/region2/raw/rendermax.lua:136: in function 'addBuilding'
data/save/region2/raw/rendermax.lua:255: in main chunkfunction buildingLookUp(id)
local tokens={}
local lookup={ Workshop=df.workshop_type,Furnace=df.furnace_type,Trap=df.trap_type,
SiegeEngine=df.siegeengine_type}
for i in string.gmatch(id, "[^:]+") do
table.insert(tokens,i)
end
local ret={}
ret.type=df.building_type[tokens[1]]
if tokens[2] then
local type_array=lookup[tokens[1]]
if type_array then
ret.subtype=type_array[tokens[2]]
end
if tokens[2]=="Custom" and tokens[3] then --TODO cache for faster lookup
if ret.type==df.building_type.Workshop then
for k,v in pairs(df.global.world.raws.buildings.workshops) do
if v.code==tokens[3] then
ret.custom=v.id
return ret
end
end
elseif ret.type==df.building_type.Furnace then
for k,v in pairs(df.global.world.raws.buildings.furnaces) do
if v.code==tokens[3] then
ret.custom=v.id
return ret
end
end
end
qerror("Invalid custom building:"..tokens[3])
end
end
return ret
end
Or all the code like this:there is "poweredOnly" flag e.g.:Awesome :)
addBuilding("don't remember what can be powered...",{1,1,1},{1.3,1.3,0.3},4,{"poweredOnly"})
Other could be added (not sure about pressure plates though...)
there is "poweredOnly" flag e.g.:I can't get it to work, switching off power doesn't turn off the light, and the plugin crashes if I have both {"useMaterial"} and {"poweredOnly"} defined separately, is this the correct syntax: {"useMaterial","poweredOnly"} ?
addBuilding("don't remember what can be powered...",{1,1,1},{1.3,1.3,0.3},4,{"poweredOnly"})
Other could be added (not sure about pressure plates though...)
addBuilding("Trap:Lever",{0.5,2,0.5},{0.3,1.1,0.3},5,{"useMaterial"})
addBuilding("Trap:TrackStop",{2.5,0.3,0.3},{2.5,0.5,0.5},8)
addBuilding("GearAssembly",{1,1,1},{0.8,0.8,0.8},5,{"poweredOnly"})
addBuilding("Rollers",{1,1,2.5},{1.5,1.5,2.5},4,{"poweredOnly"})
addBuilding("AxleHorizontal",{1,1,1},{0.8,0.8,0.8},5,{"poweredOnly"})
addBuilding("AxleVertical",{1,1,1},{0.8,0.8,0.8},5,{"poweredOnly"})
Oh WOW!
any torches/lamps/etc planned?
Does this still work with the latest updates?If you mean latest update that has dfhack then yes. Latest df version does not have dfhack so does not have this either
Does this still work with the latest updates?If you mean latest update that has dfhack then yes. Latest df version does not have dfhack so does not have this either
Should be included. Just type "rendermax light" into the dfhack window, and see for yourself.Any specific hardware requirements for rendermax?
Invoking: rendermax light
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.
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.
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.
Actually that is what I was trying to do (until i got sidetracked) 10 days ago.Or a few more days than 10. :P
Actually that is what I was trying to do (until i got sidetracked) 10 days ago.Or a few more days than 10. :P
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 (https://en.wikipedia.org/wiki/Graphics_processing_unit) in the equation? Vanilla almost do not have a use for it
Since someone necroed this thread.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.
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.
Also it does not help any way to twbt-rendermax compatability.
That might work. Has anyone done any asking around how many people will have the hardware for this?Also it does not help any way to twbt-rendermax compatability.
Why? Well, not exactly "compatibility", but if we just pass the required data to the shaders and perform further calculations there, we could combine them in one plugin/set of shaders. Or maybe it could even be separate plugins each adding some data to send to shader stage, and several separate shader source files defining rendering/postprocessing stages.
That might work. Has anyone done any asking around how many people will have the hardware for this?Also it does not help any way to twbt-rendermax compatability.
Why? Well, not exactly "compatibility", but if we just pass the required data to the shaders and perform further calculations there, we could combine them in one plugin/set of shaders. Or maybe it could even be separate plugins each adding some data to send to shader stage, and several separate shader source files defining rendering/postprocessing stages.
I like this one (https://www.shadertoy.com/view/Ms2SD1), impressive modeling of the waves in the sea, with so little code...It shouldn't be a problem. OpenGL ES which is sufficient for my needs (and WebGL, see https://www.shadertoy.com/browse) and corresponding desktop OpenGL version are about 8 years old.That might work. Has anyone done any asking around how many people will have the hardware for this?Also it does not help any way to twbt-rendermax compatability.Why? Well, not exactly "compatibility", but if we just pass the required data to the shaders and perform further calculations there, we could combine them in one plugin/set of shaders. Or maybe it could even be separate plugins each adding some data to send to shader stage, and several separate shader source files defining rendering/postprocessing stages.
... 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.I ask this because a full shader-based renderer for desktop DF, could soon become overly ambitious, as lnxt try at it show us (http://www.bay12forums.com/smf/index.php?topic=94528.0), but a more limited in scope project where the easy picks are treated first, have more chances of success or at least, of being interesting enough for the developer, the time required to achieve something ...
Sorry for the necro, but this looks absolutely awesome and I wanted to try it out. So, I set print mode to STANDARD and ran 'rendermax light' on the dfhack prompt. That worked, but totally kills my FPS.
I'm playing on a laptop (dell xps13) with 4K screen, is that likely to be the problem?
Is there a way to change settings to reduce the burden?
(edit: and I use a tileset, I think Ironhand, with df 43.05)
So this is still being worked on?
I could help if there are problems.
Amazing project dare i say
3->....
2->.#.
1->..
X
It's in the official DFHack repo: https://github.com/DFHack/dfhack/tree/master/plugins/rendermaxBut if you want to see newest changes, they are in my repo under dev-rendemax. However they are not very impressive... I still need to redo everything in shaders, and do a lot of stuff for this to payoff. E.g. now it has some artifacts if you allow for ambient fog. This is apparent e.g in water.
I think you would have to recompile the plugin if that part wasn't in the repo.
Not only that, but there's the question of where the souther section gets the light when it is disconnected?Heh... You noticed. The southern part lit because of some bug... The "offscreen" for some reason generates light... Probably something todo with the arrays limits or sth...
As far as the first set of images go, the 2 bounce view feels bit too...naturalized? Sharp? Anyway, feels off to have the colour of soil ramp right next to magma so similar to the colour for the "," in ~ centre of three SE bloodthorn saplings. Comparison next to each other: ▉▉
1 bounce feels better on that front.
I take it the colour of the object light bounces from affects the resultant colour?
Is it too expensive to have the magma underneath the trees in the northern part light them up? It's odd that they're mostly in darkness when things on higher z-level get better lightning even dozen+ tiles away.
Bump, because someone brought it up on Reddit once more. We want Rendermax + TWBT :PMostly been overcomplicating everything: current state it does not work, and looks terrible when it does :D
Bump, because someone brought it up on Reddit once more. We want Rendermax + TWBT :PMostly been overcomplicating everything: current state it does not work, and looks terrible when it does :D
I'm waiting for mifki to finish his rewrite for twbt integration. I think it will be easier to do then.
Yeah and in any way it would need a c++ part still where it would calculate stuff from map, unit, buildings etc... so only shader would be not enough and passing EVERYTHING into a shader would be insaneBump, because someone brought it up on Reddit once more. We want Rendermax + TWBT :PMostly been overcomplicating everything: current state it does not work, and looks terrible when it does :D
I'm waiting for mifki to finish his rewrite for twbt integration. I think it will be easier to do then.
Hm... What I was going to do is mostly internal stuff related to handling overrides and shouldn't make much difference to you. However, I'm also thinking that eventually, I need to move to shader-based rendering and _that_ maybe will make it easier to add visual effects. Although I don't see how twbt+rendermax can co-exist as two separate plugins anyway. I'd like to have a visual fx framework, where other developers may provide shader code fragments to be included, and have their C++ plugins feed data to them, but I'm not sure it's worth it when there's only rendermax needing this so far.
I'm currently using it, and the only problem I've had so far is FPS. Reducing the number of caverns, setting special.diffuseCount=0 and capping the GFPS at 30 gets me 100 FPS, but it remains to be seen how that will hold up as the fort ages.
I don't know if there's further optimization that can be done – seems most of the taxing stuff is on the dfhack side of the things and can't be moved into another thread.
EDIT: And I'm using a 3x3 fort size. 2x2 would probably be even faster, given that rendermax will have less map to check.
EDIT 2: Actually, fort size probably doesn't matter for rendermax specifically, since it looks like it's just checking the viewport not the whole map.
Hey Warmist, is this still being developed? Though even if it's not, what would I have to do to check it out? This looks super cool!
<...>Type rendermax light occlusionON into dfhack console in STANDARD print mode. <...>
Yeah I tried that first and it froze and never rendermaxed
Yeah I tried that first and it froze and never rendermaxedWhat DFHack version and OS? I did recently fix an issue that could cause just the DFHack console to freeze, but I think that was after 0.47.04-r1.
Whoops should have looked up what is the newest DF version :-[Yeah I tried that first and it froze and never rendermaxedWhat DFHack version and OS? I did recently fix an issue that could cause just the DFHack console to freeze, but I think that was after 0.47.04-r1.
<... random dev plans ...>
@lethosor: "DFHack version 0.43.05-r2 (release) on x86_64" and linux. And to clarify, its less frozen and more like the prompt for next command never returns plus rendermax doesn't execute.Yeah, this sounds like almost exactly the issue I fixed in this commit (https://github.com/DFHack/dfhack/commit/be517370a69ab6d8b35ffff58c6c5fc5068257ec). There's a chance it won't occur in the GCC 4.8 build, so if you're using the GCC 7 build, you could try switching, but I can't guarantee it will help. You could also try grabbing a DFHack development build from https://dfhack.org/builds/ and extracting rendermax.plug.so from it (I don't recommend using the entire dev build due to this issue (https://github.com/DFHack/dfhack/issues/1576) - not sure if rendermax will crash because of this, but it's less likely). This will only work with 0.47.04-r1, though. If you want to apply the commit to older versions, it would probably be straightforward enough, but would require compiling DFHack (https://docs.dfhack.org/en/latest/docs/Compile.html).
Sorry to necro the thread, but this seemed like the most logical place to post, and less obnoxious than opening up an entire new thread for it.You did 100% the right thing. This is a long-lived thread for a project - despite recent activity, posting to it will reach people familiar with the project, and posting to the forum at large would probably not be seen by the right people. (I don't have a lot of familiarity with rendermax, but I can take a guess.)
After perusing this thread, I used the commandIs this the literal command you ran? If so, I think you misinterpreted the help text:
rendermax light sun <.1>|cycle
...but am not getting any cyclical changes in outdoor lighting. How should I go about attaining that?
rendermax light sun <x>|cycle - set time to x (in hours) or cycle (same effect if x<0)
The "|" means "OR", so you should either run "rendermax light sun <some number>" or "rendermax light sun cycle". The <> symbols mean that some value is required, so an example of the first option would be "rendermax light sun 0.1". (All of these should not include quotes when run in the DFHack console.)The "|" means "OR", so you should either run "rendermax light sun <some number>" or "rendermax light sun cycle". The <> symbols mean that some value is required, so an example of the first option would be "rendermax light sun 0.1". (All of these should not include quotes when run in the DFHack console.)
we'll have to see what is possible with the new DF renderer. I suspect the answer is yes, though rendermax will not be in the first wave of plugins/scripts that we update for the Steam version. The question will come down to whether we can safely hook the low level renderer functionality.