GMLscripts.com

Discuss and collaborate on GML scripts
Invert

You are not logged in.

#1 Re: GML Code Help » True Physics Slopes. Engine Done, Optimising Time. » 2010-06-09 22:03:42

pretty nice.  didn't really look at the code because I'm in no way qualified to figure it out but it worked nicely and ran at about 800 fps (capped at 999)

#2 Re: GML Creations » Yet Another Idiotic Light and Shadow Engine » 2010-04-17 18:04:12

hey xot, I wanted to show you something.
http://host-a.net/JosephCh7/planar.zip *updated since edit* password is ak47

I figured out an easy way to set up planar mapping just by uv mapping from 'top' projection.
It took me a while to figure it out but I did and it looks great.
It's not perfect, something about the size that doesn't line up perfectly (even with exact dimensions) but it works.

I also threw in my shadows but they don't seem to copy from surface to surface...not sure why.
Anyway, hopefully I can figure something out.  This would be a great effect for any game.

edit.
I decided to just do an ortho render to background so everything casting a shadow will have one directly below (for now).
Also, I managed to fix the surface uv mapping so it's almost pixel perfect with my model!
Just wanted to thank you xot for making that planar example in the first place.
without it I never would have had models receive shadows.

#3 Re: GML Creations » Yet Another Idiotic Light and Shadow Engine » 2009-12-16 20:01:40

very confusing but it's making a bit more sense.  I see how the format works, if it is what you say.  "You said The first line in my test file is 100"...what test file is this?  was this just a some random model you made to play with?  where was the 100?  at the 0 or 5.0000?  so if I make a cube in a modeling program, save it as an obj, and bring it into marzipan to save as a d3d, and open it up, it'll show data much like what you've shown above?

or, what were you talking about with marzipan already set up planar projection?  I don't see any thing in the menu's, only a couple uv mapping options.

#4 Re: GML Creations » Yet Another Idiotic Light and Shadow Engine » 2009-12-15 16:39:45

Holy crap...I see it, I can read, but I have absolutely no idea how any of it works.  I'll have to study this for a while before I get it, but once I do, I know my shadows will be a million times better.  THANKS!!

The more I look at this the more I love it...it's just so awesome!  I seriously hope it's not as complicated as it looks...

So...with your spider models, did you have to find all of the triangle coordinates for it too?  and explode them from a string like you did this cube?
so every model I want to cast shadows on, I must find every triangle position and...somehow write it into a string?  Is there some way to...I don't know, calculate everything at game start?

#5 Re: GML Creations » Yet Another Idiotic Light and Shadow Engine » 2009-12-10 03:37:44

alright, I kind of understand.  it's still way beyond me how it actually works though.

#6 Re: GML Creations » Yet Another Idiotic Light and Shadow Engine » 2009-12-07 02:33:27

I don't get how to project the texture onto the model...uv maps aren't perfect squares so it's not like you can just draw it overtop and expect it to form around it.
could you explain this further please?

#7 Re: GML Creations » Yet Another Idiotic Light and Shadow Engine » 2009-12-03 05:58:31

so xot, did you come up with anything new to add to your shadows?  like...casting over models?
also, is this going to speed up your engine any?  I wouldn't think so, but it's doing something with a dll so I thought maybe it could be taking some of the load off, or is it adding to it?

#8 Re: GML Creations » UV Hijinks - Smoke and Mirrors » 2009-10-27 12:21:05

wow dude, this stuff is awesome!  if only they were expandable...or at least if I could expand on them.
I thought I knew surfaces, but this is way too complicated for me.  hopefully I'll learn something from it.

I got really food speed on most of them, but always over 60 fps.
you know how crappy my computer is, so that's awesome.

my favorite one was either the environment mapping or apparition.  but everything has a really cool effect.
I wish I knew how to use them better.  Little Big Planet uses the apparition effect on point bubbles and clouds of gas...
but I don't see yours working on a regular background unless it's just a simple edit that I'm too blazed to notice right now.

anyway, great job on everything.  I'm always looking for awesome effects.
maybe you could turn this stuff into water physics?  it seems like it'd work well as long as you can get the collisions right.

#9 Re: GML Creations » Yet Another Idiotic Light and Shadow Engine » 2009-09-12 00:49:06

video card: Nvidia GeForce Go 7300 (32bit 60Hz)

#10 Re: GML Creations » Yet Another Idiotic Light and Shadow Engine » 2009-09-11 16:54:59

alright, I don't know much about specs, but...
dell inspiron laptop
vista premium (without using the horrible vista settings)
some crappy GeForce card
1.72 ghz processor
1 gb ram

I ran about a 20/60 fps on your original room.  my highest, disabling and what not, reached about 35-38 fps.
I changed the room to 640x640 and used 2 static lights and the player's dynamic.  1 spider, a box around the room with two inside rooms and 5 pillars.
I managed about 40 fps without disabling anything.  60 after removing blur. 58-60 with blur set to 1. and 70/90 with blur set to 1. and a whopping 110/120 without any blur.

It's slow on my computer, but it's a horribly slow computer anyway.

the engine is so cool though!  too bad spiders didn't cast on the walls sad
other than that, I had no bugs.  no problems changing the room, except I used a wall, and not a wall block, to fill in gaps.
awesome job!

#11 Re: GML Creations » Yet Another Idiotic Light and Shadow Engine » 2009-09-07 03:04:51

wow, that's a brilliant idea!  I'm going to try that out.  it seems paths are a lot more useful than I have ever imagined.  thanks for the insight!

