textured line between spheres

BlitzMax Forums/BlitzMax Beginners Area/textured line between spheres

hub(Posted 2006) [#1]
Hi !
Is there a method to drawing this ? (the lines between the sphere) :

A textured poly (or quad) drawing between two spheres ? Don't know how to do this with bmax ! Need your ideas and code tips !!!

Note : the spheres are displayed at random position x,y on the screen.


ImaginaryHuman(Posted 2006) [#2]
Either a textured poly or break the connectors into small segments so you can just use rectangular images, add/subtract segments to extend it, and hide and extra behind the balls.


H&K(Posted 2006) [#3]
Drag a Shadded sphere along the path.


xlsior(Posted 2006) [#4]
Drag a Shadded sphere along the path.


Are these lines supposed to be static, or also animate?

Rather than dragging a sphere (which would mean hundreds or thousands of sprites needing to be drawn), it might be the easiest to actually make sprite(s) that just contain a picture of (part of) the wobbly line, and rotate those at the correct angles. That way you can get the same effect with drawing just a couple of sprites which is bound to be significantly faster than dragging a sphere.


H&K(Posted 2006) [#5]
which would mean hundreds or thousands of sprites needing to be drawn


No it would mean one sprite drawn hundreds or thousands of times. But point taken. (my intention was to sudjest that it was created by dragging the sphere, and then the grab pasted, but hah, your right, just one "Hump" would be enough


hub(Posted 2006) [#6]
Are these lines supposed to be static, or also animate?

better if animated.


hub(Posted 2006) [#7]
i'm trying a textured poly function by Proger from the code archive. i can't draw a rectangle !
i'm searching a single textured line function (d3d and opengl compatible) ... Is someone know how to draw a textured line with this picture !!!

Thanks !


hub(Posted 2006) [#8]
Hi !
don't understand 'Proger' (code archive) functions. Is there a way to adapt this code to produce only a textured line (with the image from the previous post) ?
Thanks for your help !!!

My try :



hub(Posted 2006) [#9]
is there a method to repeat the pattern of the texture along the line ???


Dreamora(Posted 2006) [#10]
Yup. Set the UV coord of the right side to a multiply of 1


tonyg(Posted 2006) [#11]
DX UV Wrap


Rimmsy(Posted 2006) [#12]
http://modules.indiepath.com/forum/viewtopic.php?t=11

That should do the trick, I think.


hub(Posted 2006) [#13]

Yup. Set the UV coord of the right side to a multiply of 1



Local xyuv:Float[] = [ ..
			x1#, y1#, 0.0, 1.0, ..
			Float (MouseX()), Float(MouseY()), 5.0, 1.0,  ..			
			Float(MouseX()) , Float(MouseY()) + Largeur# , 5.0, 0.0, ..
			x1#, y1#+Largeur# , 0.0 , 0.0 ]

Is it ok ?


hub(Posted 2006) [#14]
results with code from the previous post :


not really what's i want. this not repeat the pattern along the line !!!


tonyg(Posted 2006) [#15]
DX UV Wrap
?


ImaginaryHuman(Posted 2006) [#16]
You have to switch on texture wrapping which is off by default. Not sure how tho


tonyg(Posted 2006) [#17]
DX BLOOMING UV CHUFFING WRAP


hub(Posted 2006) [#18]
@tonyg. Nice code but is there a solution also with opengl ?


tonyg(Posted 2006) [#19]
Don't do much OGL but, I thought, extending beyond 1.0 made the texture wrap.
OGL comment