convert jpegs to materials

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 jpegs to materials // New Users

1  2  |  

Post by jofan // Oct 21, 2008, 9:23am

jofan
Total Posts: 56
Hi all,


sorry if this has been asked before but I have a lot of jpegs that I would like to convert to simple Truespace materials.


Is it possible to do this as a batch process or any other 'automatic' method?


Kind regards


J

Post by RichLevy // Oct 21, 2008, 12:48pm

RichLevy
Total Posts: 1140
pic
It depends on what you mean... are you just talking about putting them in a folder and letting TS know where your textures are, or do you mean converting them into shader materials, are you talking about the old TS6.6 side or do you mean the new TS7 side?

Old TS side just open the Image Browser and point it to your textures (in a folder)

In the new WS TS side you need to make a library palce to hold all of your textures you do that by opening the Library Browser, when the Library Browser pops up right click in the widow and that brings up a Create new Library tab pop up, click that and name a library you want to create.
Now you have 2 ways to populate it, one is to use Windows Explorer and just click drag all of your files over to this folder (it in in your RSMain Library folder in your TS7.6 folder) when it is filled with all of your wonderful textures you can just click on it's name in the Library Browser and it will appear in your stack view...
2nd way, right click in the library when it is in the stack and bring in 1 single file at a time... slow but it works, good for whe you only need 1 texture while doing some editing and modeling.

WARNING!!!! File this up with high resolution many mega pixel textures and you will bog down your TS experience. I am trying to find the happy medium of having the textures I want to use on hand and not having too many texture library's open on the stack. If you are using smaller textures than you should be fine (512x512 type stuff, I am using many 2K and up textures right now) they are fine in TS they just slow down browsing thru the library's and loading TS.

Hope that was what you were looking for.


Rich

Post by trueBlue // Oct 21, 2008, 1:17pm

trueBlue
Total Posts: 1761
pic
It would be good to know the differences from External and External Load Only.
Maybe Tom can enlighten us?

Post by jofan // Oct 21, 2008, 7:58pm

jofan
Total Posts: 56
Hi Rich,


Many thanks for the quick response

I am using TS7.6 and so far only the Workspace side of things


I have now managed to get my jpegs into the library OK, but it is the next step of applying them all to materials


What I have been doing is loading the basic material type and dragging my jpeg accross then importing the new material into a new library


Each time though I will have to give the new material a name (which can be the same as the jpeg name) and apply a thumbnail (which can be the same as the jpeg image), it is due to this that i was wondering if the new material could automatically take on the name and thumbnail of the jpeg?


Kind regards


J

Post by RichLevy // Oct 22, 2008, 4:10am

RichLevy
Total Posts: 1140
pic
I have a 2 monitor setup so I tend to try to take advantage of it as much as possible, one of the things I do if I think I am going to be doing lots of textures is I have the folder I am pulling the textures from open, I also have a shortcut to my RSMain Library/My Textures on the desktop this way I can just drag the textures to that folder, they will maintain the same names and the jpeg thumbnail will add itself in the library with them.


As for applying the textures that is a bit different.

1) have the Material Editor open

2)You need to get a texture node open, the easy way to do this is to use the eye dropper tool from the ME and just click on an already textured object.

3)than you can go and place the texture on your object by using the Paint face/s or the paint object icons


You can place a texture in the Texture in the stack (shown in picture)


I was shown this method by some of the nice people in this forum, I am sure it is well documented int eh manual (I never found it :D)...


HTH


Rich

Post by spacekdet // Oct 22, 2008, 7:55am

spacekdet
Total Posts: 1360
pic
Something to keep in mind is consistent tS terminology.

A 'Material' in trueSpace means that it is the combination of Color, Displacement, Reflectance, and Transparency.

A 'Texture' in trueSpace means it is a single image file in JPG, TGA, PNG, etc format used in the Color channel or as a mask in one of the other channels.


Creating a 'Material' means that you are tweaking the other channels -adding different bump/displacement maps, changing reflectance parameters, etc, in addition to changing the texture image.

