Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Vertex Array animation  (Read 2713 times)

0 Members and 1 Guest are viewing this topic.

Acrobat

  • Full Member
  • ***
  • Posts: 153
    • View Profile
Vertex Array animation
« on: April 08, 2012, 03:01:25 pm »
I was wondering, is there any good editor (for animating vertexes, color/UV) or Maya/Blender exporter that can handle this.
I tried to google plugins/scripts, but with no luck.  :(
Thx for any help

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10818
    • View Profile
    • development blog
    • Email
Re: Vertex Array animation
« Reply #1 on: April 08, 2012, 04:36:16 pm »
I don't exactly follow you.
SFML doesn't have any format which would read vertex arrays, so you would have to define one of your own, which then clearly won't have any editor since you just invented that format.
Also I'm not sure what you are trying to achive.
For clearification a vertex is just a point, normally in a three dimensional space, but in SFML, since it's 2D specific,  a vertex has only two coordinations. A vertex array is just a collection of vertices.

So every tool that can create animations of points could be used to generate some format, which then again with some work could be loaded by your own function into your SFML project.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Acrobat

  • Full Member
  • ***
  • Posts: 153
    • View Profile
Re: Vertex Array animation
« Reply #2 on: April 08, 2012, 04:49:41 pm »
Yes, i know about sfml vertexes.
With vertex arrays we can create animations (something like waving grass, or effect of water stream (just animating positions and UV we can create magic)).
I am talking about a tool where we can visualy animate (Maya, Blender or other) and export to readable format (xml for example).
There are many exporters for other fameworks (for ogre - ogremax, panda3d, collada dae) but i can't find exportex that can handle exporting vertex animation. This is not something about sfml.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10818
    • View Profile
    • development blog
    • Email
Re: Vertex Array animation
« Reply #3 on: April 08, 2012, 06:45:38 pm »
So you should make it clear that your question is not directly related to SFML nor SFML's vertex array. ::)

Since I'm not familliar with any animation editor I can't really help you out.
Also the problem does seem to me not to be so hard, how much time did you spend on google?
Additionally did you look at some existing formats and thought about the possibility to extract the exported data?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Acrobat

  • Full Member
  • ***
  • Posts: 153
    • View Profile
Re: Vertex Array animation
« Reply #4 on: April 08, 2012, 07:30:03 pm »
i spend around a week to find any script, but finally i was able to do this (5 minutes ago)
you can look at the result  8) :
Code: [Select]
<mesh>
    <submeshes>
        <submesh material="lambert1" usesharedvertices="false" use32bitindexes="false" operationtype="triangle_list">
            <faces count="8">
                <face v1="0" v2="1" v3="2" />
                <face v1="2" v2="1" v3="3" />
                <face v1="1" v2="4" v3="3" />
                <face v1="3" v2="4" v3="5" />
                <face v1="2" v2="3" v3="6" />
                <face v1="6" v2="3" v3="7" />
                <face v1="3" v2="5" v3="7" />
                <face v1="7" v2="5" v3="8" />
            </faces>
            <geometry vertexcount="9">
                <vertexbuffer positions="true">
                    <vertex>
                        <position x="-2.94181" y="-6.07605e-016" z="2.73641" />
                    </vertex>
                    <vertex>
                        <position x="0" y="-6.07605e-016" z="2.73641" />
                    </vertex>
                    <vertex>
                        <position x="-2.94181" y="0" z="0" />
                    </vertex>
                    <vertex>
                        <position x="0" y="0" z="0" />
                    </vertex>
                    <vertex>
                        <position x="2.94181" y="-6.07605e-016" z="2.73641" />
                    </vertex>
                    <vertex>
                        <position x="2.94181" y="0" z="0" />
                    </vertex>
                    <vertex>
                        <position x="-2.94181" y="6.07605e-016" z="-2.73641" />
                    </vertex>
                    <vertex>
                        <position x="0" y="6.07605e-016" z="-2.73641" />
                    </vertex>
                    <vertex>
                        <position x="2.94181" y="6.07605e-016" z="-2.73641" />
                    </vertex>
                </vertexbuffer>
                <vertexbuffer normals="true" texture_coord_dimensions_0="2" texture_coords="1">
                    <vertex>
                        <normal x="0" y="1" z="2.22045e-016" />
                        <texcoord u="0" v="1" />
                    </vertex>
                    <vertex>
                        <normal x="0" y="1" z="2.22045e-016" />
                        <texcoord u="0.5" v="1" />
                    </vertex>
                    <vertex>
                        <normal x="0" y="1" z="2.22045e-016" />
                        <texcoord u="0" v="0.534911" />
                    </vertex>
                    <vertex>
                        <normal x="0" y="1" z="2.22045e-016" />
                        <texcoord u="0.5" v="0.534911" />
                    </vertex>
                    <vertex>
                        <normal x="0" y="1" z="2.22045e-016" />
                        <texcoord u="1" v="1" />
                    </vertex>
                    <vertex>
                        <normal x="0" y="1" z="2.22045e-016" />
                        <texcoord u="1" v="0.534911" />
                    </vertex>
                    <vertex>
                        <normal x="0" y="1" z="2.22045e-016" />
                        <texcoord u="0" v="0.0698215" />
                    </vertex>
                    <vertex>
                        <normal x="0" y="1" z="2.22045e-016" />
                        <texcoord u="0.5" v="0.0698215" />
                    </vertex>
                    <vertex>
                        <normal x="0" y="1" z="2.22045e-016" />
                        <texcoord u="1" v="0.0698215" />
                    </vertex>
                </vertexbuffer>
            </geometry>
        </submesh>
    </submeshes>
    <submeshnames>
        <submeshname name="submesh0" index="0" />
    </submeshnames>
    <animations>
        <animation name="test" length="0.958333">
            <tracks>
                <track target="submesh" index="0" type="morph">
                    <keyframes>
                        <keyframe time="0">
                            <position x="-2.94181" y="-6.07605e-016" z="2.73641" />
                            <position x="0" y="-6.07605e-016" z="2.73641" />
                            <position x="-2.94181" y="0" z="0" />
                            <position x="0" y="0" z="0" />
                            <position x="2.94181" y="-6.07605e-016" z="2.73641" />
                            <position x="2.94181" y="0" z="0" />
                            <position x="-2.94181" y="6.07605e-016" z="-2.73641" />
                            <position x="0" y="6.07605e-016" z="-2.73641" />
                            <position x="2.94181" y="6.07605e-016" z="-2.73641" />
                        </keyframe>
                        <keyframe time="0.239583">
                            <position x="-2.94181" y="-6.07605e-016" z="2.73641" />
                            <position x="0" y="-6.07605e-016" z="2.97801" />
                            <position x="-2.94181" y="0" z="0" />
                            <position x="0" y="0" z="0.266272" />
                            <position x="2.94181" y="-6.07605e-016" z="2.73641" />
                            <position x="2.94181" y="0" z="0" />
                            <position x="-2.94181" y="6.07605e-016" z="-2.73641" />
                            <position x="0" y="6.07605e-016" z="-2.47416" />
                            <position x="2.94181" y="6.07605e-016" z="-2.73641" />
                        </keyframe>
                        <keyframe time="0.479167">
                            <position x="-2.94181" y="-6.07605e-016" z="2.73641" />
                            <position x="0" y="-6.07605e-016" z="3.50905" />
                            <position x="-2.94181" y="0" z="0" />
                            <position x="0" y="0" z="0.851536" />
                            <position x="2.94181" y="-6.07605e-016" z="2.73641" />
                            <position x="2.94181" y="0" z="0" />
                            <position x="-2.94181" y="6.07605e-016" z="-2.73641" />
                            <position x="0" y="6.07605e-016" z="-1.89775" />
                            <position x="2.94181" y="6.07605e-016" z="-2.73641" />
                        </keyframe>
                        <keyframe time="0.71875">
                            <position x="-2.94181" y="-6.07605e-016" z="2.73641" />
                            <position x="0" y="-6.07605e-016" z="4.0404" />
                            <position x="-2.94181" y="0" z="0" />
                            <position x="0" y="0" z="1.43713" />
                            <position x="2.94181" y="-6.07605e-016" z="2.73641" />
                            <position x="2.94181" y="0" z="0" />
                            <position x="-2.94181" y="6.07605e-016" z="-2.73641" />
                            <position x="0" y="6.07605e-016" z="-1.32101" />
                            <position x="2.94181" y="6.07605e-016" z="-2.73641" />
                        </keyframe>
                        <keyframe time="0.958333">
                            <position x="-2.94181" y="-6.07605e-016" z="2.73641" />
                            <position x="0" y="-6.07605e-016" z="4.2817" />
                            <position x="-2.94181" y="0" z="0" />
                            <position x="0" y="0" z="1.70307" />
                            <position x="2.94181" y="-6.07605e-016" z="2.73641" />
                            <position x="2.94181" y="0" z="0" />
                            <position x="-2.94181" y="6.07605e-016" z="-2.73641" />
                            <position x="0" y="6.07605e-016" z="-1.05909" />
                            <position x="2.94181" y="6.07605e-016" z="-2.73641" />
                        </keyframe>
                    </keyframes>
                </track>
            </tracks>
        </animation>
    </animations>
</mesh>

i will make a tutorial later, and a simple reader.