|
|
Convert TS7.5 materials/shaders to .bmp?
About Truespace Archives
These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.
They are retained here for archive purposes only.
Convert TS7.5 materials/shaders to .bmp? // New Users
Post by tamtam // Feb 9, 2008, 6:57pm
|
tamtam
Total Posts: 213
|
:confused:Can someone please tell me if there is a way to convert TS7.5 shaders and materials into a bitmap (.bmp). If there is a way to do this, please explain the step-by-step process, as for your response i'm guessing it will have something to do with the Link Editor or some scripting (I don't know anything about TS python scripting, and have never used the Link Editor).
I will be so happy if I could convert the shaders/materials into .bmp files! :jumpy::):):)
If I could convert the materials and shaders, then I could use them as UV maps for my game objects, and characters!:) |
Post by Jack Edwards // Feb 9, 2008, 8:44pm
|
Jack Edwards
Total Posts: 4062
|
The scripting languages for Workspace side are JScript and VBScript. :)
Saving out procedural DX shaders can be tricky but there's always the cheat of putting the material on a plane, lining up the camera, and doing a screen cap or saving the current view buy using the Render to File icon found at the bottom right on the flyout that has the manual.
For exporting UV bitmaps the best method is to use the Export Texture to File icon in the UV editor. You can change the export options on the Export aspect of the UV Preferences panel in the stack view while the UV Editor is open.
There's also an option to set up a paint package to edit the UV texture in and if changes are made to the texture in the paint program, when the changes are saved out they automatically update on the model. It uses a temporary file so make sure you save the final to a different file when you are finished.
Let me know if that helps! :) |
Post by kena // Feb 9, 2008, 9:41pm
|
kena
Total Posts: 2321
|
If you want to convert between various formats, you could use "the Gimp". It's free and does many of the things that PaintShop does. Then again, if you HAVE PaintShop, you could use it to save-as a different file format. |
Post by TomG // Feb 11, 2008, 5:19am
|
TomG
Total Posts: 3397
|
Remember that there are many parts to a shader.
For color shaders, you can render onto a plane, and that way capture procedural color shaders into an image to apply onto a model. This can let you use things like procedural wood, etc, in tS and then export that. Or you can use the UVE to export too, in a more unwrapped manner.
For reflectance and transparency shaders though it's not as straightforward. These are defined not by something as simple as an image, but by a set of parameters that determine how they respond to light. Rendering onto a plane will not capture these dynamic properties - so sure you're resulting image will have a certain amount of shine, but only the shine for the plane that you rendered in that particular lighting. When used in game, it won't respond to the game lights with a particular amount of shine etc.
For now, you'd have to recreate the shader parameters yourself in your chosen engine.
But I think you are mostly thinking of the first one, about capturing color shaders :)
HTH!
Tom |
Post by tamtam // Feb 11, 2008, 1:16pm
|
tamtam
Total Posts: 213
|
All this is really helpful. Thanks everyone!
But a couple more things on this topic:
1.) How do you project a texture from a model onto something like a plain?
2.)Can you use a selection tool to specify what part of the model you want to project onto the plain?
3. In the material editor, can the selected faces painted with the paint face tool be projected onto a plain too?
I just wanted to know more about projecting textures, because if I learn how, I could capture the rendered image on the plain which I would project the textures onto. Then I could use them as UV maps. :jumpy:
:)tamtam:) |
Post by Jack Edwards // Feb 11, 2008, 8:45pm
|
Jack Edwards
Total Posts: 4062
|
Hi Tamtam,
Textures *are* 2D bitmaps. The UV mapping is what tells TrueSpace and your game engine how to wrap that 2D image onto your model.
So to paint textures you need to:
1.) UV map your model.
2.) export the UV mapping as a bitmap.
3.) load the UV bitmap into the paint program of your choice.
4.) paint the texture bitmap and save it out.
5.) Use the Material Editor to load and apply the texture bitmap to your model.
UV mapping is a fairly complex process. It's a lot of work and there are no short cuts. The best method that I've found is to planar map separately the contiguous sections of the mesh that share a similar angle, then stitch them back together in the UV Editor.
While TS had adequate tools for UV mapping, for serious UV work you'd be much better off buying a program like Ultimate Unwrap 3D (for mechanical type models) or Headus for organic models. I use both of these programs and they save a LOT of time. |
Post by TomG // Feb 12, 2008, 5:44am
|
TomG
Total Posts: 3397
|
Also, when people talk about rendering on a plane, its for this issue -
You use the trueSpace Wood shader to make a great wood texture. Or maybe you use ShaderLab or Simbiont. Now you want it on your game object - well your game engine wont have the trueSpace procedural shaders, or Simbiont or ShaderLab.
So what you do is create a plane, you copy your great material, you paint the plane with the material. You look at it directly from above, fill the render window with the plane, and render.
You have now "baked" your great wood texture into an image, that you can then apply to your game model, as game engines certainly support having textures as images.
So there is no special way of projecting the object onto the plane - instead, it just means painting the material onto the plane and rendering it for use as a texture.
As noted this only captures the color etc, and is no good if you have a procedural reflectance or transparency shader (if your reflectance shader has rough rusty spots on shiny metal, then it WILL capture those in the end result of the material in the image, but your object in game will not have varying amounts of shine on it by this method, the rusty spots will be dark and rusty in color but will be just as shiny in your game engine as the rest of the object).
It's a quick and easy method though for grabbing nice procedural textures and making them available in game to some extent.
Note that you do then have to go and UV map and paint this rendered image onto your object, plus you probably have to edit it in a 2D package to make it seamless for most uses.
For unwrapping an object onto a plane, the UV Editor is used, which lays out the mesh and the texture under it and that can then be exported to an image for editing.
HTH!
Tom |
Post by tamtam // Feb 12, 2008, 1:58pm
|
tamtam
Total Posts: 213
|
I just had a really good idea!
For UV mapping parts of an object separately, or as a whole:
1. Select the faces (ones for separate UVs)or the entire model.
2. For separate faces, if they are in a straight line without much curve, plainar mapping would work best. We could also try to select the faces on the back of the model, plainar map them, and then, as a separate selection, select the faces on the front of the model, and also plainar map them.
3. Paint the model's separated UV map faces, and/or the single UV map with the front and back of the model using a paint program.
Another way:
1. Before you start painting your UV maps, save them under a different file name than the one you are going to use.
2. Use the image of the UV map on a large plain. Use the material editor to find your image of the unpainted UV map.
3. Use the 3D paint tools to paint your texture onto the plain with the unpainted image.
4. Render to file in TS once you are happy with your results, but only in the view that shows the plain from the front view. Save it as a different name.
5. Crop your image if you need to by using a paint program.
6. You can also add other details to the image that you made in TS, also using a paint program.
7. Then, just use that image as your texture for your model.
- tamtam :banana: |
Post by spacekdet // Feb 12, 2008, 2:09pm
|
spacekdet
Total Posts: 1360
|
A couple links to tutorials that may help:
Graysho's UV Mapping Video Tutorial (http://forums1.caligari.com/truespace/showpost.php?p=24960&postcount=1)
Tile's UV Mapping Tutorial Page (http://reinerstileset.4players.de/TS66_UV_Mapping_Editor_Tut_E.htm) |
|