Skip to content
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

How to use a model with colours and textures? #83

Open
rohang1411 opened this issue Jan 19, 2022 · 1 comment
Open

How to use a model with colours and textures? #83

rohang1411 opened this issue Jan 19, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@rohang1411
Copy link

Hey, I have a .obj model and I'm converting into .stl format to use it since .obj files are not supported. But in the process I'm loosing the colours and texture since .stl files don't have texture information. Can anyone please suggest how can I incorporate those as well in the overlay. Maybe by using any other format which supports colours and textures and is it supported by the code?

Also all the models I try come with red colour is there an option to change that?

@thompson318
Copy link
Collaborator

BARD and sktutorial01 both use sksurgeryvtk for display. sksurgeryvtk doesn't currently support texture mapping, sorry. You could implement it separately, acting directly on the vtkActors, see here for a starting point.

The good news is that setting colours is more straightforward. In the directory where your models are located you need a colours.txt file, like this one. Each line has the name of the model file, followed by its desired colour in RGB format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants