Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ Programming ➜ General ➜ Ray tracing, DirectX, OpenGL, graphics, etc.

Ray tracing, DirectX, OpenGL, graphics, etc.

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1  2 3  

Posted by Shaun Biggs   USA  (644 posts)  Bio
Date Reply #15 on Tue 06 Mar 2007 07:29 PM (UTC)
Message
hrm... didn't think that the difference between our two chips would be that great. Ah well, as I said, more of an excuse for me to upgrade.

Out of curiousity, do you have a more recent link than the acm.org website? Most of the links I tried to follow were down, and the only working ones I could find were from several years ago. The interactive ray tracing project from utah.edu was interesting, but I'd like to see it on a modern processor, rather than an SGI Origin.

The one that caught my eye was at the end of the page:
Quote:
Q: What are shadow buffers?

A: Shadow buffers (or shadow maps) contain Z-buffered data for the
scene as seen by the light, especially useful in RTRT with static
scenes flythroughs.

Implementation details and techniques are found in:

- "The shadow depth map revisited" by Andrew Woo,
in Graphics Gems III (though beware, this method has flaws - see the
next reference)
- Real-Time Rendering by E.Haines & T.Moeller
http://www.realtimerendering.com
- NVIDIA Developer's web site: "Shadow Mapping in OpenGL",

http://www.nvidia.com/marketing/developer/devrel.nsf/TechnicalDemosFrame

The first link has a lot of referances to OpenGL, and the second one is down. There's a lot of information here, and I understand very little of it. I was hoping that these two links could explain a bit more to me.

It is much easier to fight for one's ideals than to live up to them.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #16 on Tue 06 Mar 2007 09:26 PM (UTC)
Message
This is slightly off-topic (as is much of this discussion), but I wanted to let David Haley know that I am having trouble replying to emails from him. I am getting a message that my "from" email address (my address) is being "rejected by the server".

I am not sure which server this is, but suspect that somehow I have ended up on a spam blacklist. Naturally I don't send spam, but with forged mail headers, it is possible that spam looks like it has come from me, and thus my email address has been blacklisted.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #17 on Tue 06 Mar 2007 10:37 PM (UTC)
Message
That's really weird -- every rejected email is supposed to be reported to me, and I haven't seen anything from you at all in that list. I'll go double-check the list and try to figure out what is going on. When's the last time you sent an email? (It would help me have a more focused search.)

In the meantime, you can use the email I have on the forum: that one will probably work. One hopes... :)

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #18 on Tue 06 Mar 2007 11:00 PM (UTC)
Message
I sent it about 30 minutes before the date/time on the forum message, in other words, recently.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #19 on Wed 07 Mar 2007 12:03 AM (UTC)
Message
Oh, ok. That would be why I hadn't seen it. It'll probably show up in tonight's logs.

I'll try looking for the rejected mail. It's probably around here somewhere, I'm just not sure where SpamAssassin puts these things. When I find it I'll be able to tell why it decided to reject it. And then I'll try figuring out how to put you on the server-side whitelist (you're already on mine).

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #20 on Wed 07 Mar 2007 12:07 AM (UTC)
Message
Hey... you're already on the server-side whitelist, with your firstname@lastname.com.au address. It doesn't make sense that it would block your email. I'm confused...

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #21 on Wed 07 Mar 2007 12:43 AM (UTC)
Message
Well here's a strange thing.

This morning I enabled Spam Assassin at my web host provider (FutureQuest), in an attempt to cut down incoming spam, which currently swamps my inbox.

It appears that enabling this, stopped *outgoing* mail from me. This is kind of weird. I have turned it off, and now successfully sent an email to you.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #22 on Wed 07 Mar 2007 05:41 AM (UTC)
Message
That is indeed very strange and most probably not the expected behavior!

I got your email, this time. And in the spam report, no sign at all of your previous email, so I'm guessing it truly didn't make it past your server. How odd...

As for the contents of the email: in brief, very exciting. :-) Lots of things to think about, though. More via email later.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Shadowfyr   USA  (1,790 posts)  Bio
Date Reply #23 on Wed 07 Mar 2007 07:09 PM (UTC)
Message
Quote:
Out of curiousity, do you have a more recent link than the acm.org website?


