Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Can you make cloth transparent?

Author
Message
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 15th May 2012 18:32
I couldn't see a way to make cloth transparent. It would be used for a sort of water wave effect. Maybe you have an alternative water wave that interacts with objects?

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 15th May 2012 18:41
.tga?

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 15th May 2012 18:52 Edited at: 15th May 2012 18:54
Do you mean like this?

Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 15th May 2012 18:56 Edited at: 15th May 2012 18:57
Yeah. Oh I was trying fade object, so I can just use a PNG. Ahh that's good.

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 15th May 2012 19:22
I believe .tga has a better alpha channel... but woohoo nice GG!

[I suck at alpha channel ]

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 15th May 2012 21:08
I used dds but tga and png should be equally good (I usually use png but was being lazy because it's easy to add an alpha channel to a dds file). You probably need to use set object transparency as well.
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 15th May 2012 21:13
sadly the only best options I got for transparency in my apps is png and tga and other than that I think TIFF is a little OTT...

I suppose GIMP supports .dds output?

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 15th May 2012 21:16
There's one way to find out ...
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 15th May 2012 21:19
I wonder what that is

YoshiDoshi
14
Years of Service
User Offline
Joined: 11th May 2012
Location:
Posted: 15th May 2012 21:35
I use paint.net because I could never figure out GIMP , plus it has support for .dds output

Cheese
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 16th May 2012 18:05 Edited at: 16th May 2012 18:05
Gimp is super easy. Just adjust the opacity slider to whatever level you want! (See below image)


I live for video games! (And beers, and football, and cars!)
cyril
18
Years of Service
User Offline
Joined: 6th Aug 2007
Location: 7 miles away from big ben
Posted: 19th May 2012 13:19
There is a plug-in for .dds in Gimp. Because I use it myself.
You can find it here:

http://registry.gimp.org/node/70

Note: if you have a x64 version of Gimp you'll need to downgrade to x32.
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 19th May 2012 13:25
cyril on behalf of all here... Thanks for sharing that

Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 31st May 2012 02:03 Edited at: 31st May 2012 02:06
Don't use TGA. PNG files are smaller, and they will thumbnail in Windows.

DDS is great, because you can auto generate mipmaps. But it's a pain trying to find plugins to enable open/save of DDS files for most graphics editors. Gimp is a good choice.

Also DDS doesn't thumbnail in windows. So it's a pain opening a directory full of images and trying to get a good sense of whats really there.

DDS is the best for a game.
PNG is the easiest to work with.


Edit: Also save original non-flattened versions of textures (master copies) as PSD documents.

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 31st May 2012 17:19 Edited at: 31st May 2012 17:20
Quote: "Also DDS doesn't thumbnail in windows"


Doesn't it?

Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 31st May 2012 17:41
There is also a free program to thumbnail .tga files

[b]
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 31st May 2012 17:48 Edited at: 31st May 2012 17:50
I'm used to PNG, I tried TGA, and couldn't figure out how to create the mask so gave up. DDS has so many choices in Photoshop that don't load in DBPro, so I gave up with DDS as well. It has like 6 choices, and when you put them in DBPro it says couldn't find texture. Anyway PNG.. no problems.

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 31st May 2012 17:50
Quote: "DDS has so many choices in Photoshop that don't load in DBPro"


You could simply use one of the many choices that do load into DBPro.
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 31st May 2012 17:50 Edited at: 31st May 2012 17:55
I got one choice to work on a box map, but all of the angles were wrong, and didn't wrap, had seams. I have too much to do, like learning rigging to be slowed down.

One thing that would be nice is that the edges of the flag maintain their transparency if I switch textures. I need the texture to scroll, and animate, so maintaining the transparent area will scroll off.

DVader
22
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 31st May 2012 18:14
If you are scrolling the texture then alpha mapped edges will not work. As you say the edges will scroll with it. Animation is not a problem I wouldn't think, perhaps you could work the scroll into the anim, and thus keep the alpha blending?
This for the same project you have been working on for awhile? Or a new one?

I hope you and your family are well by the way? Been awhile.

Oh I have just released a demo for the AppGameKit snake game competition. Thought you might want to take a look at it. There are some other cool entries as well, but I have linked you to the page with mine for now

http://forum.thegamecreators.com/?m=forum_view&t=196531&b=41&p=5

Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 31st May 2012 18:20 Edited at: 31st May 2012 18:39
Yeah, this is for my old First World Project. It will be handy for other projects too. The effect that I want is similar to a wind tunnel effect. So the flags will be like wind flapping about with smoke in it. The ships are flying through a nebula, so that's the effect.

Looked at your snake game... Dragon Breed lol!

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 31st May 2012 18:56
You might be able to scroll the main texture without scrolling the alpha map by using the set blend mapping on command. You'd probably need to give the cloth an extra set of UV coordinates - but I don't know whether that would interfere with the cloth properties. Otherwise it would be easy with a shader ...
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 31st May 2012 20:08
Can I put a shader on a cloth?

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 31st May 2012 21:28
Yes, but here's a demo using the blending commands. You need two textures: one containing the cloth's main colours (the demo scrolls this), the other is just the alpha layer with white RGB (this isn't scrolled).

With a shader you could combine these into one texture and do two texture reads: one for the scrolling base colours, and one for the unscrolling alpha layer.

As far as I can tell, cloth is just an object with a certain structure.
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 31st May 2012 21:54
Works well! Is there any way to stop the initial jerk from happening? The smoke effect looks good after about 60 seconds, but the first stage where all of the gravity is applied is too dramatic.

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 31st May 2012 22:33
Just experiment with the various cloth settings. There's a not very helpful help file somewhere ...

One thing I can't seem to do easily (or at all ) is to restart the physics effects. Any ideas?
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 31st May 2012 22:42 Edited at: 31st May 2012 22:43
No, I was messing with everything, and all I could do was mostly make things worse. Maybe moving the cubes around applies the effect?

DVader
22
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 1st Jun 2012 01:11
Quote: "Looked at your snake game... Dragon Breed lol!"

Yeah it kinda reminiscent of that game, I still own the actual arcade board for that It plays pretty differently though lol. I remember seeing your first world project ages ago, it looked good if memory serves. I look forward to seeing what you have done to it.

Login to post a reply

Server time is: 2026-07-08 12:26:19
Your offset time is: 2026-07-08 12:26:19