If all you are doing is changing the texture image and saving it to a new 'Material Library', you're doing a lot of work for nothing and ending up with a lot of duplicates.

Just create a new Library and use Windows to move the texture images into it as Rich described earlier. Open the Library from inside tS and all the textures will be available for use, already named, etc.

It's only when you start changing the other channel parameters -adding bumps, changing reflectance, etc, then you are indeed creating a new 'Material'. This is the point that you could open or create a new 'Material Library' and start saving new Materials. It will save the combination of all four channels- the Color or texture, the bump maps, etc.

Post by jofan // Oct 22, 2008, 7:45pm

jofan
Total Posts: 56
Thanks for clarification Spaceket and thanks also Rich (this is the method i have been using).


Space, may i ask then that if i have a cube (for example) and wanted to simply apply a different texture to each face (say from 6 diferent jpeg images), can i just create one material and keep replacing the image (jpeg) 6 times or do i require 6 unique materials for this (sorry im not able to try this until later to find out)? I just assume all previous faces with the same material would be overwritten?


Kind regards,


J

Post by Georg // Oct 23, 2008, 12:02am

Georg
Total Posts: 270
pic
yes, you can change any of the material parameters independent of the others. As spacekdet nicely explained a material is made up of 4 parameters as shown in the material editor for Vray I enclosed: your texture (Jpeg) will be the color parameter. So you can change the texture without affecting the glossines (reflectance), bumpiness, transparency at all.

Mind you, displacement with a bitmap is often associated with that bitmap so you may want to change that as well.

Your example of a cube, or any model, is a bit tricky. Changing the texture of one side can only be done by painting the face(s) of that side. For a cube it is easy, anything more complex will require UV mapping in the UV editor.

georg

Post by TomG // Oct 23, 2008, 4:54am

TomG
Total Posts: 3397
Note that by changing the jpg in the material, you are making a new material really. A material is the complete combination of color shader (which would include texture map), reflectance shader, transparency shader and bump / normal map shader. So changing any parameter gives you a new material, which would include changing the JPG being used as a texture map.


If you're cube has the same reflectance, transparency and bump / normal maps on all sides, then you would just change the material by changing the JPG used in the Texture Map shader and then use the Paint Face tool to paint one face. Then you'd change the JPG used in the Texture Map shader to get your next material and use Paint Face again on another face.


To change all materials that are the same, you use Paint Over Existing Material - this replaces all occurences of that material on the model with the new material in the Material Editor. With a cube with 6 different faces though, the tool would have no benefit (as each material is only on one face).


You can also vary the reflectance, transmission or bump / normals as well as varying the JPG texture, it still counts as a new material whether its just the JPG in the Texture Map shader that changes, or if it is other parameters too.


HTH!

Tom

Post by fahembree // Oct 23, 2008, 5:41pm

fahembree
Total Posts: 123
pic
When I try using the material editor on the workspace side of TS75, I don't have the options for color, transparency, reflectance and I haven't found a way to activate them. Is this because I don't have VRay? This material was applied from model side where there are setting for color, transparency & etc, but not on the workspace site??

See attached image.

Post by TomG // Oct 24, 2008, 1:27am

TomG
Total Posts: 3397
The shaders in workspace are DX9, and so are built differently from the old Model side ones and displayed differently too. Easiest thing to do is find the matching existing shader - eg Solid if you want to use color rather than a texture map, Solid Transparency if you want to have some transparency. All the settings are then shown in the one panel rather than divided up into separate tabs.


You can get into more complex editing and creating of new DX9 materials by combining different components by using the Link Editor. You can click on "Edit DX material in Link Editor (advanced)" to do that, which then lets you get into selecting the different channels for transparency, color, etc like you would on the Model side. DX shaders can be assembled in much more complex ways, though, with many more options, and this is why the LE is used as opposed to a simple panel driven interface like the Model side - you can take the output of any logic block and process it some more, add logic blocks together, make things conditional, and more.


This makes it impossible to have a simple panel driven approach to working with the shaders since they can be far more complex, eg you could combine a simple color with a texture map (perhaps using a noise function, perhaps tinting the image with the color, etc), in effect having 2 color shaders in the same material in a way that is much more flexible and so more complex than the layers used in the Model side.


