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 / No Shader Effects Thread

Author
Message
Twu Kai
18
Years of Service
User Offline
Joined: 2nd Oct 2005
Location:
Posted: 14th Jun 2007 19:44 Edited at: 14th Jun 2007 20:11
This is a thread to post any effects you want to share, such as water not using any shaders, cartoon effects (also not using shaders), etcetera. Could you please tell/post the code for making the effect you show, so that other people can use them!

Here's one to start off: a Bloom type effect. Here's a screenshot, then I'll explain how I did it.


What I did to make that effect was make an inverted sphere to be the skysphere, colour it near-white, add fog that was coloured a bit brighter than the average colour of the map, and that was it. Here's the basic code:

I hope this helps. Now start showing us your effects.

Show off your no Shader effects at the No Shader Effects Thread!

Attachments

Login to view attachments
Mr Kohlenstoff
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Germany
Posted: 14th Jun 2007 19:48 Edited at: 14th Jun 2007 19:56
Ah, great!

I am going to see if I can write something..

Visit the DBPro - Speed up your game-Thread. http://forum.thegamecreators.com/?m=forum_view&t=88661&b=1
Mistrel
Retired Moderator
18
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 14th Jun 2007 20:04 Edited at: 14th Jun 2007 20:29
Twu Kai, would you mind making that image smaller so it doesn't stretch the thread width?

Edit: Thanks!

http://3dfolio.com
Twu Kai
18
Years of Service
User Offline
Joined: 2nd Oct 2005
Location:
Posted: 14th Jun 2007 20:07 Edited at: 14th Jun 2007 20:11
Sure, sorry. Doing it now!

EDIT: Done.

Show off your no Shader effects at the No Shader Effects Thread!
GatorHex
19
Years of Service
User Offline
Joined: 5th Apr 2005
Location: Gunchester, UK
Posted: 14th Jun 2007 20:16 Edited at: 14th Jun 2007 20:31
Black fog for Day/Night transition effect!



How you do it..

Set the fog to colour black
For day set the fog distance large say FOG DISTANCE 1000
For night set the fog distance close say Fog DISTANCE 50
To get a smooth transition just slowy increase and decrease a variable

do
FOG DISTANCE fogDist
inc fogDist
loop

if you keep it at something like 50 it's like you are holding a torch as there is a bit of light around your feet.

easy peazy

jeffhuys
17
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 15th Jun 2007 08:51
That game looks BRILLIANT, GatorHex!
I'd love to play it!


You're the 'th to view this signature!
Mr Kohlenstoff
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Germany
Posted: 16th Jun 2007 12:47
I would post this no shader-water here, where the texture is just scrolled, but I'm not sure how it works.. however, I may be going to try another technique for realistic water.

I think another effect we could add to this thread was shown by Valle some months ago, where he uses some transparent plains with the same texture, positioned over each other in a row, to create a really cool grass-effect.. I'm going to look if I can find it anywhere.

Visit the DBPro - Speed up your game-Thread. http://forum.thegamecreators.com/?m=forum_view&t=88661&b=1
Mr Kohlenstoff
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Germany
Posted: 16th Jun 2007 13:38 Edited at: 16th Jun 2007 14:28
OK, I've wrote a small example program about my idea for a water-effect.

Here a small screenshot.. it doesn't look very good because the water-textures I created aren't seamless, but I didn't know how to fix it wihtout too much work.



The technique is quite simple, I use two plains, with scaled water-textures. One plain is a big higher than the other one to avoid graphical errors.. Then the plains are moved (I think you could also scroll the texture) always in the mainloop in different directions. The top plain is transparent, so that you can see both. So you can create a more or less realistic water-effect this way...

Here the code I used:



****

Edit:

I've found Valles Grass effect.

He used this example-code:



The result looks like this:



And the thread can be found here: http://forum.thegamecreators.com/?m=forum_view&t=97923&b=11

