Open leon196 opened 2 months ago
Hello ! Just saw your comment, I will try to reproduce the problem !
@leon196 After some test I didn't succeed to reproduce your bug
I first tried with a big image as Sprite2D :
Then I tried scaling this image to 1000 to see if your problem is caused by a too big image for the previewer but still I can see it fully and clearly :
Maybe you can help me with some additional info :
Also when you say " the preview is not at full resolution" did you mean that your image in the preview is cropped ?
Those inputs could help me too fix your issue :)
Thanks for the quick reply and taking the time to test.
What contain your 2D view ? It's a set of sub viewport containers, in a comic game layout
Whats the zoom level of your 2D view ( your real 2D view not the previewed one ) I'm not sure about this one, I'm trying to get the render of sub viewport containers to match any resolution.
If you only have a sprite2D ( whats size ? ) I've tried with a sprite2D and I see it works best, specially when I zoom in details.
Here's a video, it's hard to see quite right the actual resolution because of the compression: https://github.com/user-attachments/assets/70a1b3a8-7ec7-4e91-8edf-d4d512919c6b
Now that I've tried with a sprite2D, I think the plugin works as it should. It's how the minification of the texture works.
This is a screenshot of the default 2D view.
And with the previewer.
Since it's hard to tell, here the two close up of the views.
My goal is to pin the 2D view, to keep track of the comic layout, so I can update camera placement, while having a global view of the layout. I'll try to interact with the plugin source code a little more and keep you posted if I get something interesting.
Thanks for the huge input you gave me, It's really help me a lot to understand the problem you face ! I will take a look and try to fix this but it could take me some time, if the sprite2D method work go with it for now if you can
@leon196 I tried to setup my project the same as yours, but even in that I didn't succeed to reproduce your problem, here is my 2D preview quality using subview and control texture node :
And here is the actual 2D control texture node quality in the 2D editor :
Look like there is no difference for me, maybe try using the "nearest" option in your SubViewPortContainer ( the green one )
Interesting, thanks for exploring the issue. Setting nearest filter will change the rendering of the viewport container, but it still lacks of resolution. I'm playing with container size of the plugin scene, but I'm breaking everything very quickly. I'm not able to look at it further this week, but I'm keen to learn from your plugin to get that second 2D view screen.
I will continue to check when I can, though maybe not with pixel art images.
Don't hesitate to share your thoughts or progress on your investigation here or in a discussion topic on the repo. I will try to help you as best as I can.
If you succeed in fixing the problem on your own, don't hesitate to open a PR that I can review and merge for other users who might face the same issue. 😊
I just wanted to chime in - I was also having this issue and managed to resolve it by modifying res://addons/Previewer_2D_3D/Previewer2D3D.tscn
Both the Preview and TextureRect control nodes were the wrong size for my editor:
So I set them both to Full Rect:
Not sure if it was necessary, but I also changed the 3D_Viewport and 2D_Viewport nodes to match the resolution I wanted.
And most importantly, I had to disable and re-enable the addon in the editor settings.
It's a great addon by the way! Very useful for my purposes. 😃
Hello @bencmckenna
Great finding !!! Thanks a lot for taking the time to dig in I didn't succeed to reproduce so I was a bit blocked to help !
If you want to contribute and open a PR maybe @leon196 could test it too ? then i will merge it into the project ! 😄
@Meta-Ben I actually made some modifications so that it swaps between the native 2D/3D editors when I hover the mouse over the preview panel. I find it a bit more intuitive for my purposes, but it's a bit of a departure from your original implementation.
https://github.com/user-attachments/assets/f105c504-8dd7-4392-8f01-f65effd9a0cd
Would it be worth adding to the PR?
@bencmckenna Its an amazing modification, I really love it !!
I think it could be nice to implement it in a separate PR ! Like, one for the fix of @leon196 problem and another one with this cool enhancement !
I approved the PR @bencmckenna, are you able to merge it ? ( if not I will do it )
@Meta-Ben Thanks! I don't think I can merge it, you'll need to do it on your end :)
Hello,
I've tried the pull request but it seems that the layout is out bounds (the gray area in the screenshot below):
At the moment I've come with an alternative where I control the 3D camera by selecting the frame itself
Thanks for your test @leon196, can you share your godot version + OS ? I think I will do more test on the PR to avoid breaking things @bencmckenna maybe you can try to open the second PR with the 2D/3D behavior you made on the current base if possible ?
that was a screenshot from Godot 4.3 on Zorin OS 17 (Ubuntu 22)
I tried on 4.3 too but on MacOs and no issue
Mmmmh I think that to avoid breaking thing we can skip the fix for now, see if more people come in this issue or if someone managed to find a workaround or if more tester come for the PR, if the code evolve too much I can make the PR follow the main branch over time
And maybe @bencmckenna you can open a PR without the fix but with your feature enhancement implementation ( 2D/3D switch on panel hover ), what do you think ?
@leon196 Thanks for testing! Sorry it didn't work. I'm a bit out of my league working with control nodes so I'm not sure what could be causing the issue... 😅 I'll look into.
@Meta-Ben No problem - I still have a few problems I still need to iron out, but I should be able to make it available for testing later in the week.
Hello,
Thanks for the add-on, this is very useful. It appears that the preview is not at full resolution, this is a screenshot of project with Godot 4.3:
I'm looking at trying to fix it but I'm still learning how to use Godot and custom add-ons, so I'm wondering if you know how to resolve it?