popojan / goban

3D igo/baduk/weiqi/go game board and GUI for GnuGo and other GTP engines ray traced by GLSL shader
https://hraj.si/goban
GNU General Public License v3.0
47 stars 3 forks source link

Default view #43

Closed ParmuzinAlexander closed 3 months ago

ParmuzinAlexander commented 8 months ago

How do I make the default 3d view? Example https://imgur.com/1KocqoZ I'm trying to edit vertex.glsl, but it's hard to do it at random.

popojan commented 8 months ago

You can achieve that editing vertex.glsl, however it would break both pointer coordinates and stone text overlay, as board rotation is handled also by the C++ code. I will consider saving current view into config.json on request as a new feature.

More ambitious, for future game replay or tsumego we could even optionally misuse SGF comments to save the view angle and zoom, possibly for each move and even interpolate between them.

ParmuzinAlexander commented 8 months ago

If the project is not frozen, then load and watching games should be the most important thing. But is this in the plans for several years and it's still not done? I tried "Load game" in menu, nothing happens.

popojan commented 8 months ago

Thank you for your feedback. It is rather frozen, I am sorry not to live up to possible expectations, but we could resume anytime where we left off. You mention "Load game" menu item, which was hidden in the last version. Is there a reason you use the older goban version, other than the anticipation of the feature, if I may ask?

ParmuzinAlexander commented 8 months ago

This is the latest version. I just really wanted to load the game, maybe just the final position without navigation or something. And the menu still had to be changed, it got in the way when the mouse was at the top of the board. https://imgur.com/dA11Ozg

gjask commented 8 months ago

More ambitious, for future game replay or tsumego we could even optionally misuse SGF comments to save the view angle and zoom, possibly for each move and even interpolate between them.

Actually you don't need to misuse comment. SGF specification allows usage of custom/private properties^1. So you can tailor your own SGF properties to suit your use case.

ParmuzinAlexander commented 3 months ago

Great to see such a big update. Maybe it's easier to change the board color (Minimal Thin) to #dcb771 now?

popojan commented 3 months ago

Thanks. One might edit the last material in data/shaders/fragment/partial/material/thin.glsl#L21.

However the result might be affected by lighting model. Is it a standard color to be considered?

Given your hex color, the material definition would be written as:

MAT(das1, mat3(vec3(0.862745, 0.717647, 0.443137), vec3(0.862745, 0.717647, 0.443137), vec3(0.0)), texSolidColor)

With the default view tilt and lighting this gives #d4b776 (color picked from a screenshot), which is quite close.

ParmuzinAlexander commented 3 months ago

Yes, that's almost what I did, so it was right. Thank you. But I noticed that the textures of the stones have also changed and in Red Carpet the texture of the black stone looks like a shell instead of a white stone. Is this correct?

popojan commented 3 months ago

You are right, that's my mistake. The standard (I have never seen IRL) is shell for white stones and slate for black ones. I suppose the textures and colors should be tweaked further. I will look into it.

Would something like this be more appropriate? image

ParmuzinAlexander commented 3 months ago

If you want to improve and make it photorealistic, then too many lines make the color too gray and hard to see without zooming. A couple of examples https://i.pinimg.com/originals/1c/a4/a1/1ca4a105f783e7078be88cbb41b399c1.jpg https://kurokigoishiten.com/cdn/shop/files/MGS-BLR50-404-01-02_1500x1200.jpg https://github.com/ParmuzinAlexander/go-themes/blob/master/non-free/1.png

For example, for my stones https://github.com/ParmuzinAlexander/go-themes/blob/master/white1.png I used #d6d1cb instead of grey...I don't know if this can help...

popojan commented 3 months ago

Thank you for the hints.

I am trying to improve the textures and lighting, e.g.

like this shell-texture

Photorealism with (soft?) reflections is barely possible though, with the current übershader design, it would severely hit performance. The GUI was meant not to require a dedicated graphics card.

ParmuzinAlexander commented 3 months ago

Looks great.