What a couple of *minor* patches can do :)

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
mandrav
Posts: 117
Joined: Sat Aug 27, 2005 8:29 pm
Contact:

What a couple of *minor* patches can do :)

Post by mandrav »

Seeing that my patches are mostly ignored (apparently because they are not good enough for irrlicht), I decided to "force" you not ignore them ;).
Here's what I 've got for now, just by using a couple of minor, non-intrusive, patches:

Image

Image

It's missing lighting, fresnel term and underwater effects but seems like I 'm on the right track :).

Yiannis.
Valtras
Posts: 33
Joined: Tue Aug 08, 2006 8:47 pm
Location: Wy pier da laj

Post by Valtras »

Whoa! That's awesome! Niko should add this to irrlicht.
hey_i_am_real
Posts: 44
Joined: Thu Sep 28, 2006 2:27 pm
Location: Europe

Post by hey_i_am_real »

Sure it's cool :D

Maybe you could add your patch here :
http://sourceforge.net/tracker/?atid=54 ... unc=browse

This way it will never be lost :)
Klasker
Posts: 230
Joined: Thu May 20, 2004 8:53 am
Contact:

Post by Klasker »

Huh? What patches? If your patches are ignored maybe it's because people like me have no idea where to find them. :?
What do your patches do, and where can we find them?

By the way, nice screenshots man! 8)
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

yes, where do we find this water patch?
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
mandrav
Posts: 117
Joined: Sat Aug 27, 2005 8:29 pm
Contact:

Post by mandrav »

bitplane wrote:yes, where do we find this water patch?
lol, I 'm not talking about the water :lol: . The water is rendered using a specific technique. This technique though requires certain features to be available from the engine. So the "minor patches" mentioned in the thread's title add those missing features.
These patches I haven't yet posted because I just created them. I have to separate them now from the rest of my "improved irrlicht"(1) and post them.

Regards,
Yiannis.

(1): see, when you 're not accepting valid (and generally needed) patches people send you, we end up with a completely patched local irrlicht copy, making it harder for us to upgrade each time. It also makes it hard to extract specific patches from this patched irrlicht...
I think I 'll start a new topic on this because my questions were not answered in the other thread that I posted them.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

oh, the frame buffer objects.. Okay I just tried this patch, but the rtt example shows it only renders to the area that would be inside the screen, even after the patch. I didn't investigate any further yet, I'm guessing its something to do with cameras using the screen size rather than the render target size. any pointers?
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
mandrav
Posts: 117
Joined: Sat Aug 27, 2005 8:29 pm
Contact:

Post by mandrav »

bitplane wrote:oh, the frame buffer objects.. Okay I just tried this patch, but the rtt example shows it only renders to the area that would be inside the screen, even after the patch. I didn't investigate any further yet, I'm guessing its something to do with cameras using the screen size rather than the render target size. any pointers?
No, working fine here and is used in the water scene above :).
I will check the rtt example though and report back. Thanks for looking into it.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

okay, so getCurrentRenderTargetSize needs adding to CNullDriver and IVideoDriver, returning the screen size by default. Cameras need to check the current render target size instead of the screen size to get the correct aspect ratio, and something needs adding to set the new viewport size when changing render targets..
and it still doesn't work!
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
mandrav
Posts: 117
Joined: Sat Aug 27, 2005 8:29 pm
Contact:

Post by mandrav »

bitplane wrote:okay, so getCurrentRenderTargetSize needs adding to CNullDriver and IVideoDriver, returning the screen size by default. Cameras need to check the current render target size instead of the screen size to get the correct aspect ratio, and something needs adding to set the new viewport size when changing render targets..
and it still doesn't work!
What graphics card do you try this on? And are your drivers recent enough (e.g. this year's)?
I 'm asking because the FBO path is followed only if supported by your card and drivers and it is proven to be working fine. In the water screenshots above, the screen is 640x480 and the FBOs are 1024x1024...
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

hmm good point, my drivers are pretty old.. I'm using a GeForce 5900XT.
I'll update them and try it again.. will post back in 10 mins or so
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

hmm yes, works fine now. I'll add the camera+driver changes back in and commit sometime tonight
edit: okay thats committed. had to fix a memory leak in the patch first
Last edited by bitplane on Sun Oct 22, 2006 7:48 pm, edited 1 time in total.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
mandrav
Posts: 117
Joined: Sat Aug 27, 2005 8:29 pm
Contact:

Post by mandrav »

bitplane wrote:hmm yes, works fine now. I'll add the camera+driver changes back in and commit sometime tonight
Ah, great :)
mandrav
Posts: 117
Joined: Sat Aug 27, 2005 8:29 pm
Contact:

Post by mandrav »

For those interested on what I had to do to make irrlicht do this :).

I have now submitted the patches I had to create to make this work in the patch tracker.
Located here.
Klasker
Posts: 230
Joined: Thu May 20, 2004 8:53 am
Contact:

Post by Klasker »

Wow thanks man! This patch really helped me out :D
Post Reply