Board ArchivesSite FeaturesActiveworlds SupportHistoric Archives |
codewarrior // User Search
codewarrior // User SearchInformation on mechanism to determine if content is staleJul 16, 2003, 12:36pm
I would like some more detailed info on how exactly the browser
determines if content is stale for a given object path. The docs imply that the browser 'checks the date', but the only way to do so is by looking at the HTTP headers, and there are a lot of different kinds of HTTP headers that control content caching. I am noticing that any content created via 'create picture' commands is downloaded completely anew every session even though there is no 'update=' attached to it, and the server is reporting the content as fully cacheable. I have a museum with about 60 nice hi-res monet images that are completely static, but every time someone comes into the world they have to fully download about 4 megabytes of images because they are all implemented via a 'create picture'. I know I can workaround this using create texture instead of create picture (assuming I construct a picture object that is to my liking and does not use any textures for any other parts of itself), but it would be nice if 'create picture' just honored the servers caching policies and simply checked to see if the file has actually changed first. Information on mechanism to determine if content is staleJul 16, 2003, 2:07pm
Whether the browser is using mipmapping or not has nothing to
do with my question. Mipmapping is something the browser may or may not do to my content once it has downloaded it, but it certainly has no effect on whether the content has actually changed, or on whether the content should be downloaded again if it has not changed. And there is no reason that the mipmaps should change if the content has not. If I give you an image today, the mipmaps you generate from it are going to be the same as what you generate tomorrow if I give you the same image. If you connect to your ISP through a caching proxy server like most large ISP's *they* will honor the caching headers I am putting on my content, and all the AW browser is doing is downloading the content from your ISP's hard drive. They aren't getting it again from me.... so mipmaps or not.. the browser is wasting bandwidth needlessly. I can prevent this from wasting my servers bandwidth to some extent, but I would like to also prevent the users from having to download content when they don't need to. If I want the users to update the images used with create picture, I will put an explicit update command on only those items. What I would like is some official guidance from AW about how to work with their browser to conserve bandwidth and ensure a better user experience. Maybe (in the spirit of hacks) they could allow update=-1 which would mean 'never'. [View Quote] Information on mechanism to determine if content is staleJul 16, 2003, 3:22pm
That's great news. So all that is needed is for someone to provide
the detailed information I asked for in my original post, and everything will be just peachy. To recap: "What is the specific method the browser uses to determine if content is out of date and needs to be downloaded afresh?" I already know it "checks the date". Which date does it check? Does it check the "Last Modified" date, the "Expires" date or does it look for an ETag? does it use the Cache-Control header max-age value at all? Does it honor any of the other Cache-control headers? Knowing that your world works doesn't answer my question any more than knowing that pictures don't use mipmaps. [View Quote] ReflectionsJul 21, 2003, 10:51am
>More
> likely it's the exact environment that's needed to produce the > reflection duplicated somewhere else on the map that's got a camera in > it, and when characters come near it, they're drawn into the reversed > environment as well (reversed too). Something along those lines. > Certainly the easy to way to do it. There's no need to duplicate the environment when the environment is already there. Generally, a camera is simply placed exactly where the mirror is, a small image rendered from that viewpoint every once in a while, then it's flipped left to right by just mapping the UV coords so the picture comes out reversed. The camera takes one image for each person who sees it, in a direction that is away from the perpendicular in the opposite direction to the users viewpoint, so that it looks like you are seeing things just as a mirror would show them. It's very similar to how a 'facer' works... always pointing towards you, but in this case it is always pointing away from you by as much as you are not facing the mirror directly. ReflectionsJul 21, 2003, 9:45pm
There is a good article at:
http://www.sgi.com/software/opengl/advanced96/node28.html on how to create a mirror effect with a 3D graphics engine. As you can see from this article, a stencil buffer is merely a way to mask out the mirror portion of the main scene so that something else (like a mirror) can be drawn into it without interfering with other parts of the scene. A stencil buffer in no way prevents you from having to render the scene twice as you imply. There is no way to get around having to draw the scene from the viewpoint of each mirror you wish to have in your scene, but since the mirrors could be limited to using a 128x128 texture and they do not have to be updated as often as the main image, there is no reason that it has to create lag. It is also very easy to detect (since a mirrors position and field of view are fixed) when the mirrors image doesn't need to be updated at all. Mirrors reflecting other mirrors handle themselves automatically. after one or two frames, each mirror will naturally display the last frame displayed by the other mirrors. [View Quote] ReflectionsJul 21, 2003, 9:54pm
A more accurate description of what I was trying to say
-- The basic steps to calculate the image from the vantage point of the mirror are: 1.. draw the mirror polygon, setting the stencil buffer to 1. 2.. compute the angle between the viewer and the mirror. 3.. compute the angle of the reflected ray and the viewer 4.. move the viewing position to a point along the reflected ray 5.. draw the scene from the viewpoint along the reflected ray 6.. set the stencil test function to draw where the stencil value is not equal to 1 7.. move the viewpoint back to the eye position and draw the scene again > The camera takes one image for each person who sees it, in a direction > that is away from the perpendicular in the opposite direction to the users > viewpoint, so that it looks like you are seeing things just as a mirror > would > show them. It's very similar to how a 'facer' works... always pointing > towards you, but in this case it is always pointing away from you by > as much as you are not facing the mirror directly. > > ReflectionsJul 21, 2003, 10:21pm
My apologies.
It's a description of a procedure.. not a .exe file And don't type it in and expect it to work either. It's not real source code. [View Quote] ReflectionsJul 21, 2003, 10:28pm
OK.. welll I suppose I should have cited the source.. but you can
go tell them their procedure "might not work"... http://www.sgi.com/software/opengl/advanced96/node28.html They are all n00bs there... go easy on em Bowen.. I shudder when I think of how they will tremble at your wrath. [View Quote] ReflectionsJul 21, 2003, 10:52pm
The main point here is that if you want mirrors you need to render the
scene multiple times. KAH also stated that stencil buffers would magically allow for reflections without drawing the scene a second time, but they won't. There are lots of ways to get around not having a "stencil buffer", but since a stencil buffer (or equivalent) is an attribute of the graphics API you are using and not of your hardware it is up to the driver to simulate it if you have lame hardware that doesn't have the ability to make them work more efficiently. In DirectX you don't need stencil buffers because you can have as many buffers as you wish, any buffer can be combined with any other buffer in ways that make stencil buffers look like Flintstones technology, and in fact you don't even need to use a stencil since you can simply render into one buffer, and then use it as a texture map when you draw the mirror. So the "no card no stencil buffer" thing is a RED HERRING So.. reflections require multiple scene renders with or without a stencil buffer. And.. if you are willing to draw the scene a second time from the viewpoint of the mirror, you can have a nice mirror whether the person has stencil buffers or not. [View Quote] ReflectionsJul 21, 2003, 11:10pm
The nasty thing about reflections is not how to render them, but what they
would do to the current AW 'one viewpoint' model. Right now, the engine has developed over a long time to be efficient about what objects and textures to load based on the assumption that it only needs to know what is near the viewer. Introducing reflections breaks that assumption in a big way, and I suspect that assumption is entrenched pretty deeply in the code. Maybe an easy way to get around that is to limit what a mirror sees to a fixed distance, and then make sure you always have that much 'stuff' from in front of the mirror at all times. Putting many mirrors around your world could lead to a lot of problems though. Most game engines don't need to worry much about that because they load all of the geometry and textures for a given area ahead of time. [View Quote] ReflectionsJul 22, 2003, 12:09am
> I guess, what I was trying to get at, was something that could be done
> regardless of the API you're using. Some graphics cards don't even > support OpenGL.. don't forget about them either.. if they do it's not > too well. The technique of drawing the scene from multiple viewpoints to generate reflections *is* something that can be done regardless of the API you are using, and the stencil buffers, lack of them, presence of them, use of OpenGL vs. Direct X are all RED HERRINGS. And as Anne so eloquently said in another thread, I'm sick of being held back by people with lame hardware. If your card doesn't support OpenGL or DirectX, then AW is not for you. Now I'm finished belabouring the point with you... you can have the last word. Cameras and Displays (and reflections)Jul 21, 2003, 11:29pm
Given that people are asking for reflections, I would like to ask
(I remember reading someone else asking for them) for cameras and displays. A camera could be created on a given object like so: create camera "name" [other parameters] It would nominally point in the direction of one of the axes of the object like a spotlight. A display could be created like so: create display source=cameraname [other parameters] It would probably need to be a picture object, or some new tag. The other parameters could be things like update rate, FOV for a camera, tracking options to automatically pan the camera around etc. I think such a mechanism might actually work to make a pseudo mirror, although it would not be a true mirror as discussed in another thread. If there were an option to make a camera automatically face away from the viewer by as much as the viewer is positioned away from the surface normal of the camera though, it should actualy work perfectly. create camera,display source=me pan=mirror_viewer Something like that would create a mirror. If this pair of commands could simulate mirrors, it could also provide for live in world cameras too. Avatars...Jul 31, 2003, 11:59am
Adobe Atmosphere does avatars this way. They don't need to be on the
users computer though... they can be anywhere on the internet. The main point being the persons avatar is not determined by the world they are in, but by their own personal choice. [View Quote] half question/half wishAug 4, 2003, 11:48am
Is there a 'reserved' cit number that can be used to 'lock' objects using
a bot that we can count on never being used as a real cit number? i.e. "1" is probably a good guess... but it *may* actually be used. I'd like to ask for a 'reserved' cit number for the purposes of marking objects as 'infrastructure' so that it will be easier to use bots to filter things etc. It would be like marking files as owned by 'root' in UNIX. It would be nice if such items could not be deleted by anyone but the world owner, but that anyone (even tourists if you enable them to build) could build in cells that have items owned by 'root'. This would allow you to make public areas that have infrastructure that can't be changed, but that anyone can still build on. I'd settle for just a reserved cit number though... half question/half wishAug 4, 2003, 12:48pm
What do you mean a 'world' cit?
The main reason I want this is for using bots to filter things.. not for the purposes of restricting building. I want a cit number that will *never* be a valid citizen. If I use a cit number of someone who actually might build in a world, then I cannot filter that persons objects using a bot. I do this now using a cit number I don't *think* will ever be used by anyone in my world, but I would like a sure thing. [View Quote] half question/half wishAug 6, 2003, 12:17pm
Some programmer once said... geez.. two digits is plenty to use
for the date. Another programmer once said if I use the number of seconds since Jan. 1 1970 as the time, it will be good forever. In 2038 we will find out how long forever is. And of course AW is just about to reveal their new marketing plan and the number of cits a month registered will shoot up to 10,000 [View Quote] half question/half wishAug 7, 2003, 6:04pm
You're assuming that the little computer in the gas pump will be
replaced with a new one by then and that somone will actually remember that it uses a 32 bit processor, or that it even has a processor in it. Servers are only one little tiny application for computers, and embedded computers.. well.. they are *embedded* in things. They don't get routinely swapped out, and they are not designed to go obsolete in a year either. It's likely that most embedded systems will have been replaced by then, but who knows. [View Quote] half question/half wishAug 7, 2003, 11:00pm
I didn't mention payment of any kind in my post.
> You don't pay gas with cash? That's a bad practice, using a credit of > sorts for gas. :P half question/half wishAug 8, 2003, 12:07am
A UNIX timestamp is a UNIX timestamp wether implemented on an
eight, 16, 32 or 64 bit computer. And it is the same wether you pay by cash or by credit card. You're an expert at missing the point. [View Quote] half question/half wishAug 8, 2003, 4:18am
I'm ignoring your point, not evading it.
You made it up to imply that I said anything about cash to begin with. You have this notion that keeping track of anything having to do with timestamps involves cash somehow and it's totally missing the point. And I don't post in the newsgroups to engage in long winded pointless debates with you. Find someone else to annoy. half question/half wishAug 8, 2003, 6:24pm
*this* is your original *question*.
"You don't pay gas with cash? That's a bad practice, using a credit of sorts for gas. :P" It is *not* a question.. it is an insult... flame bait. It is worth ignoring, even if you try to change it into a question after the fact. You may become a veteran newsgroup poster someday, but you currently lack the subtlety and refinement in your posts needed to disguise the bait properly. Work on your non-sequiturs.. they are way too blatant. self masking signsAug 4, 2003, 1:43pm
It would be nice if there were a way for text signs to mask themselves.
A special bcolor= command could be used to do this. Custome avviAug 10, 2003, 3:44pm
This could all be done now on the OP path server by third parties, but the
caching mechanism of the avatars.dat file and the avatars themselves by the browser really gets in the way of developers doing anything useful with anything like that. [View Quote] Movies and other picture formats?Aug 14, 2003, 10:53am
[View Quote]
Every time I have to manually zip a mask for an image, I curse the lack of
support for a format with an embedded mask. The fact is that it's a pain in the ass to have to create a mask seperately as a .bmp and then zip it with a different name while the .jpg that goes with it is not zipped. Most companies spend a lot of effort trying to make it easier for new users to use the product. An extra meg of code in the executable is well spent if it saves users time. How much is it worth to save one minute of time every time every world owner wants to create a masked image? Forget the extra minutes that will be saved correcting the mistakes made in one of the 5 or 6 things you have to get right to create a masked image now. 2,000 worlds.. 5 times a year apiece.. that's 10,000 minutes a year right there. Personally, I'd eat the extra meg in the browser to have .png support > Unless gifs are animated, they suck compared to JPGs... ... or unless you use the fact that they have a transparent color.. or the fact that a pallette based gif is much, much much smaller than a .jpg when you don't need photo quality images. > .tga is a worthless format only used in some games. Yeah.. it's pretty old in the tooth.. but it does support a mask, and it's dead easy to support that format. It compresses well in .zip files too. One or 2K of normal code, 10 or 20K of windows code to decode a targa file. Avatar Side Strafing?Aug 14, 2003, 8:08am
It's already there. Look in your new control configuration panel and map the
keys to somethiung. [View Quote] Avatar Side Strafing?Aug 14, 2003, 5:52pm
[View Quote]
I notice you're setting those keys up on keys that already have other
functions mapped to them. A really good feature of the new key configuration thingie is that the various Numpad keys don't conflict with the insert/home/Pgup/pgdn keys in that other block of six keys on a 101 key keyboard. The default mapping maps both the numeric keypad keys, and the UN-NUM-Locked equivalent keys to the same functions. But if you have a 101 key keyboard, you can treat that block of six keys (ins/del/home/end/pgup/pgdn) that is not on the numeric keypad as pretty much new keys entirely, continue to use the numeric keypad for things you've always used it for, and use the other six keys for the new stuff (sidestepping, zooming the camera). Not Really a wishAug 17, 2003, 12:04pm
[View Quote]
Not so true.
"trepanning" ... look it up. http://www.braceface.com/medical/Pages/Trepanning.htm cit number in the referer stringAug 17, 2003, 2:24am
Sure would round out the rest of the stuff that's in there now.
It would be lovely... tourist versions of all your precious models, and versions only the real citizens can see. Might even spur more people to sign up. Would surely make model makers and world owners happier. At least people from other universes would have to aqcuire a full on cit to steal things, and you could have a list of allowed citizens on your OP anyway and only allow the specific ones you want to access your path to see your models and stuff. Just a thought. Noone will like the idea of course. It can still be done anyway using other means. It would just be so convenient if the cit number were there. cit number in the referer stringAug 17, 2003, 3:53am
I'm not sure an SDK app would work. The referer string is being supplied by
the browser and it could even just be making the whole referer string up locally. There's no real reason for it to be coming from the server. An SDK app couldn't supply a different referer from what the browser is now doing on behalf of everyone who visits a given world. A moddable server might do the trick, but only if it's the server that is supplying the referer string to the browser, and that is not certain. If the browser did supply the cit, you could do cool things with just your average FTP only world setup, and without complex session management on the server. It could just be an extra option in the new world options setup "Tack cit number on end of referer string". [View Quote] |