This is why the shader editing works in that way workspace side. You can of course choose to texture on the Model side using the ME over there if you would like the "traditional" approach to shaders seen in the earlier versions of tS.


HTH!

Tom

Post by spacekdet // Oct 24, 2008, 8:28am

spacekdet
Total Posts: 1360
pic
* Propeller Beanie and Pocket protector not included.

Post by jofan // Oct 24, 2008, 9:41pm

jofan
Total Posts: 56
Hi All,


The advice below has been great and has allowed me to make good progress - thanks!


At the moment I am trying to model a bridge and everything is fine apart from some railings I am trying to add

I have a texture in png format (when viewed in Photoshop this appears ok with only the railing shown as solid and the 'gaps' are transparent)


However I cannot get this to display correctly in TS as the gaps now show solid white


Is there a basic material type that can be used for this type of image (I do not need bump map etc at this stage)


Hope you can assist


J

Post by notejam // Oct 25, 2008, 4:56pm

notejam
Total Posts: 191
"This makes it impossible to have a simple panel driven approach to working with the shaders since they can be far more complex, eg you could combine a simple color with a texture map (perhaps using a noise function, perhaps tinting the image with the color, etc), in effect having 2 color shaders in the same material in a way that is much more flexible and so more complex than the layers used in the Model side." Tom


Tom, It just seems to me they could make a tab in the library for transparancy dx9 shaders, and maybe some other tabs for other kinds. Give us a good assortment, and we do not have to figure out everything about wireup or write equations, or writting in the LE. That leaves those of you that are scriptors with your tools, and gives us that are non scriptors the tools we need. Now the tool can have its own panel settings with sliders appear, by programming them into the tool, and the tool in the le editor could have different buttons / sliders that would maybe switch in different equations, different what evers.


So I think with good programming of the shaders in LE, it should be possible to give the non programmer something to shade with, and not have the situation be as complex as , ok kid, go program it if you want it.


Speaking of dx9 shaders, is anyone making any of them for others to use? I would like to add to my collection.

Post by Johny // Oct 25, 2008, 6:06pm

Johny
Total Posts: 672
pic
Hi Jofan, may be tS7.6 scene capture and your texture file can help how to solve your problem.

Post by jofan // Oct 25, 2008, 11:18pm

jofan
Total Posts: 56
Hi johny, not sure if this relates to my transparency problem, if so hope you can give more details on this?


Otherwise I have also tried PNG and DDS image formats but still cant get the transparency to work, im sure this is something simple (please note that i havent yet delved into the link editor, im still very much learning this package)


Hope someone can help please


J

Post by Johny // Oct 26, 2008, 12:47am

Johny
Total Posts: 672
pic
Hi Jofan, if you dont like to post scene capture and the PNG texture file, maybe you can tell about what steps you did when try to apply that PNG texture. So someone can see where the error come from.

Are you use D3D Material Editor or Vray material Editor?

Are you plan to render it with vray? or only with real time render?

Here I attach small region capture of D3D material on workspace view.

PS:Less infomation make someone hard to understand what cause you failed on apply transparent texture.

Post by jofan // Oct 26, 2008, 4:53am

jofan
Total Posts: 56
Hi Johny,


It is not a problem to send a screen shot of what i am doing (i will try to sort this out later), however the principle is as follows:


I have modelled a bridge and for the railing part i have a simple flat surface that i would like to attach a texture that i have for the railings themselve


I have the texture in both png and dds formats and if i load them into Photoshop the background is shown as transclucent as i would expect so no problems so far (also if i paint an object in google sketchup with these textures it also works fine), so i believe my image formats are ok at this stage


So in truespace i am using the d3d editor (not vray) and at present i am just picking Truespace materials at random in the hope i can get the correct one to support transparency but havent got this to work yet?


Should there be a basic material that could simply allow the drag and drop of my image and retain the translucency?


Also i am not rendering, just using Truespace Workspace window - nothing else


Really hope you can help with this


J

Post by Johny // Oct 26, 2008, 5:27am

