How to export model with color information(not .tg3)

General discussion about TexGen.

Moderators: Martin, Developers

Post Reply
y202120
Posts: 1
Joined: Fri Jun 18, 2021 7:35 am

How to export model with color information(not .tg3)

Post by y202120 »

Hello Louise, First of all thank you for all the work on TexGen.
I would like to ask you two question.

Let me explain my situation first, I have to render 3d model created by TexGen Using python script on my pyqt app.
So I export TexGen model to .stl, .vtu because they can render on pyqt app using by vtk library.
But they does not have a color information. That is my problem.
What I want is to make it look like it's in the TexGen Gui.
Is there a way to give color information to .stl or .vtu file extension?
If that is impossible, is there any other file extension that I can export with color information?

And I have a one more question.
This is a separate question from the one I asked before.
When I command with a .tg3 extension, Like this : "TexGenGui C:\Users\path\savetoxml.tg3" on Windows cmd.
1. Spawn a TexGenGui window and load that .tg3 file on seperated window.
2. Load the .tg3 file and turn it off immediately.

What I want is to load the .tg3 file and keep it on.
Is there any command option to make this possible?

Any advice would be appreciated.
Thank you for helping me.
louisepb
Project Leader
Posts: 998
Joined: Tue Dec 08, 2009 2:27 pm
Location: Nottingham

Re: How to export model with color information(not .tg3)

Post by louisepb »

Hello,

There is no direct way of exporting the display colours from TexGen. If you use the .vtu export then there is data exported with the file including the yarn number. In your app there may be a way of using the information to display the yarns in different colours. When the vtu is displayed in Paraview it is possible to filter by yarns and each is displayed in a different colour.

I'm not sure if I understand your second question correctly. Do you mean that you try to create a render window from a script which creates a render window which then disappears? This is the same as the question here: http://texgen.sourceforge.net/phpBB3/vi ... f=1&t=5326. Unfortunately I haven't had time to investigate this yet.

Hope that helps,
Louise
Post Reply