Page 1 of 3
Amazing vertex shader animated shark
Posted: 30 Dec 2009, 02:53
by jK
they don't have to be synced, you can use lua animations and a vertex shader.
(I already animated a shark with this technique)
no download video - traffic limit reached
Re: Info about "rotating wheels"
Posted: 30 Dec 2009, 03:41
by Argh
Can we see that?
Re: Info about "rotating wheels"
Posted: 30 Dec 2009, 09:04
by daryl
jK wrote:they don't have to be synced, you can use lua animations and a vertex shader.
(I already animated a shark with this technique)
i don't know this technique

where can i read about it?? it is difficult? i know only COB script

( Becouse i was a OTA player )
ps: nice your shark!!!
Re: Info about "rotating wheels"
Posted: 30 Dec 2009, 09:10
by Masse
Re: Info about "rotating wheels"
Posted: 30 Dec 2009, 09:23
by Argh
Ah, OK, so you're doing vertex displacement using a sine. Neat. How'd you weight the verts? A multitexture param?
Re: Info about "rotating wheels"
Posted: 30 Dec 2009, 10:03
by Tobi
Exactly my (first) point
Looks nice though.
Re: Info about "rotating wheels"
Posted: 02 Jan 2010, 12:46
by Beherith
Lua code pleeeease? Pretty please?
Re: Info about "rotating wheels"
Posted: 07 Jan 2010, 02:48
by Caydr
One of these days I'm going to learn what a shader is.
Re: Info about "rotating wheels"
Posted: 07 Jan 2010, 02:59
by AF
Its a little piece of code that runs on the gpu that shades things
Re: Amazing vertex shader animated shark
Posted: 17 Jan 2010, 14:55
by Beherith
Can we please have the code for this? Pretty please?
Re: Amazing vertex shader animated shark
Posted: 17 Jan 2010, 15:16
by PicassoCT
worshipped are the devs- this is amazing
Re: Amazing vertex shader animated shark
Posted: 17 Jan 2010, 16:37
by Spawn_Retard
am i missing something, or is everyone having a huge erection over a shark?
Re: Amazing vertex shader animated shark
Posted: 17 Jan 2010, 16:41
by SpliFF
You're missing something.
The animation is done entirely on the GPU, that's pretty awesome.
Also, for bigger erection, it is run from Lua rather than relying on C++ gl directly, meaning it will work in Spring right now just by adding to a mod.
Re: Amazing vertex shader animated shark
Posted: 17 Jan 2010, 16:59
by PicassoCT
he misses it completly, with that thing, you can make flaping birds, butterflys, nearly everything, just shoveling a little model and a view shaderslines into the graphic processor
damn i neeed a new keyboard this one is dead by droooling.
Re: Amazing vertex shader animated shark
Posted: 17 Jan 2010, 19:05
by MidKnight
Yesss...
Re: Amazing vertex shader animated shark
Posted: 18 Jan 2010, 01:15
by jK
1. I would never start a thread with such a title
2.
http://home.arcor.de/jkei/CustomUnitShaders.sdz
It's a whole easy configurable API (check LuaRules/Configs/customShaders.lua) for per-unitdef custom shaders and includes 2 examples: normalmapping for armpw&armwar and the vertex animation for the angelshark (do /cheat /give angelshark).
PS: And yeah this stuff is pretty old >1 year (normalmapping example was added 1-2months ago).
Re: Amazing vertex shader animated shark
Posted: 18 Jan 2010, 02:59
by Beherith
I apologize for the thread title, but I split it from a random other thread and had to give it a name.
Thank you very much for the shaders and the framework! You rock massively, ill get to work on my plans now :)
Re: Amazing vertex shader animated shark
Posted: 18 Jan 2010, 03:38
by Argh
Took a look.
1. Wow, that's short.
2. Self-shadowing doesn't seem to be working in the normalmap shader. I've fixed it over here, I'll release source later.
Haven't tried plugging my variant of Kloot's shader into this yet.
Re: Amazing vertex shader animated shark
Posted: 18 Jan 2010, 15:36
by jK
Argh wrote:2. Self-shadowing doesn't seem to be working in the normalmap shader. I've fixed it over here, I'll release source later.
Didn't said that the gadget is 100% finished.
Also noticed the "//#define use_shadow" in the shader?
It's just the gadget that doesn't handle shadow enable/disable atm.
Re: Amazing vertex shader animated shark
Posted: 18 Jan 2010, 16:09
by Argh
Meh, just saying. I've also done some other minor changes.
Couple of other things:
1. If the shader crashes, it takes Spring down, no error messages. I was fooling around with stuff, trying to make it match the results I get with the one I'm using now, and found that out the hard way.
2. For stuff that uses three textures, obviously we need to define that somewhere much more handy than in the materialDefs.
I've been using customParams. I don't like the concept of putting that into the config unless it's just a loop that searches unitDefs- the normalmap's name should be in the UnitDef, like everything else that's unique about the Unit, imo. Sorry if that sounds anal or whatever, but it really helps with maintenance, if things like that aren't stored in a totally-different textfile somewhere else. Anyhow, just my opinion about that.
3. DDS normalmaps are getting flipped. What's up with that?