Johny
Total Posts: 672
pic
Hi Jofan, here simple video tutorial show how to apply D3D material on tS7.6 workspace view.

Avi file inside attached ZIP file (Norm not allow us to attach AVI file :) )

Remmeber, you need to separate one 32 bit image become 2 file (one for color data and other one for alpha data) for make it work.

Jofan, form more information you can download realtime material tutorial on Caligari Videos tutorial download link.


Steps and time line detail of demo video:

00:01 -> 00:06 create a simple plane then move it up a little.
00:08 -> 00:10 Click and drag 'TextureBumpAlpha" DX9 material from 'Material-DX9' Library. Then drop it on Plane obj inside 3D View.
00:12 -> 00:13 Click on Material Editor icon for open D3D Material Editor panel.
00:13 -> 00:15 Click on 'Edit DX Material in LE' icon for bring LE view into Active Material LE.
00:16 -> 00:19 Click on D3D materail RsObj then make 'Exp' tab as active tab.
00:20 -> 00:23 'CRTL+Click' on AlphaTexture icon for load alpha image.
00:25 -> 00:26 'CTRL+Click' on DiffuseTexture icon for load color image.
00:27 -> 00:28 Click mouse Right button on NormalTexture icon for open pop up menu. on popup menu select reset for reset NormalTexture (because out material not contain normalTexture).
00:30 -> 00:32 Select plane object on 3DView for make it as active object then click on D3D ME's 'paint object with current material' icon for apply DX material to it. Now plane already have alpha material but not with plane shadows.
00:34 -> 00:39 Click D3D material's AlphaTest value to Enable. Then change AlphaTestValue to 0.5 (you can experiment with this value for see the different)
00:41 -> 00:42 Click on D3D ME's 'paint object with current material' icon for apply DX material to out plane (before it please make sure plane is current active object)
00:43 -> 00:46 That's all.

HTH!

Post by jofan // Oct 26, 2008, 10:25am

jofan
Total Posts: 56
Hi Johny, thanks once again for the reply - I will have a look at the vid real soon (I cant view it on my laptop due to no codec available!)


Otherwise I have attached the png file I am trying to use to get me started in the hope you can verify if this is ok to use?


Im not sure how you tell if this is 32bit or not although I have Photoshop if this helps!?


Thanks


J

Post by Johny // Oct 26, 2008, 5:14pm

Johny
Total Posts: 672
pic
Jofan, the video use XviD code. you can download lasted "K-Code Pack" from internet for play the video. (maybe I have this code because 'K-Lite Code Pack' intalled on my Computer.
http://www.free-codecs.com/K_Lite_Codec_Pack_download.htm

download full version please.

Post by fahembree // Oct 26, 2008, 5:43pm

fahembree
Total Posts: 123
pic
Hi Jofan, here simple video tutorial show how to apply D3D material on tS7.6 workspace view.



Avi file inside attached ZIP file (Norm not allow us to attach AVI file :) )



Remmeber, you need to separate one 32 bit image become 2 file (one for color data and other one for alpha data) for make it work.



Jofan, form more information you can download realtime material tutorial on Caligari Videos tutorial download link.



HTH!


Thank, thats an excellent video. Learned a little about using link editor and materials. I accidently hit the wrong button and my screen looks like the image below. I have tried all of the icons and buttons but none seem to restore screen back. I tried pulling on the left window edge and that doesn't do the trick. What the hidden button to restore the workspace window?

Post by Mr. 3d // Oct 26, 2008, 6:00pm

Mr. 3d
Total Posts: 747
pic
Have you tried clicking on the "Default" setting in your top left ?

Post by fahembree // Oct 26, 2008, 6:48pm

fahembree
Total Posts: 123
pic
Have you tried clicking on the "Default" setting in your top left ?


I tried all of the buttons on the active window (Library, setting, & panels), because whatever I clicked on in this window it seems logical that there should be a button to retore it back. I didn't think of trying the tabs above, if that what you are referring to. I just quit TS and deleted the default.ctx file. Don't know what I clicked on to cause to maximize the window, so I don't know how to duplicate it again. I have tried without success.


