Sonarpulse Posted January 5, 2012 Report Share Posted January 5, 2012 The new 45 degree camera is quite beautiful, but I always found isometric views more ...strategic. the "isometricity" makes it like a map. So here's my first draft of a basically isometric camera. It's hardly worth sharing, as I just changed the FOV and doubled or multiplied by 10 some numbers at random.; Camera control settingsview.scroll.speed = 240.0view.rotate.x.speed = 1.2view.rotate.x.min = 28.0view.rotate.x.max = 60.0view.rotate.x.default = 35.0view.rotate.y.speed = 2.0view.rotate.y.speed.wheel = 0.45view.rotate.y.default = 0.0view.drag.speed = 5view.zoom.speed = 1024.0view.zoom.speed.wheel = 320.0view.zoom.min = 500.0view.zoom.max = 2000.0view.zoom.default = 1000.0view.pos.smoothness = 0.1view.zoom.smoothness = 0.4view.rotate.x.smoothness = 0.5view.rotate.y.smoothness = 0.3view.near = 2.0 ; Near plane distanceview.far = 4096.0 ; Far plane distanceview.fov = 5.0 ; Field of view (degrees), lower is narrow, higher is wideThe more interesting thing I noticed was with this camera, the game would frequently run into sorting issues issues with close meshes when zoomed out to get a decent amount of map on screen. I'm going to take a wild guess as to the cause: Because to get enough area on the screen with that FOV, the camera has to be very far way / zoomed out. What ever variable stores the sorting data has to account for so large range of "camera z-axis", that it is no longer precise enough to avoid good ol' rounding errors with meshes that close.If that is true, I would propose fixing that problem like this: make a bounding box with a base inscribing the portion of the map visible, and a height corresponding the to the heighest object that could exist in game, or some fixed substitute, figure out the longest line segment spanning the box collinear with a line emanating from the camera, and finally scale the sorting variable to account for that range and nothing more. If my novice prediction is at all right, that should make it so that sorting errors are equally prevalent/hopefully-nonexistent regardless of the camera setup, with the benign side effect that geometry in positions relative to the camera that should never happen are culled.Now that I think of it, I have seen similar errors in other 3D renders. Hopefully this is something that can be fixed, and isn't to prohibitively buried in the bowls of SDL or OpenGL to be fixed on 0 A.D.'s end. Quote Link to comment Share on other sites More sharing options...
ribez Posted January 5, 2012 Report Share Posted January 5, 2012 Hi,this is the changeset that modified the FOV in the last Alpha:http://trac.wildfiregames.com/changeset/10548 Quote Link to comment Share on other sites More sharing options...
quantumstate Posted January 5, 2012 Report Share Posted January 5, 2012 view.near is the key thing to change, I set it to 32.0 with your other settings and things looked ok. I seem to remember philip (Ykkrosh) saying that the depth resolution is on a log scale so changed 2 to 4 actually doubles the resolution. Also I noticed that the carpets at the front of the persian CC show z fighting on every camera setting I tried (including the defaults) so ignore them. Quote Link to comment Share on other sites More sharing options...
Mythos_Ruler Posted January 5, 2012 Report Share Posted January 5, 2012 LOL, this is great. I'll post some screens here in a min. Feels a lot like AOE1 or AOK. But kinda hurts my eyes strangely. Like, my brain expects it to be 3D, but yet it's (nearly) isometric.Maybe we can have an "isometric" option eventually. (Though I for one would never use it; I like the 45 FOV.) Quote Link to comment Share on other sites More sharing options...
Mythos_Ruler Posted January 5, 2012 Report Share Posted January 5, 2012 Here ya go. 1 Quote Link to comment Share on other sites More sharing options...
plumo Posted January 5, 2012 Report Share Posted January 5, 2012 I love it! retro-mode Please make this an option Advantages are: buildings can be much, much more beautiful because the best side is always displayed. I mean, if you turn them around in 3D you can look at the back wall f.e. Quote Link to comment Share on other sites More sharing options...
Almin Posted January 5, 2012 Report Share Posted January 5, 2012 (edited) O f*** you, I love that so hard! This is awesome! No really, it's so great! Fantastic! One of the most intense steps forward in the development of 0 A.D. in the last couple of months! This reminds me on Age of Kings and the Conquerors and the old AoE 1 and so on! This is incredible! I didn't thought that something like this is possible with the pyrogenesis engine!edit: The only bad thing, taht I realize that some of the textures on some of the buildings are now flickering while scrolling. This is better when I set view.near to 32.0 but there's still some flickering. Why do the textures flicker anyway? Edited January 5, 2012 by Almin Quote Link to comment Share on other sites More sharing options...
Arthur_D Posted January 5, 2012 Report Share Posted January 5, 2012 (edited) Z fighting tends to be much harder than Q(bot) figthing. I think every 3D game there is has had trouble with it. It's a common enemy, and a very powerful one at that. Edited January 5, 2012 by Arthur_D Quote Link to comment Share on other sites More sharing options...
Mythos_Ruler Posted January 5, 2012 Report Share Posted January 5, 2012 Guys, you can still rotate the camera, so things still need to be 3D. And we aren't going to make "isometric" versions of everything. Quote Link to comment Share on other sites More sharing options...
Yves Posted January 5, 2012 Report Share Posted January 5, 2012 Guys, you can still rotate the camera, so things still need to be 3D. And we aren't going to make "isometric" versions of everything. We need an ASCII-art rendering mode for the real nostalgic feelings! Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted January 5, 2012 Report Share Posted January 5, 2012 We need an ASCII-art rendering mode for the real nostalgic feelings! Like this? Quote Link to comment Share on other sites More sharing options...
ribez Posted January 5, 2012 Report Share Posted January 5, 2012 Like this?no, like this Quote Link to comment Share on other sites More sharing options...
Yves Posted January 5, 2012 Report Share Posted January 5, 2012 Like this?Still needs some improvements until we can replace the current rendering with that Quote Link to comment Share on other sites More sharing options...
Sonarpulse Posted January 6, 2012 Author Report Share Posted January 6, 2012 (edited) Wow, I did not expect this much of a positive response. view.near is the key thing to change, I set it to 32.0 with your other settingsand things looked ok. I seem to remember philip (Ykkrosh) saying that the depthresolution is on a log scale so changed 2 to 4 actually doubles the resolution.Also I noticed that the carpets at the front of the persian CC show z fightingon every camera setting I tried (including the defaults) so ignore them.A ha, the culling feature was under my nose all along. How is it logarithmic,though? if 2→4 doubles it, isn't that linear? Thanks for the tip on the Persian carpets too, It was the first instance I noticed.Hi,this is the changeset that modified the FOV in the last Alpha:http://trac.wildfire...changeset/10548Thanks. I just copied in the old rotation settings to begin fixing that.But kinda hurts my eyes strangely. Like, my brain expects it to be 3D, but yetit's (nearly) isometric.I know what you mean. Maybe I just liked zoomed out RTSs (aoe2wide, look it up), but I found that being zoomed out (or maybe even the act of zooming out) help a lot. Edited January 6, 2012 by Sonarpulse Quote Link to comment Share on other sites More sharing options...
quantumstate Posted January 6, 2012 Report Share Posted January 6, 2012 A ha, the culling feature was under my nose all along. How is it logarithmic,though? if 2→4 doubles it, isn't that linear? Thanks for the tip on the Persian carpets too, It was the first instance I noticed.It is a range from 2-4096 so if it was split linearly into say 4000 pieces then the resolution is 1 everywhere, changing the 2 to 4 effectively makes no difference, even setting it to 1024 only makes it about 0.75 units. In the OpenGL docs I found it said that the z buffer value is the reciprocal of z (so saying it was logarithmic was wrong). With this example, the far plane is at 4096 and 1/4096 is small so lets call it 0 for convenience. So for near=2 we have a range of 0 to 0.5, for near = 4 we have 0 to 0.25 so the resolution is doubled, for near=8 we have 0 to 0.125 doubling the resolution again. Quote Link to comment Share on other sites More sharing options...
Wijitmaker Posted January 6, 2012 Report Share Posted January 6, 2012 Now that is cool Quote Link to comment Share on other sites More sharing options...
iap Posted January 8, 2012 Report Share Posted January 8, 2012 Making an Iso option, with restrictions on camera and buildings rotation (45 degree) would change the look and feel completely. There are some open source games that has the option to change the game's look and feel just by modifing parameters in the render engine (Smokin Guns, for example, has the option to make it look like a comics style).I love both FOVs the same, and it would be cool to switch Quote Link to comment Share on other sites More sharing options...
Sonarpulse Posted January 9, 2012 Author Report Share Posted January 9, 2012 @iap: I think you get this, but just to reiterate, this doesn't bind the camera angle or anything like that. Ideally, I would like to see 0ad support defining multiple cameras in local.cfg (and maybe share the logic for multiple hotkey sub-profiles). Then for uber-competitive multiplayer, one camera can be agreed upon, and for everything else, they can be switched between easily.@quantumstate. Thanks so much, I think I get it now. Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted April 30, 2014 Report Share Posted April 30, 2014 I want this for our mods as template config. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.