Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 4 5 [6] 7 8 ... 23

Author Topic: [PRINT_MODE:SHADER]  (Read 89651 times)

lxnt

  • Bay Watcher
    • View Profile
    • pm:full_graphics
Re: [PRINT_MODE:SHADER]
« Reply #75 on: December 07, 2011, 02:07:35 pm »

I'm sorry, guys, we've got some stuff going on in Moscow for the last couple of weeks, so no time for this alas.
Hope it'll get somewhat clearer after 10th.

Mike Mayday

  • Bay Watcher
  • gfx whr
    • View Profile
    • Goblinart
Re: [PRINT_MODE:SHADER]
« Reply #76 on: December 07, 2011, 02:31:03 pm »

Oh shit

is the Russian regime opposing development of this patch??
Logged
<3

lxnt

  • Bay Watcher
    • View Profile
    • pm:full_graphics
Re: [PRINT_MODE:SHADER]
« Reply #77 on: December 08, 2011, 12:52:50 pm »

is the Russian regime opposing development of this patch??

Its convulsions hinder my concentration.

CheatingChicken

  • Bay Watcher
    • View Profile
Re: [PRINT_MODE:SHADER]
« Reply #78 on: December 27, 2011, 04:05:21 pm »

Hello, fellow Dwarflings.

As i tried to use this shader, i ran into some problems. I am pretty new to linux, in fact i only just set up a debian system as i read that this shader is available for linux only. So after i finally taught myself how to install all the necessary libraries and got the basic Dwarf Fortress application to run, i tried setting the [PRINT_MODE] to SHADER. Sadly, all i got was
Spoiler: this (click to show/hide)

After fiddling with the settings in the init.txt, all i managed to do was to turn the screen blue, which despite being pretty didn't help me an awful lot.

Does anyone know, what could be responsible for this?
Logged

arclance

  • Bay Watcher
    • View Profile
Re: [PRINT_MODE:SHADER]
« Reply #79 on: December 27, 2011, 04:43:07 pm »

Hello, fellow Dwarflings.

As i tried to use this shader, i ran into some problems. I am pretty new to linux, in fact i only just set up a debian system as i read that this shader is available for linux only. So after i finally taught myself how to install all the necessary libraries and got the basic Dwarf Fortress application to run, i tried setting the [PRINT_MODE] to SHADER. Sadly, all i got was
Spoiler: this (click to show/hide)

After fiddling with the settings in the init.txt, all i managed to do was to turn the screen blue, which despite being pretty didn't help me an awful lot.

Does anyone know, what could be responsible for this?

Are you sure you are using the latest version (the one in the first post)?  Older versions can cause problems like this with certain graphics cards (Nvidia for sure).
This looks similar to what happened when I tested the first version that did not crash with my graphics card (the green color is configured in init.txt now and its default color is black).
Spoiler (click to show/hide)
Each tile was being rendered as a single pixel, it was caused by the way the Nvidia drivers optimize GLSL code.

If you have an Nvidia graphics card make sure you install the proprietary Nvidia drivers, the open source one does not work as well.
Tell us what graphics card you are using (not all graphics cards will work) and post the terminal output you get when running Dwarf Fortress so we can help you with the problem.
Logged
I think that might be one of the most dwarfen contraptions I've ever seen the blueprints of.
The Bloodwinery v1.3.1 | Dwarven Lamination v1.5 | Tileset Resizer v2.5 - Mac Beta Tester Needed
Sigtext

CheatingChicken

  • Bay Watcher
    • View Profile
Re: [PRINT_MODE:SHADER]
« Reply #80 on: December 27, 2011, 05:23:52 pm »

The Terminal's output on the default settings is just "Frame drawn in x miliseconds" every ~300ms

after enabling the dumping, it looks like this:
Spoiler (click to show/hide)

I am using the version i got from the front page about 3 days ago.

The green screen is exactly what my blue one looked like. I could even see the cyan pixels where the fps counter was.

