Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (opm), 778 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Melting Snow Shader approach #416034
01/27/13 13:32
01/27/13 13:32
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline OP
Expert
Joozey  Offline OP
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
http://joostdevblog.blogspot.nl/2012/12/dynamically-melting-snow.html

This article describes how to create a melting snow effect in shader model 2.0. Perhaps you can go creative with it laugh.
For the record: I did not write this article, credits go to Joost, developer at Ronimo Games.

Last edited by Joozey; 01/27/13 21:56.

Click and join the 3dgs irc community!
Room: #3dgs
Re: Melting Snow Shader approach [Re: Joozey] #416043
01/27/13 15:08
01/27/13 15:08
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Cool! Did you do this for a sepcific game?


Always learn from history, to be sure you make the same mistakes again...
Re: Melting Snow Shader approach [Re: Uhrwerk] #416047
01/27/13 15:20
01/27/13 15:20
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
nice idea


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Melting Snow Shader approach [Re: sivan] #416081
01/27/13 21:57
01/27/13 21:57
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline OP
Expert
Joozey  Offline OP
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
I haven't tried it myself, but it was a good read. Something worthy to put in the bookmarks laugh.


Click and join the 3dgs irc community!
Room: #3dgs
Re: Melting Snow Shader approach [Re: Joozey] #416519
02/01/13 11:10
02/01/13 11:10
Joined: Apr 2008
Posts: 2,488
ratchet Offline
Expert
ratchet  Offline
Expert

Joined: Apr 2008
Posts: 2,488
Here is a better utilisation of that sort of shader :
Some sort of multitexture painting in the 3D models directly, so you can have lot of variety and non repetition on textures.

Transisiton shader

Re: Melting Snow Shader approach [Re: ratchet] #416524
02/01/13 11:33
02/01/13 11:33
Joined: Dec 2000
Posts: 4,608
mk_1 Offline

Expert
mk_1  Offline

Expert

Joined: Dec 2000
Posts: 4,608
A little explanation. This is pretty easy to do.


Follow me on twitter
Re: Melting Snow Shader approach [Re: mk_1] #416535
02/01/13 13:50
02/01/13 13:50
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
This may be a stupid question but I don't understand the concept behind vertex colors:

Quote:
What is vertex painting? Essentially it’s blending several textures depending on the mesh’s vertex colors. Since vertex colors are linearly interpolated you get a smooth result.

I know that if I have a color vector in the vertex shader and push it to the pixel shader the values get interpolated, but where does the vertex color come from? Is it a regular tex2D operation in the vertex shader? If yes/ no, is it possible in acknex?


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Melting Snow Shader approach [Re: Superku] #416538
02/01/13 13:58
02/01/13 13:58
Joined: Dec 2000
Posts: 4,608
mk_1 Offline

Expert
mk_1  Offline

Expert

Joined: Dec 2000
Posts: 4,608
Vertex colors are part of the mesh. You create them with a modelling tool. I'm not sure if MED can do this, but I expect that mdl supports vertex colors. An example of how to use a vertex color:

http://stackoverflow.com/questions/11856547/getting-the-color-of-a-vertex-in-hlsl

This should get you started. I haven't done anything in hlsl since I departed from 3dgs, but it should be fairly simple.


Follow me on twitter
Re: Melting Snow Shader approach [Re: Superku] #416539
02/01/13 13:58
02/01/13 13:58
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
the vertex color is just a value stored in a vertex declaration (just like POSITION, TEXCOORD0, NORMAL, ...)
But afaik gamestudio doesn't support vertex colors natively but you could use other vertex data for this (like second UV set or the first one and use triplanar texture mapping or similars)


Visit my site: www.masterq32.de
Re: Melting Snow Shader approach [Re: MasterQ32] #416540
02/01/13 14:03
02/01/13 14:03
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
Code:
#define D3DFVF_D3DVERTEX (D3DFVF_XYZ|D3DFVF_NORMAL|D3DFVF_TEX3|D3DFVF_TEXCOORDSIZE2(0)|D3DFVF_TEXCOORDSIZE2(1)|D3DFVF_TEXCOORDSIZE4(2))


Gamestudio does not support vertex colors but 3 texture coords


Visit my site: www.masterq32.de
Page 1 of 2 1 2

Moderated by  checkbutton, mk_1 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1