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.

NVIDIA Competition 2008 / Scraggle's Puzzle Game

Author
Message
Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 25th Dec 2006 22:44
Quote: "But sadly the project folder (and several others) got deleted in a bizarre pet related incident"


They seem to have a lot to answer for. One of our cats jumped on to the keyboard and I was instantly presented with the message "Are you sure you wish to delete the btinternet folder and all its contents?". I managed to grab him before he pressed any more vital keys. How he managed to get to that point so quickly I do not know - I would have to plough through all sorts of folders before I even found the folder, let alone delete it!

Quote: "d) Already in there. Gold and Silver objects are reflective"


OK.

Quote: "c) Tried wood but it looked a bit naff on small objects"


Yes - and not really in keeping with the general glitter of the game.

Quote: "b) I don't think that would work because the pulsating glow would probably get in the way of the glow used for selection."


True - didn't think of that.

Quote: "e) I really like the sound of sparkly objects. It isn't something that had occurred to e but it sounds good . Do you have a sparkly shader?"


Dammit - I knew I shouldn't have opened my mouth. Now I'll have to think of something.

Quote: "d) Animated objects is something that I thought of doing while I was still in the design stage. I had considered doing a 3D morph from one object to another and at this point I still haven't ruled it out as an option. The trouble is, I have never done any vertex manipulation so I would have to teach myself something new. Which means that it can only be seriously considered if I finish everything else and still have time to kill. However, if vertex shaders could make the job easier then I am all ears."


Vertex manipulation is quite easy in a shader - but like everything else it all depends on how complicated an effect you want to create.

So, I'll see if I can come up with something sparkly or animated when I get a minute.

In the meantime I'm struggling to "get off the ground" with a new game I've just installed (new to me that is). I'm used to turn-based games where nothing happens till you decide what to do - with this game my town keeps getting over-run while I'm pondering the manual (it has a pause button - but I keep forgetting to press it ).

Quote: "Here is Joe's original work:"


Yes, that sort of thing always makes a game look good and probably takes a lot of skill to create in the first place.
Scraggle
Moderator
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 26th Dec 2006 18:34
Sorry ... I didn't manage to get a demo up as planned and now I have been dragged (kicking and screaming!) to the in-laws for three nights and I forgot to bring my laptop. So, I can't do anyhting for a while.

Before I left I did manage to get a new video uploaded to youtube, so that will have to do for now.

Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 27th Dec 2006 18:17 Edited at: 27th Dec 2006 18:18
Here you are as promised.

It's a simple shader that just morphs a sphere into other shapes.

It doesn't have any lighting at the moment - and the sizing needs a bit of tweaking. But I hope you can see from the code and the visual effect that vertex manipulation in a shader is quite easy.

Getting the normals right for lighting is another matter ...

Quote: "and now I have been dragged (kicking and screaming!) to the in-laws"


Blimey - that was quick. Did I blink and miss something? [I know what you mean, though. ]

Edited typos.
Scraggle
Moderator
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 28th Dec 2006 19:26
Thanks Green

That is a suprisingly small amount of code to achieve such an impressive result. I tried replacing the sphere with my teapot and although it worked it didn't work very well.
I had a look at the shader to see what I could do with it but I can't really figure it out. It all seems to be contained in the five lines within the VShader function but I can't really devote any time to working it out until I am closer to finishing the game.

If I have the time I could perhaps use something like this to morph each object into a sphere and then into another object but right now my time is devoted elsewhere in the project. Here's hoping I get the time to put your shaders to good use

Your efforts are very much appreciated ... Thank you

Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 28th Dec 2006 20:15 Edited at: 29th Dec 2006 16:49
Quote: "That is a suprisingly small amount of code to achieve such an impressive result."


Thanks. That is one of the joys of shaders - a lot of the work is done for you behind the scenes, looping through the polys and vertices, etc. In DBP you would need to take care of that.

Quote: "I tried replacing the sphere with my teapot and although it worked it didn't work very well."


Yes, that's one of the problems with that particular shader - it was written on the assumption that the object was a sphere centred at the origin. It is a matter of luck to some extent whether it works with other objects. You could, of course, just use a sphere.

Quote: "It all seems to be contained in the five lines within the VShader function"


Yes, five lines of code does all that. The key is to draw a picture of a sphere and, say, a cube having the same centre. Then draw a ray out from the centre and mark where it intersects the two objects. I then worked out a formula to give the coordinates of the intersection of the ray with the cube (I assumed the input object was a sphere, so the sphere's coords on the ray are contained in the variable In.Pos). Rays are implicitly defined by imagining lines from the center of the sphere to the vertices of the sphere (which are input to the vertex shader). You then have to decide where the new point is going to be on the same ray. I chose a linear combination of the coords of the sphere and the cube - with coefficients depending sinusoidally with time (the lerp function does the linear combination [Edit: What an idiot, I didn't use the lerp function in this shader!! Might run faster if I did...]). That new point is the output position of the vertex.

Hope that makes some sort of sense. I'm afraid it's one of those things where it's easier to write the code than to explain how I arrived at it - to be a mathematician is both a blessing and a curse I'm afraid

Quote: "Your efforts are very much appreciated ... Thank you"


You're welcome.
Scraggle
Moderator
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 5th Jan 2007 11:04 Edited at: 5th Jan 2007 11:09
Just a small update:

I haven't been able to much on this for about a week but yesterday I had all day to work on it, so things are looking good.

Yesterday I got most of my bonus goodies to react correctly to being collected. You can:
Speed up the rotation of the circles in either direction for a limited time before they restore to their original speed and direction.
Pause the rotation (again, for a limited time).
Mulitply your bonus by 2, 4 or 6 times. Although you will still need to finish the level before the bonus runs out in order to beneift.
So, with that in mind - you can restore your bonus to maximum again.
You can also increase the amount of time available to complete the level.
There is a score pickup which will give you a large (but unknown until collected) boost to your score.

There are also pick-ups which you should try to avoid:
You can decrease your time available to complete the level.
You can decrease your available bonus.

I have got most of them working and will get the bonus increase/decrease in there as soon as I finish posting. The only ones I am still not sure of are the increase/decrease of your time available because at the moment each level is sychronised to a piece of music. So, if the music lasts 3 minutes and 32 seconds then so will the level. Changing the level time will mean the the level will either finish before the music or the music will have to loop. I am not sure I want that.

Once I have got the bonus thingies fully implimented that will be the gameplay finished. I then have to work on a pretty front end, some inter-level prettiness and an options menu. Previous expereince has told me that coding descent menus can be as time consuming as coding the game itself, so I may be a little pushed to get the menus to look the way I want them.

There isn't really much of a visual difference to justify a new screenie of the game. So, instead here is a screenie of the planned options menu:




Peter H
21
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 5th Jan 2007 16:16
your menu makes me jealous

One man, one lawnmower, plenty of angry groundhogs.
Scraggle
Moderator
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 5th Jan 2007 20:01 Edited at: 5th Jan 2007 20:06
New Demo

I would appreciate it very much if you could download this and let me know of any problems you find or any suggestions for improvement that you may have.

To save you the trouble of reporting bugs that I already know about, here is my list of known bugs and issues:
1) The timer bar remains green on level one. On all the other levels it gradually becomes red. Not sure why level 1 is causing problems though.
2) You can click on 'Options' by all means but you won't get any - I haven't written them yet.
3) If you have tried any of the previous demos, you may have used right-click to start a new chain. You can't do that any more. Instead you need to click the 'Break The Chain' button.
4) There are no instructions yet and because you have a different objective on each level you will need to read below to find out what to do.
5) When you complete each level, the next one starts instantly. There is nothing inbetween ... yet.
6) If you get a 'Pause' token the shell will pause but when it starts again, it starts from where it would have been if it hadn't stopped ... odd!
7) The tokens to rotate the shells do nothing yet.
8) The tokens to increase or decrease your timer produce a sound but that is all. I haven't decided if I am keeping them in yet.
9) Your Bonus isn't added to your score at the end of the level. I just haven't got round to it.
10) When you get the bonus score token (a gold dollar in a bubble) the sound I have used is my good lady saying 'Yippee'. I need an unobjective decision on whether or not to keep it in or go for something different.
11) If you are good enough to get to level 5, you will notice that nothing much happens. I know about it. I haven't set the levels parameters yet.