On another problem I wanted to copy a jpg file to the library to use as a texture but no matter what folder I copied it to, I could not get it to show up in the DXD material library. I right click on a material and select properties but there is no information as to what folder the file is store in. I get the feeling TS spends a lot of effort on reinventing the wheel by not using windows standard operating system standards, (for the way windows programs work). Another example is when I try to save file on the workspace side the default is not to save the whole scene, but the current selected object (what ever that happens to be). Window would defualt to save the would scene and if you wanted to save something different it would be a save as command.



See attached image.

Post by jofan // Oct 26, 2008, 9:31pm

jofan
Total Posts: 56
Hi Johny, thanks once again for the reply - I will have a look at the vid real soon (I cant view it on my laptop due to no codec available!)


Otherwise I have attached the png file I am trying to use to get me started in the hope you can verify if this is ok to use?


Im not sure how you tell if this is 32bit or not although I have Photoshop if this helps!?


Thanks


J


Thanks for codec info Johny, I hope hopefully get chance to review this later.

Otherwise not sure if you managed to have a look at the png file I am trying to use to see if this is ok, correct format etc?


Regards, J

Post by Johny // Oct 26, 2008, 10:14pm

Johny
Total Posts: 672
pic
...I accidently hit the wrong button and my screen looks like the image below. I have tried all of the icons and buttons but none seem to restore screen back. I tried pulling on the left window edge and that doesn't do the trick. What the hidden button to restore the workspace window?
Sorry if my video not detail enough to follow here I add timeline detail step on post number #19 (http://forums1.caligari.com/truespace/showpost.php?p=84614&postcount=19)

This problem because you close 3DView and Close LE view by click on [x] icon. You can try it now (close both 3DView and LE view window) for see the same result. Dont worry you can restore it later by click Default tab on top as Mr 3D said. ;)

On another problem I wanted to copy a jpg file to the library to use as a texture but no matter what folder I copied it to, I could not get it to show up in the DXD material library. I right click on a material and select properties but there is no information as to what folder the file is store in.
you can click and drag image from bitmap library and then drop it on D3D material's AlphaTexture or DiffeseTexture icon for apply that image as AlphaTexture or DiffuseTexture (same with NormalTexture if you have it)

look on your tS's texture folder for find it all.

Post by Johny // Oct 26, 2008, 10:31pm

Johny
Total Posts: 672
pic
Thanks for codec info Johny, I hope hopefully get chance to review this later.
Otherwise not sure if you managed to have a look at the png file I am trying to use to see if this is ok, correct format etc?

Regards, J
Jofan, tS7.6 workspace material editor require us to separate color dat and alpha data on diffrent 2 file.
here I make it for you.
now you only need to follow the video tutorial on post number #19 (look on it, because I added steps detail info there) (http://forums1.caligari.com/truespace/showpost.php?p=84614&postcount=19)

Post by fahembree // Oct 27, 2008, 7:34am

fahembree
Total Posts: 123
pic
This problem because you close 3DView and Close LE view by click on [x] icon. You can try it now (close both 3DView and LE view window) for see the same result. Dont worry you can restore it later by click Default tab on top as Mr 3D said. ;).[/QUOTE]




I dont think that whats happened as what you seem to be suggesting would require clicking on 2 different [X], and it happen by clicking one time on something?




look on your tS's texture folder for find it all.[/QUOTE]


I copied the jpg to my TS/texture/ folder but it would not show in the list, even after quitting TS. Is there a limit on how many files can be saved in that directory? Maybe I have exceeded the limit and thats why it doesn;t show up.

Post by jofan // Oct 27, 2008, 10:36am

jofan
Total Posts: 56
Hi Johny


Many thanks for the video, that has helped me to understand a lot about how the editor works


Unfotunately after following the vid, the bst i got was as shown in the attachment (still no transparency)


Hope you can advise


J

Post by Johny // Oct 27, 2008, 10:50am

Johny
Total Posts: 672
pic
Hi Jofan, can you see shadow on 3DView? (with solid background)

What is your VGA card?
Is your VGA suport DirectX 9c?
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn