Applying a decal?

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.

Applying a decal? // New Users

1  |  

Post by peterh // Oct 24, 2006, 2:26pm

peterh
Total Posts: 21
Hi,


This might also be titled "Applying a bitmap".


I've been working all afternoon trying to figure out how to apply a PNG file to one side of a "coin". I made a simple primative cylinder for my coin and I have two PNG images that I'd like to apply. One to each side.


I've been able to apply one image to the coin but since it also comes in with a transparency applied to the cylinder, I see the back side of the image also and when I render, the gold color is lost, apparently over-ridden by the image I've used as a material.


Is there an easier way that I'm just not finding? I've been digging in my TS 6.6 manaul and at one point even dug out my TS2 Bible. Yes, its been a while since I spent a lot of time with TS... but now that I have 7.1, there are no excuses.


TIA

Peter H.

Post by Jack Edwards // Oct 24, 2006, 5:04pm

Jack Edwards
Total Posts: 4062
pic
Hi Peter,


Are trying to apply a texture to the cylinder or add a transparent decal to an already textured cylinder?


Maybe you should post a screen shot of the problem?


-Jack.

Post by spacekdet // Oct 24, 2006, 5:07pm

spacekdet
Total Posts: 1360
pic
Use a two layer material- the first layer would represent the base metal of your coin. The second layer use your alpha map. Using the alpha map for the base layer causes the object to be transparent, which you don't want.
You'll probably end up with 3 different materials: Front, Back, and edge.

Paint the entire object first with your Edge material. Then select the Front face with the Point Edit Tool. Adjust your material in the Material Editor (to the Face tex) and then Paint Face. Repeat on the Back side with the 'Tails' texture. You may have to do some jiggerypokery with scaling the UV map on each side (heads and tails) to size the texture. Do this while you've got the face selected in Point Edit, and be in solid mode so you can see the texture.

You may want to peruse this thread for more insight. (http://forums1.caligari.com/truespace/showthread.php?t=1468)

Post by peterh // Oct 25, 2006, 7:24pm

peterh
Total Posts: 21
Thanks for your help. I followed your suggestion as best I could. It wasn't until I read thru the other thread you suggested that I made any progress. I now know how to add a second layer to the materials applied to an object. It took a while, but I also finally figured out how to tell the material editor to paint just the single surface rather than the entire object. I'm still hacking away at this because somehow, well, it looks like I've just removed the back face where I was trying to apply another layer with a different image.


I feel like I made progress this evening so perhaps tomorrow night, I'll finally have what I'm after.


Peter

Post by peterh // Oct 27, 2006, 4:09am

peterh
Total Posts: 21
Wow, I've spent three nights on this and still don't get it. Is there any easier way to apply an external graphic to an object that doesn't involve transparency mapping?


All I want is to do is "paint" the PNG file you see here to a gold colored disk.


Is there something wrong with the PNG file I'm using?


I am able to paint the face but I never see the PNG file portion of the material. I just see the color.


Any help at all is much appreciated....


Thanks,

Pete

Post by TomG // Oct 27, 2006, 5:26am

TomG
Total Posts: 3397
First questions - how does it show up when you render (real-time might not be able to give you the same result)? Have you selected the end face and applied Planar UV? Cylindrical UV (the default when you create a cylinder) doesn't UV the ends, they just get one pixel of color across the whole surface, so you need to select just that end face, and then use Apply Planar UV, and it will have a UV Mapping that will allow texture maps to show up. Without that step, you will just get one pixel of color (usually the background) repeated across the whole surface.


Let me know if either of those help!


Tom

Post by peterh // Oct 27, 2006, 6:08am

peterh
Total Posts: 21
Hi Tom, just having someone to ask helps. :-)


I've had some success in the past hour. Now I can apply different images to each side. At the moment, without transparency.


Now I have two new questions:


1. When I apply the second image to the other side of my "coin" the image is reversed, as if seen in a mirror. How do I get it to appear on the back side, normally as it shows up in the material editor?


2. I've applied the Gold LW Material to the entire coin before applying the texture files (my two images) and I'd like that material to show thru. How should the texture file be constructed so that I can control what is transparent? I'll have to hack at the material editor further to get the effect I want.


Thanks,

Peter

Post by spacekdet // Oct 27, 2006, 8:44am

spacekdet
Total Posts: 1360
pic
Glad that you are making progress.

1: the simplest way to resolve this? Just open the 'tails' image in your 2D program and flip it. You can save it with a new name and then re-apply it in tS.
The slower alternative is to rotate the UV mapping, which can sometimes be an exercise in frustration.

2. I had a go at making an example, using the coin image you posted.
I found I had to open it in my 2D program, flatten/merge the layers, and then re-select/ mask just the white areas. Save it with a new name. I then used this in the Color Blend: Mask Alpha in the second layer.

I've attached a couple screenshots of how I set up the material layers and also included a zipped archive of the scene file and textures.

Post by peterh // Oct 27, 2006, 10:38am

peterh
Total Posts: 21
Wow, very informative! Thank you!


I opened your attachment and loaded the scene. That is the sort of image I want to put in this work eventually. At the moment, I'm stuck on one issue. I don't get the same options when I click and hold on the color palette. I've seen them during my efforts last night but don't know how.


Do you see form this image what I'm doing wrong?


In any case, thanks again for all your help! :-)

Peter

Post by TomG // Oct 27, 2006, 11:04am

TomG
Total Posts: 3397
Here's a grab in tS7 - the icons are a little different, though in the same place. Plus I think the green line may have been overlooked in the original image, which pointed to the icons in question :)


Let me know if this helps!


Tom


PS - be sure to add a second layer of material in the ME. I note you only have one layer at the moment. I only have one layer in my example too, just to show where the transparency icons are.


The only way to have one material overlay another is to use layers in the Material Editor, or to paint on a Material Rectangle. I would suggest layered materials as best in this case :)

Post by peterh // Oct 27, 2006, 11:16am

peterh
Total Posts: 21
Yes Tom, that was a big help. I knew I'd seen that icon before but couldn't find it in version 7. Duh.... I was working in version 6.6 two nights ago when I first tried this but moved to 7.1 the next night! :-)


After all of this effort, I do at least seem to have a better handle on the material editor! :-)


Thanks again,

Peter

Post by spacekdet // Oct 27, 2006, 11:16am

spacekdet
Total Posts: 1360
pic
Whoops, I guess I should have used a more definative color for my 'pointer'.
I meant to click and hold on the 'Color Blend:' icon in the color channel. The default state is 'Color Blend: Constant Alpha' whereby you use the slider control to blend the two layers as a percentage.
'Color Blend: mask alpha' uses an image to determine what is shown of each layer.
Note that if you only have a single layer material and you use an alpha image to mask the color channel, it creates overall transparency effects- for example using a person's image on a plane. ( I have a small example here (http://mywebpages.comcast.net/spacekdet/masktut/))

The icon you have circled in yellow is for animating textures in an animation- for instance, changing the color of an object over time.- Not applicable in this case.

Post by peterh // Oct 27, 2006, 11:19am

peterh
Total Posts: 21
Yes Tom, that was a big help. I knew I'd seen that icon before but couldn't find it in version 7. Duh.... I was working in version 6.6 two nights ago when I first tried this but moved to 7.1 the next night! :-)


After all of this effort, I do at least seem to have a better handle on the material editor! :-)


Thanks again,

Peter
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