How to play
On each level you start by clicking any object in the outer shell. Then you must select any other object that is the same shape and/or made from the same material.

Level 1. Midas Touch - You must turn 50 objects into gold! You can select an object that is already gold if you like but then it will be destroyed and go against your total.

Level 2. Un-Named - Simply get 50 in a row. Slightly more difficult than the last level because now each object detonates when used, so you can't use one more than once.

Level 3. Treasure Hunt - There are 10 Gold objects on screen. Collect them. It's harder than it sounds.

Level 4. Medusa's Lair - Medusa has been around and turned several objects into stone. It is your job to return them to normal. The difficult part of this level is that once you are on a stone object, you can't select another until you leave it.

Level 5. - Still in progress.

Note: I haven't fully optimised all resolutions so this will only play on a 1280 x 1024 monitor. If you can't support that then this demo will not work for you ... sorry!

I am uploading the the demo as we speak. I will edit this post with the link when it is complete.

Peter H
21
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 5th Jan 2007 20:12 Edited at: 5th Jan 2007 20:13
Quote: "2) You can click on 'Options' by all means but you won't get any - I haven't written them yet."

Hey! my program has that bug too!

boy, that's spooky

downloading...

[edit] oh, right, you're still uploading heheh

One man, one lawnmower, plenty of angry groundhogs.
Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 5th Jan 2007 20:16
Quote: "I am uploading the the demo as we speak"


No sign of the demo yet. How big is it?
Scraggle
Moderator
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 5th Jan 2007 20:27 Edited at: 5th Jan 2007 20:40
27.3Mb

BTYahoo doesn't want to know.

... I'll try here.

It failed here too

I have made a Torrent for it but it is my first attempt at making a torrent so I don't know if it will work ... here's the torrent give it a try.

Scraggle
Moderator
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 5th Jan 2007 20:46
I have also split the download into 5Mb chunks to see if I can upload that here ... here's part one.

Scraggle
Moderator
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 5th Jan 2007 20:55
Yay!
Part one worked. So, here is part two:

Scraggle
Moderator
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 5th Jan 2007 21:04
Part Three:

Scraggle
Moderator
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 5th Jan 2007 21:09
Part Four:

Scraggle
Moderator
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 5th Jan 2007 21:13
Part Five (of Five)!

Scraggle
Moderator
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 5th Jan 2007 21:17 Edited at: 5th Jan 2007 21:21
OK that's it.

If anyone can be bothered downloading five parts of a file then I would appreciate some feedback.

Thanks

I have come across two more issues:
1) The 'shrapnel' from exploding objects should be different for each material but it is the same ... I will work on that.

2) If you run out of time the program will end without warning. I will change that when I get time but for now that is just the way it is.

Peter H
21
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 5th Jan 2007 21:21 Edited at: 5th Jan 2007 21:34
downloading...

[edit] nice! confusing at first, but once you get the hang of it it's pretty fun!

and yes i did read your explanation of level 1 before playing, i wasn't confused about the level specific details, mainly just overall, "what to do"... but really it wasn't that hard to figure out

I couldn't get more than about 43 gold objects before it would just shut down on me (seemed to be a time thing, because the first time i played i didn't get nearly that many gold objects)... was i running out of time?

One man, one lawnmower, plenty of angry groundhogs.
Scraggle
Moderator
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 5th Jan 2007 21:50 Edited at: 5th Jan 2007 21:52
Quote: "was i running out of time?"


Yes!

See item (2) in the post above

I appreciate your efforts downloading 5 seperate files. Any further feedback would be handy.
For example, how many attempts do you need before completing level 1? That would tell me the difficulty level because it is very hard to assess that myself.

Peter H
21
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 5th Jan 2007 22:58 Edited at: 5th Jan 2007 23:26
ok, the first two times i couldn't get past level 1

the third time i beat level 1 & 2, then the UPS man came to the door while i was in level 3 (but i think i would've won)

the fourth time i played i beat 1, 2, & 3.. then ran out of time on 4... but it's so fun i think i'm going to have to go back and beat level 4

[edit] played several times again, i can't get down to less than 3 stone objects on the last level

One man, one lawnmower, plenty of angry groundhogs.
Scraggle
Moderator
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 5th Jan 2007 23:04
Excellent!

It sounds like I have got the difficulty level about right
Thanks for the feedback. Have you heard the 'Yippee' yet?

Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 5th Jan 2007 23:06 Edited at: 5th Jan 2007 23:11
I'm probably being very stupid - but how do I combine the five .rar archives? The first executable ran on its own and closed when I completed the 1st level (think I completed it anyway).

Am I supposed to use the "Torrent" download as well?

Edit: just read the previous few posts more carefully. Seems I didn't complete the level after all. But since I was busy trying to use the controls I didn't have time to see what was happening to the score - still don't know how I am supposed to use the five downloads though. Only seemed to need the first one? Somewhat confused.
Scraggle
Moderator
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 5th Jan 2007 23:08 Edited at: 5th Jan 2007 23:12
Once you have downloaded the five files just unzip them all to the same folder and the should automatically combine into one file.

You don't need the torrent file.

Just experimented. You don't even need to highlight them all just unzip the first file and it will take care of everything for you

Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 5th Jan 2007 23:13 Edited at: 6th Jan 2007 00:00
Thanks. Looks as if everything is fine then - except my skills at the game.

Three attempts so far. Let's have another go now that I think I know what I'm doing ...

Edit: This is getting sad. Up to about 10 attempts now and the game closes when I reach 50 or so on the chain. Am I trying to do the wrong thing? How do I know whether I've turned 50 into gold? Is that the same as the chain length? If so, why does the game close? (Time to re-read the instructions ... )

2nd edit: this is getting sadder. Must be missing something vital. If I click on a gold object does that count against me? If so, where is that shown in the score? (Time to re-read the instructions yet again ...)

3rd Edit: Ok I can sleep at night now - just completed the first level. Perhaps I shouldn't have met an old school friend for a pub lunch today after all ...

This game is coming along nicely. Very addictive. Just wish I was up to the task. Perhaps I should stick to writing shaders?
Scraggle
Moderator
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 6th Jan 2007 08:57 Edited at: 6th Jan 2007 10:10
I just realised that I removed the FPS display code!

That would have provided me with some valuable feedback. Instead can I just ask: "Does it seem to run OK?"

@Green Gandalf
I have made sure that the code to solve the mouseclick issue that you had is in this time. Does it seem better?

You make a valid point about clicking on a gold object. There is nothing to show that you have done a bad thing (other than it blowing up). At the moment you get a score for doing so, just like any other object. I think I will have to make it a negative score and include some obvious sound effect and perhaps include a similar effect over the score display that you get when you pick up a score bonus. [Edit] Done! And the floating score drifts down instead of up[/Edit]

As for knowing when you have completed your task ... that is what the objective bar is for. When the blue is full you will progress to the next level.
In this picture we can see that the level is about 50% complete with a little under half the remaining time. Destroying a gold object will reduce the objective bar and you may therefore need to get a longer chain than 50. I say 'may' because the length of the chain is not important in level 1 so you can break it at any time (reducing future scores though).



@PeterH I too have a lot of difficulty beating level 4. I think I will add a bigger time limit. [Edit] Done! [/Edit]

Thank you both for your feedback. You have both given me cause to make changes. Which is what I was looking for.

Keep it coming

Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 6th Jan 2007 12:44
Quote: "I have made sure that the code to solve the mouseclick issue that you had is in this time. Does it seem better?"


A little bit. I think part of the trouble is probably me - I'm not very good with games that require precision in the timing of mouseclicks or key/button presses. Even the simple task of opening up an application cleanly often defeats me - I get two copies opened or none much of the time.

My attempts at defusing the "mines" in the PS Odd World games were laughable for that reason. If no-one else complains about the issue I suggest you give it very low, if not zero, priority.

Perhaps you could include a game difficulty setting option for clumsy slow-witted oafs like me?
Scraggle
Moderator
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 6th Jan 2007 17:15
Quote: "clumsy slow-witted oafs like me"


Hardly! Your shader skills far surpass mine. I wouldn't call you slow-witted.

Quote: "Perhaps you could include a game difficulty setting option"


Good idea! I hadn't thought of that. I was planning on having two methods of gameplay. The first being the one in the demo with different objectives each level and the other option having no particular objective but just to keep going for as long as you can.

However, a difficulty setting would be very easy to implement. Simply have more or less objects to collect in each level. The one in the demo could be 'Normal' and I could include 'easy' and 'difficult'.

Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 6th Jan 2007 19:17 Edited at: 6th Jan 2007 19:19
OK, did a bit better today - probably because the 6 pints of Guinness had worn off. Was that a fur or wood shader I saw in Level 3 (the yellow and black things)?

One more suggestion: How about having a number of lives at each Level so the game doesn't just close when you fail? Perhaps restart the Level a given number of times at each Level? Say 3 lives for Levels 1 and 2, 2 lives at Levels 3 and 4, just one at Level 5 - plus bonus lives when certain things happen?

Just trying to give you more work to do ...

P.S. Just remembered I was working on a morphing shader for you a little while back. I got a second version working but I didn't have a suitable test object to hand and then forgot about it till now. It morphed things like teapots into spheres. Unfortunately my test teapot didn't seem to have suitable UV coords so all I got was a single colour (other objects like the "scout" in one of the DBP demos worked fine except that they had an unsuitable geometry). Could you post one of yours so I can give the shader another test?

[Edited out some unnecessary words.]
Scraggle
Moderator
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 6th Jan 2007 19:30 Edited at: 6th Jan 2007 19:32
The lives thing isn't a bad idea but I will hold off putting it in until I get the menus finished. They are top priority now that most of the game is complete.

Level3 has a fur shader on it. Shame that you can't tell the difference between fur and wood. It means I will have to change the appearance to make it more fur-like.

If your willing to work on a morphing shader that would be great! I could certainly find a use for that. If it would be possible to morph any object into a sphere and back again then switching the object whilst it is a sphere would give the illusion of morphing from one object to another. VERY handy!

I have attached a .rar file containing the objects that appear in my game. I hope they are useful to you.

Thank you ... yet again

Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 6th Jan 2007 22:52 Edited at: 7th Jan 2007 00:08
Quote: "If your willing to work on a morphing shader that would be great! I could certainly find a use for that. If it would be possible to morph any object into a sphere and back again then switching the object whilst it is a sphere would give the illusion of morphing from one object to another. VERY handy!"


I'll certainly give it a go. I like the idea of switching objects when they are in the "sphere" form. Not sure yet how that will work. The difficulty that occurs to me is the use of the "time" semantic in the shader. I'm not sure how it is initialised. If it's initialised by DBP when the DBP program starts up then we're in luck. If it's initialised by some other event - such as when the effect is applied to the object then we could have synchronisation problems. Won't know till I try. All will not be lost though if there is a synchronisation problem - there's usually more than one way to skin a cat. What we could do if necessary, for example, is use the DBP timer function and pass it's value to the shader each sync (it's possible that DBP does something equivalent to that anyway). In short, I'm about 97% certain we can get the morphing synchronised.

There is, however, a more fundamental potential difficulty. The method I use in the shader relies on the object having numerous vertices spread out in such a way that when joined to the centre of the object they intersect a sphere without leaving any big gaps on the surface of the sphere. To see what I mean, draw a square and a circle with common centre. Then add lots of vertices along just one edge of the square in addition to the usual ones on the corners (this will represent an "awkward" object). Join all the squares vertices to the centre of the circle and mark where those lines intersect the circle. The morphed object, in its "sphere" form, will have vertices corresponding to the intersections on the circle. If you then join the adjacent vertices you will see that the final shape does not resemble a circle. If these intersections are sufficiently dense around the whole circle you will be OK. The only other issue is locating a suitable "centre" for the sphere.

Anyway, I'll try with your objects and post back the results - but probably not till I get home tomorrow.

Edit: There are times when I wish I would I would keep quiet. Just tried your objects and they reveal two problems: (1) a logical error in my original idea which is not easily overcome; (2) an obscure bug in my shader code which I cannot yet identify. If it was DBP code I could just print out intermediate calculations and see where the problem lay - not so easy with shader code. As you commented before, there are only 5 or so real lines of code in the shader. What can go wrong ...?

So, thanks for the objects, they are forcing me to think again.

The good news is that the Rock object morphs nicely - but the lighting and texturing still need to be tested. How were you going to colour or texture the morphing objects?
Scraggle
Moderator
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 6th Jan 2007 23:46
As always I appreciate your efforts but don't go busting your balls on this. If it can be done easily that would be great but if it is going to cause a lot of hassle, as I suspect it may, then really don't worry about it.

I can't imagine a way to make a teapot have evenly distributed vertices. Perhaps with the other objects but not the teapot.

Scraggle
Moderator
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 7th Jan 2007 17:24
Only just seen your edit.

Quote: "The good news is that the Rock object morphs nicely - but the lighting and texturing still need to be tested. How were you going to colour or texture the morphing objects?"


I expected the rock object to work best ... it started life as a geosphere

As for texturing the morphing objects my plan is to use a sphere map with the object faded to around 200% (the same thing I currently use for my silver objects). It gives a nice silver/chrome effect so if the morphing works OK it would be reminiscent of the Terminator 2 movie.

Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 7th Jan 2007 20:33 Edited at: 7th Jan 2007 21:24
Quote: "As always I appreciate your efforts but don't go busting your balls on this. If it can be done easily that would be great but if it is going to cause a lot of hassle, as I suspect it may, then really don't worry about it."


Too late. I've got to get to the bottom of this one now - I'm hooked.

Anyway, I've got an idea of the cause of the problem, so may have news after I've checked.

Quote: "I can't imagine a way to make a teapot have evenly distributed vertices. Perhaps with the other objects but not the teapot."


No need to do that. The vertices don't need to be evenly spaced - just enough for the gaps not to show. It's very easy (in principle) to split each poly into four new polys and keep doing this till we have enough - I've got some code lying around somewhere which does just that. Anyway, the real problem is the objects where the existing polygons cross each other - and I have an idea where the problem may lie in my shader code (I think it's another version of the scaling problem you were having with Evolved's (?) fur shader). We'll see shortly.

Edit: Making progress. The solution I had in mind did the trick - well almost. For some inexplicable reason the "cross.dbo" object refuses to cooperate and I can't see yet what's so special about it. Do you know whether it differed in some way from the others - made out of limbs or something? Also, could you post your teapot object so I can test that too? Must eat now.
Scraggle
Moderator
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 7th Jan 2007 22:27 Edited at: 7th Jan 2007 22:30
I don't know whether to thank you for persevering or to apologise for hogging your time ... so, I'll do both

I thought, I had sent all of my objects to you but then I remembered that I abandoned using the teapot model in favour of making one 'on-the-fly' to save total megabytage.
I used Cloggy's d3d plugin to make the teapot. You can easily make your own with the command D3D_MAKE_TEAPOT but if you don't want to install a plugin I will make one and save it as a .dbo, it should be attached to this post.

I don't know why you are having problems with the cross model. I made all the models in 3ds Max 8. The cross is 3 intersecting capsules. Two of which are clones of the original. I saved it as a .x file using Panda exporter and then converted it to .dbo in DBP.

The star was made in much the same way. A sphere with a cone attached. Then cloned, rotated and repositioned five times. The torus and the toroid are primatives and the rock is an asteroid from DarkMATTER 1. Although when I loaded into 3ds Max it informed me that it started life as a geosphere.

Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 7th Jan 2007 23:05 Edited at: 8th Jan 2007 00:36
Your teapot worked fine first time.

The only thing I can think of is that the "cross.dbo" object might contain some offset information in its construction. Is that likely?

Quote: "I don't know whether to thank you for persevering or to apologise for hogging your time ... so, I'll do both"


No need to do either - I love a challenge, and I usually learn something in the process.

All the objects except the cross have their vertices correctly morphed towards the surface of a sphere. The cross object also seems to morph towards a sphere - but not in the manner I would expect.

I'll put the "cross" issue to one side for the moment and see if I can synchronize the morphing from one object to another for the other cases. When I'm done I'll post it to you so you can test it in your game.

The other main problem case is the torus - the vertices do indeed morph to the surface of a sphere, but inevitably, only to a band around the "equator". Ends up looking like a wedding ring. Appropriate perhaps?

Edit: Ok, here's my latest attempt. I had to resort to the DBP timer rather than the HLSL built-in time semantic to get the synchronisation right (not quite convinced that was necessary - will look at that again). I achieved the synchronisation by show/hiding two objects using the same shader and doing the switch when they were both at the sphere part of the cycle (you will see "pi" and "pi/2" creeping into the DBP code). The demo starts with textured objects and you can see the texture UV data isn't synchronised yet - but can be fixed if necessary. If you press "c" the shader switches to pure red objects where the UV mismatch doesn't matter. You can just make out the switch between two objects in the demo - but I hope it won't show in your game. Pressing "t" reverts to the textured form.

My remaining doubt (other than the "cross" problem) is whether the shader interferes with sphere-mapping. That should be fixable as well by incorporating sphere-mapping or something similar into the shader. Anyway, let me know what you think.
Scraggle
Moderator
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 8th Jan 2007 09:21 Edited at: 8th Jan 2007 09:59
Quote: "you will see "pi" and "pi/2" creeping into the DBP code"


Actually you didn't include any code ... just the media.
I tried using code from the first morph shader with the second fx file but it did nothing.

As for the 'cross' issue, I had a look at the object and it seems to have two hidden limbs. I don't know how I managed to do that but I will make another and see if that helps.

[Edit] I made another cross object and the same thing happened. I did notice that the pivotal point of each capsule was around the end and not in the centre, so now I suspect that is the problem not the hidden limbs. I have to leave for work now, if I get chance I will make another whilst there. If not it will be tonight.

Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 8th Jan 2007 14:39
Quote: "Actually you didn't include any code ... just the media."


Actually, I'm sure I did.

I've just tested the download and I attach the zip file list here - the DBP files are there.

Quote: "I did notice that the pivotal point of each capsule was around the end and not in the centre, so now I suspect that is the problem not the hidden limbs."


That's interesting - and consistent with the way the object morphs (each "capsule" morphs from one end). It ought to be possible to deal with that in the shader - except I don't know how yet. It will certainly be interesting to see if the problem disappears when the pivotal points are changed.

Either way, your object shows that the shader needs amending to make it work on all objects.
Scraggle
Moderator
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 8th Jan 2007 20:33
You are right. I don't know how I managed to overlook the code.

I had a go at making the 3 capsuled cross object again. This time I centered the pivot points of each capsule before exporting the .X object. It still morphed from the edges! I loaded it into my DBP model viewer and found that it had two limbs for each capsule, one with the pivot at the centre and another with the pivot at the edge ... VERY bizzarre! I tried removing the offending limbs from within DBP but removing one removes both and I don't know how to remedy it at the 3DS Max end either. So, I'm a bit stumped there.

As for the morphing shader, it works a lot better now but (and it pains me to say this because I know you have put a lot of work in) I don't think it looks much like a 3D morph. It looks more like there is a sphere at the centre that grows and engulfs the objects. I know that isn't what is happening but it is the illusion it gives ... sorry

Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 8th Jan 2007 22:41
Quote: "I don't think it looks much like a 3D morph. It looks more like there is a sphere at the centre that grows and engulfs the objects."


Yes, I see what you mean. It might be more effective if I used a sphere with a somewhat smaller radius. Don't worry about the time I've spent on it. If I come up with a better method I'll let you know.

I think I'd better have a go at some other people's queries for a while - they're beginning to fret a bit over on the "Learning to write shaders" thread

Quote: "I loaded it into my DBP model viewer and found that it had two limbs for each capsule, one with the pivot at the centre and another with the pivot at the edge ... VERY bizzarre! I tried removing the offending limbs from within DBP but removing one removes both and I don't know how to remedy it at the 3DS Max end either. So, I'm a bit stumped there."


Me likewise. Looks like one of those issues that'll have to sit on the shelf till we have a bright idea.
Scraggle
Moderator
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 12th Jan 2007 21:10 Edited at: 12th Jan 2007 21:14
Hi,

I have been working on getting the menus working for the last few days. Nothing has changed with the game itself but I was hoping for a little more feed-back.

Green Gandalf & Peter H have given me info that has caused me to change a few things and a work associate tried it and said it was *$%^ing hard! So, I think I will make an easy option. He also suggested another method of playing the game, which I will try to impliment (time permitting).

So, has anyone else tried it yet?
What do you think?
Too hard? Too easy? About right?
Or any other issues or suggestions.

Maybe you tried it and thought it was pants! Hey, everyone has an opinion, just let me know. I will be happy to receive the feedback

Thanks

Peter H
21
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 12th Jan 2007 21:59
i thought it was great, even if the last level barely eluded my skill...

One man, one lawnmower, plenty of angry groundhogs.
Scraggle
Moderator
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 13th Jan 2007 13:34
Thanks Peter

It seems I am all out of feedback, so it looks like the game is staying as it is. With, of course, a few cosmetic changes as is always the case with me. Here is the latest options screen (it's all I have worked on lately).






Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 13th Jan 2007 14:55
Nice screenshot.

And I'm glad I'm not the only one who found it hard ...

but fun to play nevertheless and I'm looking forward to the final version.
Scraggle
Moderator
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 15th Jan 2007 22:01
Just for giggles. Here is a photo of Concentric running on an iMac:





Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 16th Jan 2007 13:15
What! No coffee mug?
Scraggle
Moderator
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 16th Jan 2007 19:56
What you can't see from the picture is ... just off to left there is a fridge with an espresso machine on top of it. Without that I couldn't function at all!



Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 16th Jan 2007 22:51 Edited at: 16th Jan 2007 23:08
My faith in human nature is restored.

Edit: just been looking back in the "Learning to write shaders" thread and found this:

Quote: "I am now trying to get a water shader applied to 3d objects instead of just plains and using an image rather than a camera view. Then I could have a fire and water level in my game. The problem I am having with the water shader is UV mapping. My 3D objects all have different sized UV maps, so I am trying to come up with a way to make them all similar."


Have you sorted that out?
Scraggle
Moderator
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 16th Jan 2007 23:27
Partly.

Luckily saving dbo files saves the UV scale. Although oddly, not the object scale but that isn't a problem in this case.
So I made a small program to adjust the scale of the UV's and then save the object. Now they all have similar sized UV maps.
I tried applying a water shader to them but I just couldn't get it looking correct.
I even tried applying your water shader that was in the Oceeaaaaannn with waves thread but that flattened all the objects

I thought about applying an animated caustic texture and ghosting the objects to see how that looks but I have been concentrating on getting the rest of the game finished first.

If I get time I might tackle vertex manipulation and try to get each vertex to move in/out from the centre following a sine wave and stick my caustic texture on that. It sounds like it might be quite effective.

Of course, if you have some time on your hands, I know how you like a challenge. Maybe the effect i am looking for can be achieved with a shader. I'm not going to ask you because you have already devoted a lot of your time trying to get shaders working for me but, like I said; If you have time and you fancy a challenge, I would certainly appreciate it



Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 17th Jan 2007 01:04
Quote: "I even tried applying your water shader that was in the Oceeaaaaannn with waves thread but that flattened all the objects"


Yes, it would. The shader implicitly assumes the object is a high poly plain in the "Y=0" plane - and just moves the Y values sinusoidally up and down about 0. So your objects probably would look flattened if their Y values are large or comparable to the XZ values.

Are you just trying to make the surface of the objects look like moving water as in some of the other water shaders? My shader actually moves the vertices and is probably not suitable for your objects.

You may be in luck - I've temporarily run short of challenges (except for Irradic who's coming up with one a day ).
Scraggle
Moderator
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 17th Jan 2007 09:31
Well, both effects would be nice.

Getting 3D objects to look like they are made of water is the primary are more important goal and I am sure I can get that working when I can devote enough time to it. Moving the vertices was a secondary goal and is less important.
The moving vertices idea was borne from a different game play idea. I thought if I could take a geosphere and move the vertices sinusodially and also apply a sphere map (the same one I use for my silver objects) to it then it would pass for a blob of liquid mercury. That would then be used as a newly spawned object that was still of an indetermined state.



Login to post a reply

Server time is: 2025-08-08 07:33:50
Your offset time is: 2025-08-08 07:33:50