Nope, sorry. I just did a google to find the page in the first place. Yes, more modern cards do support better hacks for some of this. The absolute latest ones can get **very** close to photorealism, if you a) want water or some other things to "generally" reflect/refract some stuff and b) your drivers work. The problem is, while DirectX rarely fails on any of this, OpenGL support on cards is far more spotty. Just as an example, a *basic* game called Globulation II I tried to run worked fine on the *prior* cards I had, which was 2-3 years older. Then they patched in some different code in a later version and it stopped working right at all. It now does work again with my new card, but... With OpenGL your constantly fighting to not just make sure you are using features that work on the widest set of cards, the most top of the line features are seldom if every correctly supported by OpenGL for the newest card, and even when it does, there is no way of knowing, until it fails, if the **Card** correctly supports that feature using OpenGL. We are basically dealing with cards that have two interface systems, one geared towards OpenGL, which too many of them still don't give a frack about, and DirectX, which MS is constantly pushing for new features for, like the new focal blur, then insisting OpenGL can't support, since its a DirectX 'only' feature.

This means that the only "reliable" OpenGL is either a) what works on your system, or b) what is 1-2 years behind the curve with respect to the latest hardware, so that it should work on "most" systems. This hardly helps someone trying to do things that *only* the latest and best cards can do correctly, if at all, and its another good reason to use a hybred or pure raytrace solution instead, if you want reliable results that everyone can see, never mind the hardware they have.

Oh, and the truly sad thing is, one of the problems stems from the fact that OpenGL is supposed to do at least some of the math itself, if the card doesn't support a feature. The problem is, the card may support it, will tell OpenGL it does, only... Its not actually supported in its OpenGL interfaces correctly, only in the DirectX implimentation. It all becomes quite annoying to even read about, never mind considering the pain coding for it might become when you have to start guessing what will actually work on which hardware and thus what the "minimum" card your program will need is.
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #24 on Wed 07 Mar 2007 09:45 PM (UTC)
Message
I'll make one last comment on this whole graphics thing. You should not call OpenGL techniques "hacks". That is not only offensive to the immense amount of work that goes into the whole system, but more importantly completely ignoring the fact that two entirely different problems are being solved by photorealism ray-tracing and real-time graphics.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Shadowfyr   USA  (1,790 posts)  Bio
Date Reply #25 on Thu 08 Mar 2007 07:34 PM (UTC)

Amended on Thu 08 Mar 2007 07:45 PM (UTC) by Shadowfyr

Message
David, a lot of the stuff done in 3D are "hacks", even with things like global illumination (incorrectly labelled radiosity in POV-Ray). If you prefer, I can call them "Monte Carlo methods". Its still means, "We can't do this in a way that is physically identical to the real world, so we took a short cut. That you think "hack" means something negative says more about your perception of the term than what is in fact being used. In any case, its "less than optimal". This doesn't mean it doesn't work or that its not, in some cases, like G.I., the only currently workable solution.

And I am not ignoring the fact that the two do different things. I want accuracy for size of the data file. I don't mind if some cases even produce photo realism. I could care less about speed (mostly), because thats not meaningful if, for every small scene sent over the internet, I still have to waste time converting into something the "faster" method needs to do anything, while actually losing realism in the process. Faster is only faster if the data is *already* on the machine. If you have to build that data, along with all the secondary data to go with it, like textures (no images allowed, only procedural textures, again to save bandwidth), then you are not gaining anything (unless you consider the processing done to create the data and the disk space needed to store it for if you need it again "gaining").

Its not Second Life I am trying to build here, its something equivalent to still images that MXP can do *but* without the bandwidth issues of a 1MB image or the limitations of that being a pre-rendered image that can't change based on lighting. I mean, if you plan to show an image of a puzzle, you have two choices. Tell them they can't see it clearly, or *show* that they can't and they need more torch light, as just one example. Someone goes to a well at night, they don't see the lettering, as they would in the day (or the reverse, maybe it glows at night). If you want to *show* something, not just describe it..

