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.

Newcomers DBPro Corner / Transitioning from one texture to another

Author
Message
Butter fingers
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location: Mecca
Posted: 9th Nov 2007 19:25
OK, so the title is pretty self explanitory, but I'll elaborate.

I have a skybox, and it has say 4 different possible textures:
sunrise
day
sunset
night

is there any way I can make a gradual transition from one texture to another, almost like a %mask I could apply?
I've fiddled about with blending textures, but it looks a little funky, and I need to have more control...like in increments.

I know there is the RTS sky system in Extends, but it tends to drain the CPU once I have alot else going on, and I figured if I could transition between my own sky textures, I could get a similar effect at a lower CPU cost.
Sorry if this is stupid question.
best
butters

Twu Kai
18
Years of Service
User Offline
Joined: 2nd Oct 2005
Location:
Posted: 9th Nov 2007 20:02
I'm not quite sure how you could do that, but I have an idea. Say you had two skyboxes, one is one unit bigger than the other. You would start with the inner skybox textured with the 'sunrise' texture, and the outer one with the 'day' texture. You would use the 'set object transparency' and 'set alpha mapping on' commands to slowly fade out the inner skybox, leaving the outer skybox completely visible. Then you would texture (unseen, because it's invisible) the inner skybox with the 'sunset' texture, and slowly fade it in using the above commands. When the inner skybox is completely visible, you texture the outer skybox with the 'night' texture and slowly fade out the inner skybox again. That's all I can think of at the moment. Hope it helps.

print rnd(20)/0
Butter fingers
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location: Mecca
Posted: 9th Nov 2007 20:25
Yeah, that's kinda where I was at, but I wasn't too sure how to do the fading, as I've had some trouble, and know that each image format handles transparency differently.

Thanks for the input, if no-one knows of an easier/more elegant way of doing it, this is definitely the technique I'll go with.

vorconan
17
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Wales
Posted: 10th Nov 2007 13:14
Well, I've never used these commands before but the animation commands seem to be what you are after, if you make an .avi file of the image transactions, you can play the animation to an image, in this case, the skyboxes texture image.

Hope that helped.



Mr Tank
21
Years of Service
User Offline
Joined: 25th Nov 2002
Location: United Kingdom
Posted: 16th Nov 2007 18:45
You want to use "set alpha mapping on", and make sure you use the right transparency flag. I think if you use certain flags, it renders things in order of image number. Also you might need to disable object zwrite. (disable object zwrite...) Maybe search the forum for ghosting examples. It's all pretty confusing and i can't really remember. Would be a lot easier to understand and use if there was an explanation of what all the flags and stuff actually do, and what the rendering process is, but i can't find one.
I think i use transparency flag 3, but other ones seem to work OK too.

SUPER BADASS SPACESHIP X: WEBSITE
FORUM TOPIC

Login to post a reply

Server time is: 2024-09-27 08:29:16
Your offset time is: 2024-09-27 08:29:16