#How create and use VAT (Vertex Animation Texture)?

1 messages ยท Page 1 of 1 (latest)

tawdry fjord
tawdry fjord
#

So the big issue is:
in order to be able to deform the mesh with a VAT, the mesh's uv map needs to look like this

#

but this kind of uv coordinates makes the mesh impossible to render properly (that's why I'm showing only a black wireframe in the video above)

tawdry fjord
tawdry fjord
#

@minor topaz please, I need help to get acces to the second uv coordinates set in a GTLF
if I can get it to work inside [UVsViewer] I think i'll be able to understand how to use it with my [DisplaceMeshVAT]

tawdry fjord
tawdry fjord
#

of course the normals are not following the deformation... ๐Ÿ˜‘

tawdry fjord
minor topaz
#

Wow. That looks really cool!

tawdry fjord
#

i need to make an example with a real wow effect ๐Ÿ™‚

strong totem
#

Yeah, I need a person running... ๐Ÿ™‚

tawdry fjord
#

ok it was supposed to be flat shaded... but that's fine.. of course I knew the face was going to be an issue... gonna have to fix that, model by me, animation from Mixamo

#

performance is pretty good

strong totem
#

So tomorrow individual agent behaviour and on thursday the LOTR battle... ๐Ÿ˜‰

#

Really impressive.

tawdry fjord
#

Unreal Tools (blender addon for exporting Vertex Animation Texture) has limitation to 8192 vertices

strong totem
#

Oops.
Well, we'll need GLTF animation support after all... ๐Ÿ™‚

tawdry fjord
tawdry fjord
tawdry fjord
#

it breaks [RepeatMeshAtPoints] and I don't understand how to fix it

tawdry fjord
#

Fixed ^_^

tawdry fjord
#

VAT + SetShadow + trying to add spot cone projection = โ™ฅ

minor topaz
#

Is the crashing a cube a VAT?

tawdry fjord
#

๐Ÿ˜Ž

#

yes

minor topaz
#

haha

#

Magic

tawdry fjord
#

i'm so happy my idea to add that ellipse to the shadow is working

#
// Check if shadowCoord is within [0,1]
    if (shadowCoord.x >= 0 && shadowCoord.x <= 1 && shadowCoord.y >= 0 && shadowCoord.y <= 1)
    {
        shadowFactor = ComputeShadowFactor(shadowCoord, shadowMapTexelSize, ShadowBias);
    }
    float test = 0.1;
    float d = length(shadowCoord.xy/.8);
    float cone = 1-step(1.0,d);
    
    // Final fragment color.
    float4 litColor = float4(directLighting + ambientLighting, 1.0) * BaseColor * Color;
    litColor.rgb = lerp(litColor.rgb, ShadowColor.rgb, (1 - shadowFactor*cone) * (ShadowColor.a));
    litColor += float4(EmissiveColorMap.Sample(texSampler, pin.texCoord).rgb * EmissiveColor.rgb, 0);
    litColor.rgb = lerp(litColor.rgb, FogColor.rgb, pin.fog * FogColor.a);
    litColor.a *= albedo.a;
    return litColor;
tawdry fjord
minor topaz
#

super cool.

tawdry fjord
#

yes we can project an image, but right now it's a pattern I made inside the shader. It would be neat is to have an image input in thePointLight op

#

also maybe ShadowColor parameter shouldn't be in DrawMeshWithShadow

#

my first goal was to hide this

#

I need to find an other place to add the disc

minor topaz
#

ahh

tawdry fjord
#

i made this with affinity

minor topaz
#

haha...

tawdry fjord
#

to show the idea

minor topaz
#

I already added properties for the pointLight falloff and prenumba to the PointLight structure.

#

But a texture would be really cool.

#

Should be easy enough, if you already got the pattern right.

tawdry fjord
#

back to VAT and new mesh struct. CombineMeshes is broken and this time I don't find where to fix the stride from 64 to 72

#

False alarm, I found how to fix it

tawdry fjord
#

... sigh ... [ExtrudeCurve] too...
Fixed! ^_^

tawdry fjord
#

damn... I reseted my local Dev branch to the last commit on Dev, then I merged my VAT branch, now I get the error

#

this error message and log files are not a good help to find the issue ๐Ÿ˜ฆ