And as I said, perhaps a hybred system would cover the issues I am trying to solve better than a pure one or the other.

But by all means, lets drop it. We are just going in circles here, when its basically just an argument over preferences and the possible issues both pose.
Top

Posted by Shaun Biggs   USA  (644 posts)  Bio
Date Reply #26 on Thu 08 Mar 2007 08:19 PM (UTC)

Amended on Thu 08 Mar 2007 08:21 PM (UTC) by Shaun Biggs

Message
I think that the confusion for the "hacks" was David thinking that you were referring to OpenGL as a whole as a hackjob, when you meant that specific funtions are an inferrior shortcut any renderer.

And I think I finally get what you're trying to do. Feel free to correct me if I'm wrong. You're trying to create an addon to a client that would allow a user of a mud to view the room as a picture instead of (or in addition to) the description a mud would send out. This sounds like a pretty good idea, as long as rooms can be saved to the disk somehow. On slower computers rendering of the easiest images could take a few minutes, and a lot of people get tired of waiting. A lot of that could be taken care of with a decent amount of shorthand made by whoever is designing the client or script. Common items like a fire or a door could be shortened to an ID tag, with a placement near it. Like 371=2x20y7z0,0 for the id number, placement in a coordinate plane, and the direction it faces. Terrain types and the like could be taken care of in a similar manner, leaving only unique items for a room that would take up much space at all. Then the script just parses it all out into the longer format and chugs through the image rendering.

If the string is encrypted and the client takes care of everything in a proprietary binary file, you shouldn't even have to worry about people looking at the mxp string to "cheat" their way through seeing something they shouldn't. I'm picturing something like this for the room code for a cave with light coming from the entrance behind you (L10) a torch in a sconce on the wall(371) and a table with a sword on it (107 and 8761 respectively):

cave4 L10=-100x0y20z#FFFFFF 371=10x40y27z0,0 107=10x,0y0z,0 8761=10x,0y,20z180,0

It is much easier to fight for one's ideals than to live up to them.
Top

Posted by Shadowfyr   USA  (1,790 posts)  Bio
Date Reply #27 on Sat 10 Mar 2007 02:29 AM (UTC)

Amended on Sat 10 Mar 2007 02:31 AM (UTC) by Shadowfyr

Message
Basically, yes. But I would only save the "objects", so that something might include thing like:

using { "water\"
include "well.mob" as center_well}

sun_position { lat 50.045 time 14:43}

The first would pull in the script for a generic well, which you could then alter using:

object {center_well rotate <30,0,0>}

and other things, maybe even accessing sub-parts, so you could make the top use a tile pattern, instead of wood, etc.

Since the point is to allow certain specific things, like lighting, to be dynamic, you need to be able to re-do the image as needed. Some things, like adding rain or snow, could be done with OpenGL, after the main image exists, since the effect would be overlayed onto the image, not animated. However, some tweaks to the surfaces (specifically their reflection, etc.) might be used to make everything look "wet".

Its not full animation, you can't rotate it to look at it from some other angle, etc. But you *will* notice, if you set it to allow it, that the light angles and shadows change over time as the sun moves, or similar stuff. Mind you, the system could handle some of that using a database to store the objects using an ID, and even replace the objects on the user end with shorthand IDs too. The server end would see, "center_well", but the client would end up seeing, something like this (assuming you used a DB to store the objects, instead of a file in a directory):

#u{#iW045,U001}#sp(#l50.045#t14:43}#o{U001,#r30,0,0}

The only difference with using the directory based system is the first section, which would specify a directory and the file name. The result above is pretty obscure, would be more so compressed and could be made more compact than even that, with something like hexidecimal values for the numerics. And, its still expandable back to the original if needed.

Stuff like how sun position and others work would be entirely client/server dependent, so even if you decoded the script, you wouldn't be able to immediately figure out how it worked. And.. I don't necessarilly care if they did anyway personally. If someone was that worried, they could always use an encrypted system on the database and some added security in a client that supported the feature.

Now, wasn't thinking much in terms of terrain. There are some versions that could be produced using algorythms and a feature called "height fields", but if someone "had" to use them, they could use a bitmap to produce the height field too, it just means you send extra time downloading a file that contains the image the field is made from. This however is a bit of a problem, since it means you can't send it over the connection without extra lag (a good image would need to be at least 640x480 and a fair amount of color depth (monocrome only being practical if you have the same "depth", i.e. bits, but no color, which some uncompressed formats do, but at the expense of the file being like 10-20 times bigger).
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #28 on Sat 10 Mar 2007 05:28 AM (UTC)
Message
Quote:
Some things, like adding rain or snow, could be done with OpenGL, after the main image exists, since the effect would be overlayed onto the image, not animated.
OpenGL is not the most appropriate tool for adding pixels to an already rastered image. It's overkill and not what OpenGL is supposed to do. And besides, any technique will not be aware of the 3d contents of the scene, and so is likely to produce less than optimal results.

Seems to me that if you want rain or snow, you should just do it in your render.

Of course, since you seem really set on (at least quasi-)photo-realistic ray-tracing, you will have the problem of a slower and slower render...

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Shaun Biggs   USA  (644 posts)  Bio
Date Reply #29 on Sat 10 Mar 2007 08:45 AM (UTC)

Amended on Sat 10 Mar 2007 08:50 AM (UTC) by Shaun Biggs

Message
Quote:
Basically, yes. But I would only save the "objects", so that something might include thing like:

using { "water\"
include "well.mob" as center_well}

sun_position { lat 50.045 time 14:43}

The first would pull in the script for a generic well, which you could then alter using:

object {center_well rotate <30,0,0>}.

ummm... that's exactly what I said earlier. Since you didn't notice, in the example I showed, it had sunlight coming through the opening, and the direction each item is facing. The time is also a weird idea for the client to deal with in regards to celestial bodies, since it would be easier for the server to just figure that out in order to deal better with different worlds. Some might have two or three suns or moons travelling at different speeds. Ambiant city light at different times would also be better server side. Those are things that can just be looked up in an array or hash table quite quickly.

Quote:
Since the point is to allow certain specific things, like lighting, to be dynamic, you need to be able to re-do the image as needed. Some things, like adding rain or snow, could be done with OpenGL, after the main image exists, since the effect would be overlayed onto the image, not animated. However, some tweaks to the surfaces (specifically their reflection, etc.) might be used to make everything look "wet".

Its not full animation, you can't rotate it to look at it from some other angle, etc. But you *will* notice, if you set it to allow it, that the light angles and shadows change over time as the sun moves, or similar stuff.

Adding rain or snow into the image after with OpenGL instead of just having the rederer do that would require one of those suboptimal hack jobs you were mentioning earlier.

Also once you start doing things like rotating an item, or moving the light source, you might as well just rerender the whole image, since that will change shadows and reflections on any decently populated room, and on slow computers, it can just re-request an update when it's done rendering (or after a 30 second delay if there is no change). Better updating would also allow for things like a ring of mushrooms appearing at midnight for an hour, or a door that disappears if the light is too bright to be dealt with easier. And with the compressed code, it wouldn't require much bandwidth at all.

And for everything after that point (since I'm not going to copy and paste the rest of the post, you are just repeating everything that I had said, aside from me forgetting to explain the "cave4" bit as being a full room with a height bitmap and a few standard terrain features that is stored by the client. Reusability is a key factor in making a program smaller and more efficient.

Also, beware of obscurement in anything you do... it's a double edged sword. Not only will you be protecting your data from people who want to crack it better, but you will make it much harder to read for when you or someone else has to go fix something.

Aside from tossing this into a script to pass the data over to yet another program, I'm still confused how this would be done in almost any client other than MUSHclient. It would be far simpler to just make your own client and have all of this embedded into it, especially if someone decides to move rooms before an image is fully rendered, and the client will have to figure out what to do with that unfinished process. The main advantage I can see about using a proprietary client instead of a mud client is that it would be easier to deal with adding unique items or doing updates, since it could download new patches at connection, or backgrounded throughout the runtime.

It is much easier to fight for one's ideals than to live up to them.
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


110,309 views.

This is page 2, subject is 3 pages long:  [Previous page]  1  2 3  [Next page]

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.