Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / blackhole effect?

Author
Message
Mugen Wizardry
User Banned
Posted: 6th Aug 2010 00:29
What is up with the vertex code?

I want it to look like its warping time and space.



CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 6th Aug 2010 01:02
What's up with your post?

I want to know where the media is at line 23?

Also (as usual) it might help if you could explain your problem slightly better... getting sick of saying that, sorry!!

Mugen Wizardry
User Banned
Posted: 6th Aug 2010 01:12
dude, the media is in the sphere mapping tut in ur projects folder.

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 6th Aug 2010 01:18
No... it isn't

Please pull your neck in a little and allow people to help you without insulting them?!

Mugen Wizardry
User Banned
Posted: 6th Aug 2010 01:23
i wasn't insulting you...

Anyway.

Here, I uploaded a zip.

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 6th Aug 2010 01:29
Quote: "i wasn't insulting you..."

Correct, sorry. I'm having a bad day and the assumption I knew where the none existant file was (on my machine at least) came across as an insult which was not what you intended.

Looking at the problem...

Mugen Wizardry
User Banned
Posted: 6th Aug 2010 01:30
np

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
Mugen Wizardry
User Banned
Posted: 6th Aug 2010 12:08
anyone?

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
Mugen Wizardry
User Banned
Posted: 6th Aug 2010 13:31
baxslash?

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 6th Aug 2010 13:44
This is weird:

x# = get vertexdata position x(i) + rnd(1000)>100
y# = get vertexdata position y(i) + rnd(1000)>100
z# = get vertexdata position z(i) + rnd(1000)>100


Why are you randomly adding 1? - that code would be like...

Vertex position X(i) + (if RND(1000)>100)

So it's either X, or X+1, X+1 is a 1 in 10 chance. Do you maybe want to divide by 100, like...

x# = get vertexdata position x(i) + (rnd(1000)/100.0)
y# = get vertexdata position y(i) + (rnd(1000)/100.0)
z# = get vertexdata position z(i) + (rnd(1000)/100.0)

So it's adding a random float from 0.0 to 10.0.

Health, Ammo, and bacon and eggs!
Mugen Wizardry
User Banned
Posted: 6th Aug 2010 13:49
ok now its a bunch of weird triangles.

i need it to act like a time warp.

a bubble effect

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 6th Aug 2010 14:04
I'm not sure what you mean by bubble.

If you are after a black hole, then I would use a 3D location for it, and use that in relation to the vertex positions - then move the vertex towards the black hole, the closer the vertex, the faster it moves. This would give a kinda black hole vacuum effect, where the objects are sucked in but they would warp, which might be what you want.

A bubble effect would take a bit more work - like storing the original positions, or distance from centre of all the vertexes - so the vertexes could then bulge where they need to. For instance, find the vertex that is furthest away from the centre and use that as a guide - and for every other vertex store the distance in realtion to that - so a vertex that is half the distance from centre, would be 0.5. Then you have the distance of the 'control' vertex, and each other vertex can bulge uniformally. It's not easy to do that, much easier to do the vacuum thing with models getting sucked into a black hole.

Health, Ammo, and bacon and eggs!
Mugen Wizardry
User Banned
Posted: 6th Aug 2010 14:09
i have no idea how to do this.

alls i wanna do is warp a point in 3d space..

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
Mugen Wizardry
User Banned
Posted: 6th Aug 2010 14:12
u know, like if u put something under a magnifying glass.

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
Mugen Wizardry
User Banned
Posted: 6th Aug 2010 14:16
and dont say sphere mapping. i tried that

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 6th Aug 2010 15:12
Can you at least post a link to an image showing the desired effect?

[b]
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 6th Aug 2010 15:20
I think the only way to do that effectively, would be to render an extra camera onto that shape - like maybe just a sphere, with the camera render scaled so that there are 3 renders on Y, and 6 renders around (scaling the texture by 1/6th , 1/3rd) - then you'd have a warped screen that you could orientate in front of the real camera.

It would be far too complex and fiddly to alter the vertexes of all your objects, even using a shader is probably not a great idea.

Some did do a fisheye lens effect a few weeks back, maybe that's worth looking into - they use a sphere as well.

Health, Ammo, and bacon and eggs!
Mugen Wizardry
User Banned
Posted: 6th Aug 2010 15:40
where would i find it?

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 6th Aug 2010 16:06
@Mugen Wizardry
If you have something more to say, and no one have answered yet, try to edit your post.

Cheers.

I'm not a grumpy grandpa
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 6th Aug 2010 16:14
Code snippets:
http://forum.thegamecreators.com/?m=forum_view&t=170392&b=6

Health, Ammo, and bacon and eggs!

Login to post a reply

Server time is: 2026-07-24 20:35:52
Your offset time is: 2026-07-24 20:35:52