as for the lighting...I think I have a good idea how to set it up.  also, I'm not worried at all how slow this is, because it's all going to be rendered once.
thanks.

also, I was wondering about how you cast your shadows up the walls.
I thought you said, you find the point at which the shadow on the floor comes in contact with the wall, and then draw it up.  how exactly are you doing this?
you're doing an intersection script to find the collision point, and doing what with the drawing?  in order to do the intersection, you'd need some other way of finding these points...like the shadow calculating a line from the source to the radius distance, and to come in collision with the wall, you'd need either a solid object or something?

I made some "sun based" shadows that only cast on the floor.  so I'm looking for a way to get them to climb the walls...although the sun points down at an angle, meaning the shadows won't travel the entire height of the wall, and leads to a visual problem when drawing it.  I'd like to find a way to draw the shadow (currently just a sprite to texture) to a texture that's on everything.  that'd take some sort of magical uv mapping though...
image - you can see how the shadow on the floor right above the crosshair obviously should cast upon the wall as well...ahh, if only. sad

if you have any ideas AT ALL, please, speak!  I'm up for anything.

#12 Re: GML Creations » Yet Another Idiotic Light and Shadow Engine » 2009-09-06 02:33:55

@bump mapping
just awesome.  thank you so much!  the contrast passes do wonders.
this is an awesome example and I'm really interested in figuring it out completely.
It'll be a bit more than I was hoping for, but I guess I should have known.
thanks again, and especially for spelling it out!

I just tore apart the bump map 03 you posted and pretty much rewrote it.  I actually took out a lot of stuff and kept what I needed.
I probably wrecked something, but it works fine at least...I just have two problems though.
you probably left out the distance variable (fading it based on the light position) because I'm guessing everything I need to make this is already in there, I just have to work it out on my own.  I'm pretty positive I can do this part, I just have to read through what I have and draw what's needed.

and then there's the "multiple source" problem.
I looked at your d3d dynamic shadows you posted and noticed how you worked out your multiple lights.  using i = 1, creating light with id of i, and adding i by 1, then moving on.  I get it, but I don't get how this would work for something that doesn't use id's like d3d lights.  I just took another look at your "fakelighting" after remembering it uses multiple lights...but as far as I can tell, this is nothing like the bump map example.

and now that I think of it, I'll explain what I've done to it.  I made an objBumpControl take care of all of the drawing.  in the drawing scripts, I simply put...with(parBump){draw everything} great, it kind of works!  not really though.  parBump is a parent object for objTexture objects.  I figured, it would go through all of the parBump objects, draw its primitives, draw them to the surface, draw the surface, and it'd be all good.  of course, it's not that easy.
here's the file: www.poofupload.com/newpoof/uploads/BUMPMAP.gmk

@flying saucer
oh wow, very neat how that works.  I never would have seen the string!

@d3d lighting/shadows
I just got done reading and looking at your shear files you posted.  some pretty awesome stuff!
I can't believe you're not calling D3D_start!  pretty awesome work here.  I can't wait for whatever you have to release next!

#13 Re: GML Creations » Yet Another Idiotic Light and Shadow Engine » 2009-09-05 07:22:24

very cool!  I didn't know you could easily stack views like this, pretty neat.  it'd be just the same as drawing it 8 times right?  or is this somehow faster?

in your "engine", you are calling d3d_start correct?  and you're using surfaces?  how are you mixing the two?  I know if you end d3d, render the surface, and start it back up again, it somehow works, but I have had no luck in doing so.

also, how complicated is your bump mapping?  I've seen tutorials on it but I never really learned how.  you say you can do the floor with no problem, so it must not be that complicated...either that you're much smarter at whatever it is you're doing to make it...which is most likely the case.

anyway, I've wanted JUST a bump map example for the longest time.  I'm only ever seeing it deeply tied into a lighting engine or something and it's always too much work to try and figure out what needs to be left or thrown out.  I do understand that you need all 4 sides of the bumped texture, and then an image of no light, and an image of light directly overtop.  right?  and then what, you calculate the position of the light, use blend modes, and change the drawing order or drawing color of each layer?

whatever you have to say, just know, I can catch on pretty easily.  as long as you have some sort of explanation for how something works, it should be no problem for me to start understanding how to do it myself.
thanks for the info, I can't wait to start experimenting with these ideas.

#14 Re: GML Creations » Yet Another Idiotic Light and Shadow Engine » 2009-09-04 04:59:40

HOLY CRAP XOT!  I stumbled upon this out of nowhere.  I honestly don't remember how I got here.
and then I was drooling over the very first screenshots of your early lighting.  as I moved on, my eyes almost blew out of my skull!
I couldn't believe how amazing you're working these shadows out...especially with native gm!  I've worked so hard to create the simplest of shadows, and you're taking it completely over the next level and beyond.  this is seriously mind blowing.

I really cannot wait for you to release this.  I know this is going to change everything I know about D3D.

Since you haven't released anything yet, I was hoping you could help me understand exactly how you're doing your lights.
As I read, it seemed like you're drawing the light source, but using fog to reshape it around objects.

I wish you would release something other than the bsp tree.  sure, it's an amazing setup, but it's only a piece of it.

It also seems like this is going to be a lot more complicated than I expected it to be...unless you're having a few scripts do most of the work.
I thought I knew quite a bit about D3D, but apparently not!  Please, release something else!
because of this, I consider you one of my heroes.  this is just amazing.

Board footer

Powered by FluxBB