#

I found which cs file was missing ! ๐Ÿ™‚

minor topaz
#

oh...

tawdry fjord
#

it's all my fault, I added a t3 and t3ui files without the cs file that goes with them

#

I need to make a cleanup commit

tawdry fjord
#

done !

minor topaz
#

nice! I will look at it tomorrow.

tawdry fjord
#

I heard that for houdini users this link is interesting https://sidefxlabs.artstation.com/projects/zOyke6

SideFX Labs

Vertex Animation Textures 3.0 ROP is part of the FREE and open-source toolset in Houdini called SideFXLabs. Vertex Animation Textures (VAT) is an efficient and powerful solution to recreate complex and non-traditional animations in real time. Because VAT only uses textures and shaders to achieve the visuals on the GPU, it has a much lighter perf...

vital bone
tawdry fjord
#

Awesome!

vital bone
#

I can confirm the rot map doesnt work as a normal map hehe

#

after unticking the recompute normals setting in the displacemeshVAT node

tawdry fjord
#

I'm also not sure about the Normal map exported by the Blender addon

vital bone
#

it doesnt have a normals option even for export

#

it would be super cool to be able to vary the time offset

tawdry fjord
#

it's a limitation of the technique

vital bone
#

I think, but I havent actually tried it, in unreal engine the material graph has the vertex offset parameter, and when you instance objects the material shader can get a reference to the unique instance ID, so you can offset the VAT UV using that instance ID value to get variation

tawdry fjord
#

ho nice !

vital bone
#

so a vertical uv shift is like a time shift variation

tawdry fjord
#

we need to investigate this

vital bone
#

how does vertex displacement currently work in t3? i never tried it

#

because if it can happen at set material node stage, in theory then you could access the point id after if its been instanced maybe?

#

i dont know enough

strong totem
#

I have a scene where I iterate over all points (not too many, around a hundred) with a loop and select a single point (filter out all others to be precise) via the loop counter, then change parameters via the same counter as a seed.
That may work here as well.

#

In my case it's butterflys that should not all beat their wings the same, so a similar issue.

#

It's slow but works.

tawdry fjord
#

here is a new version of T3, I've added the link about houdini in DisplaceMeshVAT 's description

tawdry fjord
vital bone
#

@tawdry fjord I found it

#

ok so, I wanted to try and track a point on the mesh after displacement, it seems to work when the point ID is 0, but if I change the ID it will go funky

#

is the way im getting the point info correct?

tawdry fjord
#

don't use operators with _ in the name they might be obsolete

vital bone
#

oo

tawdry fjord
#

try with MeshVerticesTopoints instead of _MeshBuffer

vital bone
#

hell yee

#

thats the ticket

#

thank you

#

its working

tawdry fjord
#

๐Ÿ˜Ž

vital bone
tawdry fjord
# vital bone

very nice with [PointTrail2], it could be fun with ParticleSystem. Also you can simplify the process, right after [MeshVerticesToPoints] use [FilterPoints] so you don't need [PointsToCPU]

vital bone
#

ooh right nice!

#

thank you

#

I wanted to do like a single point, but colorize it with a velocity magnitude/direction vector to do a feedback system like the paint tool thing you made a while ago

#

at some point hehe

tawdry fjord
#

ho yeah in that case you would need PointToCPU

vital bone
#

ooh I see, to get the position data, otherwise filter point will just return a buffer of specific point?

tawdry fjord
#

unless we make a custom version of FilterPoints

vital bone
#

but in theory, if I filter point first, then use pointToCpu it will be faster right?

#

maybe

tawdry fjord
#

yeah I do that often

#

not sure if it's faster, But I believe it's faster

minor topaz
vital bone
#

@tawdry fjord ive been messing about with this map editor for a Spring engine game recently, and I found a helper tool with a .bat file that will convert an image to .dds through drag and drop, i didnt test it with a vat texture though, but could be interesting from dev standpoint to check out this nvtt thing to allow conversion of textures to dds more easily for t3 https://github.com/Beherith/springrts_smf_compiler/tree/master/tools/win

GitHub

This tool allows the compilation and decompilation of maps to springrts's binary smf map format. - Beherith/springrts_smf_compiler

tawdry fjord