-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix: Problems with textures in 3d visualizer with bitmap visualizer. #2167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
paxcut
wants to merge
9
commits into
WerWolv:master
Choose a base branch
from
paxcut:ImagesAndTextures
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In 3d visualizer there is an option to specify the path to the texture file that will be applied using the uv coordinates. Unfortunately any attempts to fill in the text field for the path is met with the immediate removal of the text with no other consequences. This occurred because the value was being reset when more than one frame was needed to process the request which is always. The variable doing the replacement is the one used to specify the texture path from the commend line. The fix is to check which of the two names is empty and if both are not empty then keep the last one assigned and discard the older one. Another problem with images was found in the bitmap visualizer when colors were stored as 32 bit values like eg rgba. I made some changes so that it works but the number of rows passed to the visualizer must be half of the actual number of rows the image contains. This is done so that the code still works for the older images with 16 bit indices and even further down to 4 bits per index. The visualizer should calculate those values automatically based on the input data and the numbers passed on the command line.
…version was designed to work with the TIM format which has some peculiarities that are not general enough. The current implementation has the following specifications. . Whether colors are in a lookup table or part of the image itself they are always 32 bit R8G8B8A8. . If using a color LUT the image then has indices as its element. Indices can have 16(32000 colors), 8 (256 colors) or 4(16 colors) bits each. .For the cases 0f 16 and 8 bits, the data should be an array of N*M elements of the given size where N is the number of rows and M is the number of columns of the image. . For the 4 bit case use an array of N*M/2 bytes so that each column contains two indices. ToDo: Documentation, sample patterns and unit tests. The 3-d visualizer can now handle textures from both the command line or the user interface and things should work as expected. A command line entry will be automatically displayed in the user interface, but changes will be applied immediately as you type or use the file picker. If the user interface text is deleted, then the command line texture will be used again. If a texture is invalid for any reason, then the previous one, if any, will be still in use and an error message will be displayed until the problem is cleared. Valid textures are image files that the stb library can open.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In 3d visualizer there is an option to specify the path to the texture file that will be applied using the uv coordinates. Unfortunately any attempts to fill in the text field for the path is met with the immediate removal of the text with no other consequences.
This occurred because the value was being reset when more than one frame was needed to process the request which is always. The variable doing the replacement is the one used to specify the texture path from the commend line.
The fix is to check which of the two names is empty and if both are not empty then keep the last one assigned and discard the older one.
Another problem with images was found in the bitmap visualizer when colors were stored as 32 bit values like eg rgba. I made some changes so that it works but the number of rows passed to the visualizer must be half of the actual number of rows the image contains.
This is done so that the code still works for the older images with 16 bit indices and even further down to 4 bits per index. The visualizer should calculate those values automatically based on the input data and the numbers passed on the command line.