Visit the DBPro - Speed up your game-Thread. http://forum.thegamecreators.com/?m=forum_view&t=88661&b=1
Twu Kai
18
Years of Service
User Offline
Joined: 2nd Oct 2005
Location:
Posted: 16th Jun 2007 16:39
Wow, the grass looks great. The water effect looks neat too. You could maybe have 3 or 4 different layers, so that it swirled around a lot. I'm trying to find a way to reflect the landscape in a watery way, not using shaders. Hopefully I'll manage soon!

Show off your no Shader effects at the No Shader Effects Thread!
Mr Kohlenstoff
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Germany
Posted: 16th Jun 2007 16:57
Yes, reflections would be great, but I have no idea how you could realize it without using DBP-reflection shading, or other shaders... good luck though.

I have changed the water and grass-textures in my example, and it looks way better now:



Visit the DBPro - Speed up your game-Thread. http://forum.thegamecreators.com/?m=forum_view&t=88661&b=1
Mr Kohlenstoff
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Germany
Posted: 16th Jun 2007 20:31
I am really motivated Oo (that's not normal..) so I have tried a new technique: Instead of using normalmapping, pre"compile" the normal map onto the texture to have predefined lightning effects (good for static walls etc.. maybe).

The result looks like this (the texture and normalmap are not made by me, I took them from the internet):



The top left image is the original texture, in the top right corner you can see the normalmap. From this normal map I created the lightmap in the bottom left corner, and the bottom right image is the result, with lightmap overlayed on the texture.
If the lights or the players position don't change, this is as good as a shader I think, but with better performance... it looks just not very good if the player, lights or the object itself move.

Visit the DBPro - Speed up your game-Thread. http://forum.thegamecreators.com/?m=forum_view&t=88661&b=1
Ric
19
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 16th Jun 2007 22:20
Not that I know anything about shaders, but isn't the whole point of a normal map derived from a texture that the lighting effect changes as you move - to make it more 3d? If you're not moving, I can't see the point of a normal map - the original texture would be just as good. Perhaps if you had a second plain slightly infront of the wall textured with the shadow map, and made it translucent, it would work better.

JerBil
19
Years of Service
User Offline
Joined: 8th May 2004
Location: Somewhere along the Z axis...
Posted: 17th Jun 2007 03:11
Don't think this is good for much, but kind of interesting.


Ad Astra Per Asper
Twu Kai
18
Years of Service
User Offline
Joined: 2nd Oct 2005
Location:
Posted: 18th Jun 2007 20:31
Okay, this is the first attempt at reflection. It's just a basic mirror type thing for now, though.

All it uses is an extra camera to make the illusion of reflection. Here's the code:

I'm going to try and find a better method/camera usage for reflection now.

Also, thanks to everyone who has added their effects!

Show off your no Shader effects at the No Shader Effects Thread!
Mr Kohlenstoff
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Germany
Posted: 22nd Jun 2007 12:22
I have tried to create a small, simple specular-effect, and it works, more or less, on spheres so far... even if it is a bit buggy. <.<



I'm using an transparent sphere, which is bigger than the original one, and is textured with this "specular-map", and always rotated, depending on the position of camera and light-object. (the light-yellow sphere on the right side)

Code:



Visit the DBPro - Speed up your game-Thread. http://forum.thegamecreators.com/?m=forum_view&t=88661&b=1
Mr Kohlenstoff
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Germany
Posted: 3rd Jul 2007 11:32 Edited at: 3rd Jul 2007 11:33
Did somebody play the original Splinter Cell? They had an interesting glass-pseudo-reflection-effect (as far as I remember it seemed to work like a cubemap..). Just another texture with light and dark parts, whichs uv-coordinates depended on the camera's position and angle.. would be great if somebody could do this, I don't really have time now (so many projects in progress ).

Visit the DBPro - Speed up your game-Thread. http://forum.thegamecreators.com/?m=forum_view&t=88661&b=1
Sixty Squares
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 25th Jul 2007 13:37
Does anyone have anymore shader-less effects? I'd like to see some more

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 25th Jul 2007 14:59 Edited at: 25th Jul 2007 15:01
Here's a nice reflection thing I made using cube mapping:





"It's like floating a boat on a liquid that I don't know, but I'm quite happy to drink it if I'm thirsty enough" - Me being a good programmer but sucking at computers
Twu Kai
18
Years of Service
User Offline
Joined: 2nd Oct 2005
Location:
Posted: 25th Jul 2007 17:32
Wow, that's a really nice reflection effect, Zotoaster!

Sorry that I haven't posted anything recently, I'm still trying to find a way to make water reflection. I'll post again when I find a way/discover an interesting effect.

Show off your no Shader effects at the No Shader Effects Thread!
Sixty Squares
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 26th Jul 2007 01:53
Nice one Zotoaster!

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 26th Jul 2007 02:29
Quote: "Nice one Zotoaster!"


Indeed.
Twu Kai
18
Years of Service
User Offline
Joined: 2nd Oct 2005
Location:
Posted: 11th Aug 2007 20:40 Edited at: 11th Aug 2007 20:58
I just found another effect, although it's very simple. It's a television/camera vision type effect. It draws lines on the screen which you can tint any colour. Here's the code:

then you draw a sprite to the screen of that image. Also, if you want the tint to be black, set coltint as 1,1,1 (as in rgb), not 0,0,0 as the sprite will take that as see-through.

Here's an image with a green tint (rgb(1,50,1)).


Hope you have fun with it.

Show off your no Shader effects at the No Shader Effects Thread!

Attachments

Login to view attachments
Emphasoft
16
Years of Service
User Offline
Joined: 2nd Jun 2007
Location: Deep Underneath the Center of the Earth
Posted: 12th Aug 2007 13:58
take a look at this one. I modified the reflection code to improve the effect

it isn't perfect, but I'll think of something to get the scale right (other than scaling the object)

Why fight when you can negotiate?
-Jack Sparrow
Twu Kai
18
Years of Service
User Offline
Joined: 2nd Oct 2005
Location:
Posted: 12th Aug 2007 21:15
Ooh! That looks a lot better than my attempt!

I'm looking forward to another version of it.

Show off your no Shader effects at the No Shader Effects Thread!
Aralox
17
Years of Service
User Offline
Joined: 16th Jan 2007
Location: Melbourne
Posted: 13th Aug 2007 10:05
This is not mine, but its so cool ive decided to include it anyway. its made by cloggy, this is the link on his website.
http://www.cloggj.f2s.com/DBPro2/snippets.html
Its called 3D rain.


Twu Kai
18
Years of Service
User Offline
Joined: 2nd Oct 2005
Location:
Posted: 27th Aug 2007 19:49
Here's another light effect from me... You could probably fit it into the bloom category.

Here's the code, and then I'll explain it.


First of all, note that I haven't adjusted the ambient light at all.

What you do, is take your object you want to shine, and make a copy of it. The new copy should be scaled slightly bigger than the actual object. Ghost the copy object (you can change the ghost from the default if you want, but I didn't need to), and apply a completely white texture to the copy object. Rotate and position the copy object at the exact angle and position of the actual object. You don't need me to say about if the object is animated. Just start the copy object's animation then too. I think this works according to where you position the light. I'm going to experiment.

Hope this looks nice.

Show off your no Shader effects at the No Shader Effects Thread!
Twu Kai
18
Years of Service
User Offline
Joined: 2nd Oct 2005
Location:
Posted: 27th Aug 2007 21:24 Edited at: 27th Aug 2007 21:29
Sorry for the double post. I just made a new effect - It's a bit like Valle's grass effect and Mr Kohlenstoff's wall effect. I'm really excited, just so you know. I'll show the images first, and then the code and explaining.



Here we go:

It's simple; all I do is make an image of bricks, realistic or not, with transparency in between. I texture five plains with this texture, and I set the transparency on for four of them. The four transparent textures are set forward one unit more than the last. And there you go, a 3d, low-poly wall!

Show off your no Shader effects at the No Shader Effects Thread!

Attachments

Login to view attachments
Kohaku
19
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 28th Aug 2007 02:47
Hey, that's awesome!

I'd expand on it a bit though by using a real heightmap/bumpmap, scanning it several times and building a separate image with each scan for each layer in the heightmap/bumpmap.

That way you'd still be using several plains but each layer could be slightly different, so you could have smooth bumps and stuff. But yeah, awesome effect!


You are not alone.
Mr Kohlenstoff
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Germany
Posted: 28th Aug 2007 18:30
I tried making another effect, something like Bloom or HDR, don't know, called it 'blend' in the sourcecode (I'm not sure if the english word means the same like the German ).

I's a bit slow because I use the point-command to check some screen-colors.. but I still get 600-700 FPS in this "demo".



Nice bump-effect by the way.

Omen
17
Years of Service
User Offline
Joined: 7th Nov 2006
Location: Maple Grove, MN US
Posted: 29th Aug 2007 02:58
@Twu Kai

That 3d low-poly wall effect is awesome -- it definitely creates a unique style. Good job !!!
Aralox
17
Years of Service
User Offline
Joined: 16th Jan 2007
Location: Melbourne
Posted: 29th Aug 2007 09:00
yeah you could make an awesome medialess game with that!

Your signature has been erased by a mod
Twu Kai
18
Years of Service
User Offline
Joined: 2nd Oct 2005
Location:
Posted: 29th Aug 2007 18:43
That's a nice effect, Mr Kohlenstoff. If I get it right, it does a sort of average of all the colours?

@ Aralox.
Hm... That would be interesting to do.

Glad everyone likes the wall effect!

Show off your no Shader effects at the No Shader Effects Thread!
Xenocythe
18
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 30th Aug 2007 00:50
This thread is pretty cool. I'll keep an eye on it. Maybe I'll try something

Master Xilo
17
Years of Service
User Offline
Joined: 8th Sep 2006
Location: Bern, Switzerland
Posted: 31st Aug 2007 09:45
Quote: "Here's a nice reflection thing I made using cube mapping:"


Cube maping IS a shader, if you had coded the uv data changing yourself then it would be a shaderless effect.

But all these effects look great!

why does noone post the pseudo motion blur effect of the DP examples?
Mr Kohlenstoff
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Germany
Posted: 31st Aug 2007 15:37 Edited at: 31st Aug 2007 15:39
Tried a motion blur.. looks more or less good and runs kind of fast. ^^




Edit: Screenshot... but it looks better in motion of course.



Agent Dink
20
Years of Service
User Offline
Joined: 30th Mar 2004
Location:
Posted: 1st Sep 2007 00:09
You can also do a motion blur effect by turning off the backdrop, making your own "backdrop" with a giant inverted object (like a sphere or box) with about half transparency. It looks cool and if used right can be pretty awesome.

Wendox
17
Years of Service
User Offline
Joined: 19th Dec 2006
Location:
Posted: 1st Sep 2007 14:51
can you post an example snippet?
Red Ocktober
20
Years of Service
User Offline
Joined: 6th Dec 2003
Location:
Posted: 1st Sep 2007 15:32 Edited at: 1st Sep 2007 15:50
fixed function "bump mapping" using texture blending (no shaders, so it should run almost anywhere)...





code example...



for more code, check out the Number8-Blend Modes demo in /U58Examples/BugFixes folder...

--Mike
Mr Tank
21
Years of Service
User Offline
Joined: 25th Nov 2002
Location: United Kingdom
Posted: 2nd Sep 2007 01:39 Edited at: 2nd Sep 2007 01:40
Nice thread. I should try these out.

Here's a sort of HDR effect, or at least a correction of the sRGB monitor gamma/whatever. I tried to use Evolved's HDR shader, but it wouldn't work on my computer. However, inspired by the code, i made an effect without using shaders. Roughly halves the framerate since it has to render everything twice, although it is rendering the same thing twice.

At the start of the program, do this...




then during the game loop, make the cameras have the same position and orientation, then call a sync like this:



Anyway, it seems to work pretty good. Perhaps i can make it faster using sprites.

SUPER BADASS SPACESHIP X: WEBSITE
FORUM TOPIC
Agent Dink
20
Years of Service
User Offline
Joined: 30th Mar 2004
Location:
Posted: 2nd Sep 2007 01:58
Quote: "can you post an example snippet?"





Then, do whatever you want

Mr Tank
21
Years of Service
User Offline
Joined: 25th Nov 2002
Location: United Kingdom
Posted: 2nd Sep 2007 02:10
Here are some pics.

Without effect applied:


With effect applied as in above snippet.


With the lines
exclude object on hdr_experiment_objnum
hide object hdr_experiment_objnum
removed from code. Note the strange diagonal line running from the top left to the bottom right of the screen, and regularly spaced vertical lines running from the top of the screen to the diagonal line. These are spaced by 32 pixels in the texture. I don't know why this happens.



SUPER BADASS SPACESHIP X: WEBSITE
FORUM TOPIC
Mr Tank
21
Years of Service
User Offline
Joined: 25th Nov 2002
Location: United Kingdom
Posted: 2nd Sep 2007 05:53
OK i managed, with the help of Mr Kohlenstoff`s motion blur code, to get the HDR thing working, to an extent, with only one camera using a sprite, and it runs faster now. (and with optional motion blur!)
Trouble is it has those horrible lines. Have tried changing flags for just about everything but couldn't cure it. Will make an example but too sleepy right now..
Maybe i'll use the sprite still, but render two cameras, the second with all objects hidden and excluded.

SUPER BADASS SPACESHIP X: WEBSITE
FORUM TOPIC
Twu Kai
18
Years of Service
User Offline
Joined: 2nd Oct 2005
Location:
Posted: 7th Sep 2007 17:45 Edited at: 7th Sep 2007 17:46
@ Mr Tank. That effect looks nice. Thanks for sharing!

I've made a light effect. Here is the function:


It's basically just a black cone, ghosted.

Here are some screenshots in a test map I made:



Hope you like it.

Show off your no Shader effects at the No Shader Effects Thread!
Mr Kohlenstoff
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Germany
Posted: 7th Sep 2007 19:13
What a great idea. Looks very easy.. I always wondered how to realize such a technique. Great work.

Twu Kai
18
Years of Service
User Offline
Joined: 2nd Oct 2005
Location:
Posted: 7th Sep 2007 19:26
Thanks! Glad you like it. Actually here's a better update of the function. I hope it will add some shine to your programs.



It's more of an actual circle of light now. Anyway, glad you like it!

Show off your no Shader effects at the No Shader Effects Thread!
Twu Kai
18
Years of Service
User Offline
Joined: 2nd Oct 2005
Location:
Posted: 7th Sep 2007 22:07 Edited at: 16th Sep 2007 23:15
Sorry, wrong area (this post, that is).

The no Shader effects thread: http://forum.thegamecreators.com/?m=forum_view&t=108152&b=1

Dusi asusi ji fu hei lo-so.
Twu Kai
18
Years of Service
User Offline
Joined: 2nd Oct 2005
Location:
Posted: 23rd Sep 2007 14:16 Edited at: 13th Oct 2007 19:38
Sorry for the triple post...

Well, this is a sort of reflection effect. I just position another camera at the screen camera and rotate it to the same screen rotation, and get an image from that. I then texture an object with that texture, ghost it, and make another object 1 unit smaller. I think it gives the object(s) a nice semi/reflection look, although it isn't accurate.

Anyway, here's the function:


And a demo:


I hope you like it, and sorry again for the triple post.

Edit: Come on, more effects!
Here's a better version of my shine effect earlier on:



Hope you find it useful.


This is Bish. Copy Bish into your signature to help him take over from Bunny’s control. (Bogwizard.com - Bunny hybrids)

Login to post a reply

Server time is: 2024-04-26 20:41:51
Your offset time is: 2024-04-26 20:41:51