tag:blogger.com,1999:blog-7939447642042716806.post5045106081200151781..comments2023-10-19T03:23:20.393-07:00Comments on InFictitious: 2.5D XNA RPG Engine - Some Technical Details9of9http://www.blogger.com/profile/02872251731902941045noreply@blogger.comBlogger41125tag:blogger.com,1999:blog-7939447642042716806.post-53963716442376206432019-06-17T22:05:09.975-07:002019-06-17T22:05:09.975-07:00I wonder if Obsidian Entertainment would be intere...I wonder if Obsidian Entertainment would be interested in this. <br /><br />They use a fusion of 2d and 3d elements in pillars of eternity, in unity. They probably want to make Pillars of Eternity 3 after their current project, they now have funding from Microsoft (they were acquired), and no doubt they want to make PoE 3 as pretty as humanly possible. <br /><br />There might be something here for them. If you are not going to use this, you should try and reach out. Jamiehttps://www.blogger.com/profile/07117438308805852384noreply@blogger.comtag:blogger.com,1999:blog-7939447642042716806.post-72685084751651824592019-03-13T05:23:41.046-07:002019-03-13T05:23:41.046-07:00The lighting and weather effects is the best I'...The lighting and weather effects is the best I've seen along with the asset layering works spot on. The only thing that is missing is shadows.<br />Dude, seriously, I'd be willing to pay a decent amount to use this engine but you do you of course. I wander how hard it is to recreate in unityNatures Realmhttps://www.blogger.com/profile/07392516084023928387noreply@blogger.comtag:blogger.com,1999:blog-7939447642042716806.post-82594129155926350112015-03-21T12:13:40.391-07:002015-03-21T12:13:40.391-07:00Hello,
First I want to express my level of sympath...Hello,<br />First I want to express my level of sympathies to you. As I can see in comments your work inspires a lot of game developers or just simple gamers. Thanks man for your devotion to your work. Secondly I wish to introduce myself since it is related to the topic (:. I consider myself devoted to my work too, for example spent a lot of time on university degrees, learning from internet and doing projects. Thing is that I am an artist designer, who knows about art but nothing about programming languages. I always dreamed about creating my game with my own world but it was always to much to understand how to do it. I can see that I could probably deal with engine which you designed. If you would share the engine with me I could credit you as a co creator. Or maybe you have better ideas for me. Maybe you want to work on something together... Sincerely, KrisKristijonashttps://www.blogger.com/profile/13598289856216018885noreply@blogger.comtag:blogger.com,1999:blog-7939447642042716806.post-77019167946971487752013-07-25T09:17:01.434-07:002013-07-25T09:17:01.434-07:00Can you Share the Engine?Can you Share the Engine?Apoxhttps://www.blogger.com/profile/09935569304453163256noreply@blogger.comtag:blogger.com,1999:blog-7939447642042716806.post-66373243444506688092013-05-24T01:26:38.829-07:002013-05-24T01:26:38.829-07:00how do i apply this shader on 2d sprite?how do i apply this shader on 2d sprite?Narcishttps://www.blogger.com/profile/11576254138831720491noreply@blogger.comtag:blogger.com,1999:blog-7939447642042716806.post-74326864935419096572013-05-24T00:42:17.056-07:002013-05-24T00:42:17.056-07:00Thx!!!!!!
I'm amazed what you can do with xna ...Thx!!!!!!<br />I'm amazed what you can do with xna +c#+hlsl.....!<br />Keep up the good work!Narcishttps://www.blogger.com/profile/11576254138831720491noreply@blogger.comtag:blogger.com,1999:blog-7939447642042716806.post-92120275815221119172012-11-24T08:19:49.658-08:002012-11-24T08:19:49.658-08:00thanks for the normal map materia, was exactly wha...thanks for the normal map materia, was exactly what I needed!:)<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7939447642042716806.post-76185616436284573562012-11-02T18:41:02.907-07:002012-11-02T18:41:02.907-07:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/12786786690090521893noreply@blogger.comtag:blogger.com,1999:blog-7939447642042716806.post-54420120385429393212012-11-02T18:38:18.172-07:002012-11-02T18:38:18.172-07:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/12786786690090521893noreply@blogger.comtag:blogger.com,1999:blog-7939447642042716806.post-5774731328475134202012-10-02T22:11:53.920-07:002012-10-02T22:11:53.920-07:00@WhtsTheDeal I ran into the same issue. Inverting ...@WhtsTheDeal I ran into the same issue. Inverting the depth buffer resulted in exactly what I was looking for. I still prefer the 'x-ray' look of the original depth buffer so I modified the pixel shader to do the inversion for me.<br /><br /> //TODO: change this calculation to provide more unique depth values<br /> Out.depth = ((1.0 - (tex.r + tex.g + tex.b) / 3)) * Scale;<br /><br />This was enough to meet my objectives. As for why this is happening, it could be something to do with XNA using a right-handed coordinate system and DirectX being left-handed by default.Jimhttps://www.blogger.com/profile/09725803481380910800noreply@blogger.comtag:blogger.com,1999:blog-7939447642042716806.post-55478388702582871802012-10-02T03:29:09.833-07:002012-10-02T03:29:09.833-07:00Thanks for your reply to my message, it was helpfu...Thanks for your reply to my message, it was helpful.<br /><br />I'm also having some doubts about the method, and I wonder whether it would be better to go with a 3D engine, although in my case that involve throwing away a lot of code which I always hate. Originally I was making a simple 2D RPG with a similar look and feel to the infinity engine games. Then I started looking for some kind of dynamic lighting solution, this was after seeing this done in the Eschalon series to very atmospheric effect. (of course those games are tile based so they have an easier time with this.)<br /><br />The file size issue is one thing I think might be significant for a serious project, there's another indie RPG called Underrail which released an alpha demo recently that came to 500 MB almost all of which was the animated sprites, and this isn't using a method like this. <br /><br />I had a question about the depth map, wouldn't it be better to use 16 bit greyscale image inside of adding the channels as you do? 16 bits is probably overkill, but I think it would be nice in principle to be able to support large vertical structures like say the D'arnise keep in BG2:<br /><br />http://www.gamebanshee.com/baldursgateii/walkthrough/images/ar1300.jpg<br /><br />Most of the areas on the walls of the keep are actually walkable by the player, which is kind of tricky to do. (I imagine in the IE games it wasn't an issue since you didn't have to worry about dynamic lights in the courtyard area.)<br /><br />Another I'm not sure about is exactly what settings to use when creating the colour textures for your tiles in the renderer. I'm not really an art guy but I suppose there's a fair bit of freedom here. My first thought was just to set self-illumination to 100, in which case the lighting contribution would be entirely derived from in game dynamic lights. I was looking at some sprites from Icewind Dale:<br /><br />http://www.planetbaldursgate.com/iwd/encounters/monsters/animations/index.shtml<br /><br />and I see a lot of self-shadowing. They generally look great, but they might be made more for a static lighting set-up, or maybe there's a good way to combine the two things. <br /><br />Stephenhttps://www.blogger.com/profile/02444019565808877389noreply@blogger.comtag:blogger.com,1999:blog-7939447642042716806.post-59837642326407199592012-09-27T03:24:53.462-07:002012-09-27T03:24:53.462-07:00Forgot to add, that previously before creating a d...Forgot to add, that previously before creating a depthstencilstate as you can see in the code above, I was simply using the default one, which was when I was getting the inversion of depth problem.WhtsTheDealhttps://www.blogger.com/profile/13831591876043930181noreply@blogger.comtag:blogger.com,1999:blog-7939447642042716806.post-44644461176681389612012-09-27T03:11:43.945-07:002012-09-27T03:11:43.945-07:00Ahh, yes that may be it, but upon looking into it ...Ahh, yes that may be it, but upon looking into it further and implementing it, my sprites end up not being rendered at all. Basically this is the drawing of my height in short: <br /><br />http://pastebin.com/KfjcenfW<br /><br />Is there anything that I may be missing from what you see in this short blurb of code overviewing my height drawing that is causing the inversion of depth, or what I am doing wrong with depthbufferfunction that is making my sprites invisible? Thank You!<br /><br /><br /><br />WhtsTheDealhttps://www.blogger.com/profile/13831591876043930181noreply@blogger.comtag:blogger.com,1999:blog-7939447642042716806.post-27538739038909277802012-09-25T20:15:57.513-07:002012-09-25T20:15:57.513-07:00Basically, don't forget you've got a depth...Basically, don't forget you've got a depth buffer. When you're drawing the heightmap pass, you're not testing it against the RGB render target that you're in the middle of drawing to: you already have a depth buffer for that very reason. The shader code I have up above shows precisely how to set it up so it actually outputs a depth value from the sprite and that is what performs the depth test.9of9https://www.blogger.com/profile/02872251731902941045noreply@blogger.comtag:blogger.com,1999:blog-7939447642042716806.post-91904259524382394612012-09-25T20:13:05.656-07:002012-09-25T20:13:05.656-07:00You probably just need to set the DepthBufferFunct...You probably just need to set the DepthBufferFunction to make the correct comparison (draw the pixel if higher value than what's in the buffer, discard if otherwise). Check out http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.depthstencilstate.depthbufferfunction.aspx9of9https://www.blogger.com/profile/02872251731902941045noreply@blogger.comtag:blogger.com,1999:blog-7939447642042716806.post-81074208468675739112012-09-25T20:08:39.493-07:002012-09-25T20:08:39.493-07:00Thanks for posting this. I've implemented your...Thanks for posting this. I've implemented your technique in a small sample application. I have a question about render passes.<br /><br />My first instinct was to completely render the height map first, and then use that for depth testing when I created the normal and diffuse layers.<br /><br />However, since additions to the height map require testing against the existing height map, this led to switching render targets for each sprite that needed to go into the height map. (A texture cannot be both the input and output of a pixel shader in XNA 4.0)<br /><br />Is there a better way to generate the composite height map? My understanding is that switching render targets is fairly expensive.Jimhttps://www.blogger.com/profile/09725803481380910800noreply@blogger.comtag:blogger.com,1999:blog-7939447642042716806.post-45747640820851364002012-09-25T18:16:56.993-07:002012-09-25T18:16:56.993-07:00Post your pixel shaders and SpriteBatch.Begin call...Post your pixel shaders and SpriteBatch.Begin calls.Jimhttps://www.blogger.com/profile/09725803481380910800noreply@blogger.comtag:blogger.com,1999:blog-7939447642042716806.post-49587931358720309232012-09-23T21:40:27.539-07:002012-09-23T21:40:27.539-07:00Hey 9of9, I really like these posts you have on yo...Hey 9of9, I really like these posts you have on your blog.<br /><br />If you could lend a few hints as to your general implementation of your depth testing shader into the xna code, as I am having quite a few issues myself. I can in a sense see some type of depth happening after a lot of trial and error, but I am still far from the desired result and getting some very weird affects. I really appreciate your help.<br /><br />(Update)<br /><br />Seems I posted too early, as my trial and error eventually lead me in the right direction, lol. Only issue now seems to be that my depth is inverted in its calculation, with black being the highest up and white being the lowest. Here is a picture with a normal height map (http://tinypic.com/r/2cwpeep/6) vs with an inverted height map (http://tinypic.com/r/2pzxhyw/6). Any idea what may be causing this? WhtsTheDealhttps://www.blogger.com/profile/13831591876043930181noreply@blogger.comtag:blogger.com,1999:blog-7939447642042716806.post-58643506116482337622012-09-22T13:42:12.760-07:002012-09-22T13:42:12.760-07:00This comment has been removed by the author.WhtsTheDealhttps://www.blogger.com/profile/13831591876043930181noreply@blogger.comtag:blogger.com,1999:blog-7939447642042716806.post-53994119283182495942012-09-18T23:34:25.425-07:002012-09-18T23:34:25.425-07:00Darn, well I appreciate you trying! I'll defin...Darn, well I appreciate you trying! I'll definitely use the tips you gave me when it comes time to creating more assets for myself. Thanks for all the help on the matter!Anonymoushttps://www.blogger.com/profile/12786786690090521893noreply@blogger.comtag:blogger.com,1999:blog-7939447642042716806.post-82188511192079592182012-09-16T08:19:22.649-07:002012-09-16T08:19:22.649-07:00I'm afraid I can't open your .max scene, i...I'm afraid I can't open your .max scene, it just throws me some random error. From your screenshot, your normal map looks just fine though. You just need to turn up self-illumination and you'll be good. As for shadows, like I say, try placing a camera-invisible plane under the teapot.9of9https://www.blogger.com/profile/02872251731902941045noreply@blogger.comtag:blogger.com,1999:blog-7939447642042716806.post-32745426281249688622012-09-16T08:17:31.978-07:002012-09-16T08:17:31.978-07:00That's fine, I can read the Russian =) And yea...That's fine, I can read the Russian =) And yeah, in PS 2_0 it's the kind of thing I meant. In newer versions I think you could get away with a variable-sized array, but perhaps not in PS 3_09of9https://www.blogger.com/profile/02872251731902941045noreply@blogger.comtag:blogger.com,1999:blog-7939447642042716806.post-29314874359715247332012-09-14T18:26:52.062-07:002012-09-14T18:26:52.062-07:00I've been messing with the settings a bit but ...I've been messing with the settings a bit but still cannot seem to get my normal map colors and ao shadows as dark as yours. Have you been able to check out my scene to see what I may be missing?, I know you are probably busy >< but this is driving me nuts, lol. ty!Anonymoushttps://www.blogger.com/profile/12786786690090521893noreply@blogger.comtag:blogger.com,1999:blog-7939447642042716806.post-81499997770809239492012-09-14T12:22:12.291-07:002012-09-14T12:22:12.291-07:00Thank you for advice, I'll test different tec...Thank you for advice, I'll test different techniques.<br /><br />This is a link where is an example how to calculate multiple lights in the pixel shader 2_0 , in this article author suggest create more of 3 lights with help of several passes of the shader.<br /><br />Here is a link: http://habrahabr.ru/post/134819/<br />( sorry, this article in russian but you can see the code ) Evgeniyhttps://www.blogger.com/profile/01615229634836146668noreply@blogger.comtag:blogger.com,1999:blog-7939447642042716806.post-84725528495444477312012-09-13T08:37:52.315-07:002012-09-13T08:37:52.315-07:00Yeah, definitely go with the array. You'd be l...Yeah, definitely go with the array. You'd be limited to a 'maximum' number of lights and possibly if you're using older versions of Pixel Shader it might be more efficient to have a few different variations on the lighting shader (one for one light, one for two lights etc.) but that's not something I can give any definite advice on. It's definitely much cheaper to do everything in one shader pass if you can though.9of9https://www.blogger.com/profile/02872251731902941045noreply@blogger.com