» majortom
This site relies heavily on Javascript. You should enable it if you want the full experience. Learn more.

majortom

show on map


Registered since 28/02/07
Last seen never

majortom's vvvv page

Projects . . . Modules . . . Stats

Welcome!

<h2>Just started to play with vvvv, so
this is going to be a story about my learning.

hope you can find some things useful.

vvvvenjoy!</h2>



my first project

deworm is a flexible node for creating wormlike meshes.
the challenge was to create a loop for index table creation
and, what I found later on, texturing witch is not yet finished.

take a look at the current version (deworm Help.v4p) if you like:

@ projects page



Reindex module

new version of deworm is almost ready.

the patch changed inside out. well, in the initial version the whole mesh was built from calculations, and as a newbie i was happy to use the most complicated methods to achieve that. :-P
tnx to sanch i realized how deworm is a simple Grid (EX9.Geometry) |grid? mesh wrapped around. that really simplified the creation process and opened one new insight.

in the initial version, index table (this is a table that defines which vertices are connected in triangles) had to be built from scratch, and i never thought about order of those vertices. so it turned out that odd triangles was built in clockwise fashion and even triangles in counter-clockwise. magicaly enough, that produced very nice result with flat shader (you can see the image above). but when i used the other method by simply extracting index table from the Grid (EX9.Geometry) |grid? mesh, flat shader showed his default ugliness we hate it all about.

so, i thought, maybe i would like to use flat shader for artistic purposes sometimes, and not to have all objects rounded and phonged. thats how this little module came into existence.
see for yourself.

default reindexed

-
Download Reindex from here
-


-
i promise i will learn how to create different pages for projects and modules. :-)
-


-


-

OK. here it is.

-
deworm is now in shape and it does more or less what was planned.
-
texturing is fixed and there is Mode2. in this mode you can feed in points as a spread - for each section and make crazy creatures or body limbs.
-
deforming, i mean deworming is as functional as in old version.
-
@ projects page
-


-


-

bypassing the pixel shader halleluyah

-
<h2>or digging for devil's seed</h2>
-
i am learning HLSL and started with vertex shaders.
-
see: How to write Pixel- and Vertex-Shaders?
-
since i have some spare time with my confy old notebook whos GPU doesn't support pixell shaders? at all, i thought, well, i could use it to practise playing with vertex shader, feed it into FF while bypassing pixell shader? completly.
-
i took gouraud shader, did SaveAs and started messing around.
-
i went down to FF tehnique block and changed:
-

  VertexShader = compile vs_1_0 VS();

-
while leaving
-

  PixelShader  = NULL;

-
i started to write my code and everything worked great. vertices were flying around changing colors, and normals were whiping all over the place reflecting light as planned. and i saw it was OK, and i was very happy. (just like in the old book)
-
on the seventh day (in a matter of speech), i tried to apply textures to my live meshes so to make them funny and whadever - but, hell no, my meshes turned dark, and once created world changed drastically.
-
I felt an urge to find clues and fix the shame (just opposite to what happend in the old book) and started to check every single line in FF tehnique.
-
the old rule of universe says: locate the devil's doing first, so i found myself turning every single line in texture block on and off (// them out) and i watched for the changes.
-
it appeared that when i turned TextureTransformFlags line off, textures showed up in all their glory - in the very next compile period moment.
-
well, i was happy, no Q about that, but what is the default state of TextureTransformFlags? it is COUNT1, which says: use 1D texture coordinates. logicaly enough, when i turned TextureTransformFlags to COUNT1 everything was right.
-
since my textures are 2D and showing properly with COUNT1 i took it as an insult from the devil himself and i am still searching for his seed.
-
maybe the gods from vvvv heaven can find whadahell?
-
'o_0'
-


-


-

news?

-
it has been some time. majority of my free time (and thats not much) i spent fixing deworm.
-
in the meantime my old laptop died on me. i decided to buy new decent one (read: vvvv graphic monster) and somehow i am still waiting for one particular offer. can hardly wait to start messing arround with PS!
-


-


-

Grid 2

-

-
this idea poped up on my mind while I was finding myself endlesly rising grid resolution to make some surfaces look better.
-
there are some optimization algorithms that change the way triangles are conected so to avoid sharp edges and spikes, but that seemed like complicated idea for vvvv. and this method is no good for vertex manipulation in shaders.
-
it is not very hard to notice the reason for inconsistent apperance.
-
Regular grid looks like this:
-

-
obviously, if we try to bend that grid like a piece of paper along the red line, vertices on that line will stick out like spikes and faces between will have wrong orientation. this would produce some inconsistent lighting.
-
bends that are oriented closer to triangle edges, on the other hand, would produce better results.
-
since triangle edges are not equaly spreaded around vertices, we will have large errors for bands closer to the red line, and smaller for ones closer to triangle edges. these errors are less visible on smoothed surfaces but still pop up as specular highlights.
-
Now take a look at this kind of grid:
-

-
angles between triangle edges are equalized (60 degree in perfect grid).
-
we can say that the same error would be visible for bend along vertical red lines and now we have not one but three of them - but there is a catch.
-
trying different hight map surfaces and vertex shaders I realized that lot of smaller errors look better than few large ones. using normal grid I needed more vertices to compensate for those errors. Furthermore, some ugly repeating patterns were visible with normal topology only.
-
yet, some surfaces look better with normal grid type, but it is good to have more choises.
-
Grid2 /EX9.Geometry Mesh/ module
-
Grid2 has vertex Position X & Y outputs ans Position Z input. since mesh is built inside the module it would be bad to split it again for vertex juggling. if you want to include Position X & Y inputs as well, just break the connections where output pins are connected, create new inputs and use output values as reference.
-
I also added the Bound pin. If switched off, all triangles will be equal-sided, Y size of the grid will depend on grid resolution while topology will be kept perfect. this option come in handy with vertex shaders very mucho.
-
example with 10 x 5 grid:

bound = 1

bound = 0

o_0!



blob

new project: 'Surfacing a scalar field' is a project about marching cubes algorithm, metaballs and mesh smoothing in vvvv.

@ projects page


anonymous user login

Shoutbox

~2h ago

DiMiX: @lecloneur:cool

~1d ago

drehwurm: @udo I feel old at 36 with him too ;)

~1d ago

mrboni: @idwyr - try elliotwoods. He spends a good bit of time there

~1d ago

idwyr: Any tips on visiting Seoul? (vvvv/new media exibitions/interesting spots)?

~1d ago

tekcor: btw 3d printed bateries with graphene http://www.3ders.org/articles/20141024-graphene-3d-lab-unveils-first-3d-printed-graphene-battery.html There are also DIY instcruction how to produce graphene

~1d ago

tekcor: since vvvvjs can run any shadertoy code I will get the nvidia tk1 and see what i can do with it here with raytracing etc

~1d ago

metrowave: Checkout this 3D printer in full HP!

~1d ago

metrowave: @tekcor that's cool...future of online 3D gaming is WebGL: http://tinyurl.com/legzlu2