If this can be about Nvidia drivers i will look into that, as im pretty sure this machine uses some Nvidia card (I'm visiting my parents for christmas, so i dont have access to my own pc).

Thanks for the help, i will let you know if it helped.
Logged

arclance

  • Bay Watcher
    • View Profile
Re: [PRINT_MODE:SHADER]
« Reply #81 on: December 27, 2011, 05:50:45 pm »

The Terminal's output on the default settings is just "Frame drawn in x miliseconds" every ~300ms

after enabling the dumping, it looks like this:
Spoiler (click to show/hide)

I am using the version i got from the front page about 3 days ago.

The green screen is exactly what my blue one looked like. I could even see the cyan pixels where the fps counter was.

If this can be about Nvidia drivers i will look into that, as im pretty sure this machine uses some Nvidia card (I'm visiting my parents for christmas, so i dont have access to my own pc).

Thanks for the help, i will let you know if it helped.

Yes use the drivers from Nvidia, the open source drivers for Nvidia cards are not as good as the ones for other cards because the Nvidia drivers work well.
Print Mode shader has been tested to work with the Nvidia proprietary drivers (by me) but not the open source ones because they are not recommended for use beyond installing the OS.
Your frame draw times of ~300 ms look very high (I get 0-2 ms and lxnt reports that 16-17 ms is expected if your driver forces vsync) your graphics card or drivers may not be good enough.

In a Debian based OS you can use "sudo lshw" in a terminal to get information about all your system components or "sudo lshw -c display" just to give information about your graphics card.  This will tell you what your graphics cards model is and what driver you are using. 

Please post your full terminal output there is more information that can help tell if your graphics card will work.
If you are using dfhack don't start Dwarf Fortress with ./dfhack while trying to fix this problem, you will lose some terminal information from Print Mode Shader if you do.
It should look like this.
Code: [Select]
./df
textures::load(): data/art/Phoebus_20x20.png 320x320 16x16 20x20
textures::load(): data/art/Phoebus_20x20.png 320x320 16x16 20x20
Loading bindings from data/init/interface.txt
textures::load(): data/art/mouse.png 32x32
set_mode(): requesting vsync=0 and singlebuf=0.
set_mode(): SDL_GL_SWAP_CONTROL: 0
set_mode(): SDL_GL_ACCELERATED_VISUAL: 1
set_mode(): SDL_GL_DOUBLEBUFFER: 1
set_mode(): SDL_FULLSCREEN: 0
GLEW: 1.5.2
OpenGL vendor: NVIDIA Corporation
OpenGL renderer: GeForce GT 240/PCI/SSE2
OpenGL version: 3.3.0 NVIDIA 270.41.06
OpenGL GLSL version: 3.30 NVIDIA via Cg compiler
GL_MAX_VERTEX_ATTRIBS=16, needed=7
GL_MAX_VERTEX_UNIFORM_COMPONENTS=4096, needed=9
GL_MAX_FRAGMENT_UNIFORM_COMPONENTS=2048, needed=11
GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS=32, needed=0
GL_MAX_TEXTURE_IMAGE_UNITS=32, needed=3
GL_MAX_VARYING_FLOATS=60, needed=8
GL_MAX_TEXTURE_COORDS=8, needed=2
GL_POINT_SIZE_MIN=0, needed=4
GL_POINT_SIZE_MAX=63, needed=48
makeansitex(): 2.
Embedded shader set 'rect'
Embedded shader set 'cbr_is_bold' x
Using embedded vertex shader code from 'cbr_is_bold'.
Using embedded fragment shader code from 'cbr_is_bold'.
GL_COMPILE_STATUS: true
GL_COMPILE_STATUS: true
GL_LINK_STATUS: true
GL_VALIDATE_STATUS: true
makeansitex(): 2.
gps_allocate(80, 25)
Resetting textures
texdumpst::init(): allocating 2048x288 (max 64x9 32x32 cells)
accepted font texture (name=1): 2048x288px oa
accepted txco texture (name=3): 64x9px oa
reshape(): got grid 0x0 window -1x-1 tile 20x20 texture_ready=1 stretch=0 snap=0
reshape(): final grid 96x50 window 1920x1000 viewport 1920x1000 Psz 20x20
gps_allocate(96, 50)
set_viewport(): got 1920x1000 out of 1920x1000
Frame drawn in 2 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/dorfs.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/humans.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/goblins.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/elfs.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/koboldz.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/creature_birds.png 100x120 5x6 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/creature_domestic.png 440x120 22x6 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/creature_large_mountain.png 100x120 5x6 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/animals.png 240x600 12x30 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/water.png 80x140 4x7 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/gibbon.png 80x180 4x9 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/beasts.png 120x80 6x4 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/mans.png 240x340 12x17 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/newbeasts.png 120x160 6x8 20x20
Resetting textures
texdumpst::init(): allocating 2048x2656 (max 64x83 32x32 cells)
accepted font texture (name=1): 2048x2656px oa
accepted txco texture (name=3): 64x83px oa
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
reshape(): got grid 96x51 window 1920x1025 tile 20x20 texture_ready=1 stretch=0 snap=0
reshape(): final grid 96x51 window 1920x1025 viewport 1920x1020 Psz 20x20
gps_allocate(96, 51)
set_mode(): requesting vsync=0 and singlebuf=0.
set_mode(): SDL_GL_SWAP_CONTROL: 0
set_mode(): SDL_GL_ACCELERATED_VISUAL: 1
set_mode(): SDL_GL_DOUBLEBUFFER: 1
set_mode(): SDL_FULLSCREEN: 0
set_viewport(): got 1920x1020 out of 1920x1025
Frame drawn in 0 msec
« Last Edit: December 27, 2011, 06:11:25 pm by arclance »
Logged
I think that might be one of the most dwarfen contraptions I've ever seen the blueprints of.
The Bloodwinery v1.3.1 | Dwarven Lamination v1.5 | Tileset Resizer v2.5 - Mac Beta Tester Needed
Sigtext

CheatingChicken

  • Bay Watcher
    • View Profile
Re: [PRINT_MODE:SHADER]
« Reply #82 on: December 28, 2011, 03:42:36 pm »

I think i just made everything become worse. I tried installing the nvidia drivers, but lost internet connection half way through the installation. Additionally i've had to switch to a pc using an intel graphics chip.

Now all i can get is this:

Code: [Select]
./df
textures::load(): data/art/Chickentiles_Smoothed.png 192x192 16x16 12x12
textures::load(): data/art/Chickentiles_Smoothed.png 192x192 16x16 12x12
Loading bindings from data/init/interface.txt
textures::load(): data/art/mouse.png 32x32
set_mode(): requesting vsync=0 and singlebuf=0.
SDL_SetVideoMode: Couldn't find matching GLX visual
SDL initialization failure: Couldn't find matching GLX visual

Any help?
Logged

arclance

  • Bay Watcher
    • View Profile
Re: [PRINT_MODE:SHADER]
« Reply #83 on: December 28, 2011, 04:00:35 pm »

I think i just made everything become worse. I tried installing the nvidia drivers, but lost internet connection half way through the installation. Additionally i've had to switch to a pc using an intel graphics chip.

Now all i can get is this:

Code: [Select]
./df
textures::load(): data/art/Chickentiles_Smoothed.png 192x192 16x16 12x12
textures::load(): data/art/Chickentiles_Smoothed.png 192x192 16x16 12x12
Loading bindings from data/init/interface.txt
textures::load(): data/art/mouse.png 32x32
set_mode(): requesting vsync=0 and singlebuf=0.
SDL_SetVideoMode: Couldn't find matching GLX visual
SDL initialization failure: Couldn't find matching GLX visual

Any help?

Almost all Intel graphics chips except the ones in the new sandbridge cpu's do not have the required OpenGL and GLSL features or shader specs to be used with PRINT_MODE:SHADER.  This is why in Windows most games will crash at startup if you have an Intel graphics chip.
Your terminal output indicates that you may not have installed all the dependencies for Dwarf Fortress or that your graphics card/driver can not take advantage of those dependencies.

Please take a look at this post I made about setting up linux to play Dwarf Fortress to see if you missed anything
Also please extract dwarf fortress again in a different location and run it without installing print mode shader and post its terminal output to make sure this is not a problem with Dwarf Fortress itself. 
There is one dependency I had to install in Ubuntu 11.04 that is not listed in the readme and I don't remember what it is, this will check for that and tell us what it is if you don't have it.
Post the results of "sudo lshw -c display" so we can see what graphics card you have.  I can look up the stats on the card and tell you if it will never work.
Logged
I think that might be one of the most dwarfen contraptions I've ever seen the blueprints of.
The Bloodwinery v1.3.1 | Dwarven Lamination v1.5 | Tileset Resizer v2.5 - Mac Beta Tester Needed
Sigtext

CheatingChicken

  • Bay Watcher
    • View Profile
Re: [PRINT_MODE:SHADER]
« Reply #84 on: December 28, 2011, 04:15:24 pm »

The Problem is, i had the same error when trying to run it on the nvidia machine (where i just couldn't finish the driver installation, as i lost any connection to the internet). Also i get this error on any PRINT_MODE except for 2D and TEXT, which seem to be running just fine.

I will have a look at your post, ill tell you if it changes anything
Logged

lxnt

  • Bay Watcher
    • View Profile
    • pm:full_graphics
Re: [PRINT_MODE:SHADER]
« Reply #85 on: January 12, 2012, 12:17:32 pm »

Now all i can get is this:

Code: [Select]
SDL initialization failure: Couldn't find matching GLX visual

This basically means that you don't have any GL drivers available at all.

In fact I would not recommend using Debian, because it lags so much in software versions compared to pretty much any other distro.

Go for the latest Ubuntu release, and even then you might have to install xorg-edgers stuff if you've got ATI/AMD or Intel hardware.

 

CheatingChicken

  • Bay Watcher
    • View Profile
Re: [PRINT_MODE:SHADER]
« Reply #86 on: January 13, 2012, 02:58:03 am »

I guess ill try this. Hope i dont mess it up again ^^

I pretty much broke my debian anyway. Cant remove the drivers, it says theyre not installed, but also i cant install them because it tells me theyre already there...
Logged

Iceco

  • Bay Watcher
    • View Profile
Re: [PRINT_MODE:SHADER]
« Reply #87 on: January 13, 2012, 02:59:20 pm »

I'm still trying to wrap my head around this, so forgive me if I miss the ball here.

Random remarks:
  • If I understand it right, the main incentive for this utility was increasing FPS by offloading the graphics to the GPU (but with neat consequences like the SHADER mode)?
  • Can it draw multiple tiles (from the tileset) + characters (from the characters set), or just 1 tile and 1 character.

I think it would be interesting to be able to draw multiple tiles on top of each other (f.e. the floor tile + the rope lying on top of it). I think it would probably need specially designed tilesets, but you already have Mayday's interest.
  • And I don't know how you determine what tiles to draw, but if you look directly at the items that that need drawing (and not which one of the 256 icons represents it), this could potentially allow for extended graphics sets of more than 256 icons.
  • And if you ever allow for different-size icons, it could be neat for the supposedly 3-tile wide wagons and forgotten beasts that currently look rather underwhelming.
Logged

lxnt

  • Bay Watcher
    • View Profile
    • pm:full_graphics
Re: [PRINT_MODE:SHADER]
« Reply #88 on: January 19, 2012, 01:21:03 pm »

If I understand it right, the main incentive for this utility was increasing FPS by offloading the graphics to the GPU (but with neat consequences like the SHADER mode)?
This was the original motivation, and in fact the speedup provided is noticeable, although not quite significant on latest hardware.

Can it draw multiple tiles (from the tileset) + characters (from the characters set), or just 1 tile and 1 character.
I think it would be interesting to be able to draw multiple tiles on top of each other (f.e. the floor tile + the rope lying on top of it). I think it would probably need specially designed tilesets, but you already have Mayday's interest.

This was originally a side-feature. However, it turned out to be impossible to implement without hijacking all of map drawing from the game engine. So it currently does not do that, while I wait for when either I overcome my (busy|lazi)ness, or there's next DF release (that would most certainly require rework of the entire renderer anyway)

And if you ever allow for different-size icons, it could be neat for the supposedly 3-tile wide wagons and forgotten beasts that currently look rather underwhelming.

I think it's up to the game engine to support multiple-tile creatures first before they can be drawn.

lxnt

  • Bay Watcher
    • View Profile
    • pm:full_graphics
Re: [PRINT_MODE:SHADER]
« Reply #89 on: February 08, 2012, 05:18:37 pm »

I'm back.

First, I pushed mouse fix and a crash fix. It crashed on second texture reset, so never while playing, thus not quite important; I noticed it only accidentally.
No binary upload yet.

Second,
Code: [Select]
>>> import memxml as mx
>>> mx.init()

...

>>> mx=reload(mx)
>>> mx.init()
>>> for crea in mx.crea_vector:
...   if crea.contents.name.has_name:
...     print crea.contents.name.first_name
...
iden
dastot
zulban
ilral
edem
id
tulon
>>>

This is embedded Python interpreter, using dfhack's Memory.xml parser (written in Python of course) and some ctypes magic to read meaningful stuff from the game.
As you can see, using Python's module reload feature it is not needed to ever restart the game while debugging and writing code, unless one manages to crash it.

It will be used in getting to know game internals and prototyping the map draw code.

The branch will be pushed to the github as soon as I clean it up somewhat.

Pages: 1 ... 4 5 [6] 7 8 ... 23