Post Your Irrlicht Screenshots / Render Here.
yeah you can replace the models when the coding part is done.
My company: http://www.kloena.com
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
looks even better now, except the gates/fence...
My company: http://www.kloena.com
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
The gates will have to go. I'm going to use Blindside's refraction code to create a simple glass window. Perhaps add a stained glass effect in there if it is possible. The glass will replace the gate.
One thing I noticed was the bleed in the glass, tho. Blindside might have to look into that and see what's causing it.
OK, now it's fixed. Thanks Blindside!
One thing I noticed was the bleed in the glass, tho. Blindside might have to look into that and see what's causing it.
OK, now it's fixed. Thanks Blindside!
Last edited by dlangdev on Wed Aug 27, 2008 11:31 pm, edited 1 time in total.
second screenshot: why is it the ground refraction gone?
My company: http://www.kloena.com
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
Did you solve the 'bleeding' by just not rendering the walls&floor node when rendering to the refraction map? Not the best solution, though it may work in your context if you never see any of the rest of the walls&floor through any window (i.e. they're all on the outside and the walls form a cube shape and not something like an L shape for example). I don't know if blindside uses clip planes in his code but that should solve the 'bleeding'
dlangdev, you have to use a user clipplane to cutoff polygons that are not supposed to be rendered in the first pass. Check out IVideoDriver::setClipPlane(). Just pass it an index for reference (It can be any number between 1 to 6, as hardware allows up to six of them.), a plane3df and a boolean indicating whether it should be enabled or not. Use it like this:
- beginScene
- setClipPlane(0, plane3df(glasspos, glassdirection), true)
- render to rtt
- setClipPlane(0, plane3df(glasspos, glassdirection), false)
- draw scene as per usual
- endScene
Pay special attention to "glassdirection", this is the normal of your plane, it should correspond to the normal of your glass sheet. Make sure not to get this inverted or you will clip the wrong half of the world!
Unfortunately, fixed function user clipplanes will not work with shaders, this includes the materials EMT_NORMAL_MAP and EMT_PARALLAX_MAP. Here you have 2 options, you can use only fixed function materials for things you need to clip, or use your own pixel shader to alpha-reject pixels manually. EMT_TRANSPARENT_ALPHA_CHANNEL_REF is a good base material for this, as it merely rejects pixels based on an alpha criteria in a boolean fashion and thus does not require (expensive) alpha blending. Now if only the parallax was in hlsl/glsl and not asm, people would have added things like this and lightmapping etc long ago.
I was going to recommend this shader from the NVidia shader library for you to modify but I just remembered this is in OpenGL and that is an HLSL shader. I suppose I can provide you something in while if you don't mind holding out for sometime. Maybe I will just release a vanilla parallax mapping + lightmapping shader in the code snippets forum and it can include a clipplane function. Anyway good luck everyone and nice screenshots.
- beginScene
- setClipPlane(0, plane3df(glasspos, glassdirection), true)
- render to rtt
- setClipPlane(0, plane3df(glasspos, glassdirection), false)
- draw scene as per usual
- endScene
Pay special attention to "glassdirection", this is the normal of your plane, it should correspond to the normal of your glass sheet. Make sure not to get this inverted or you will clip the wrong half of the world!
Unfortunately, fixed function user clipplanes will not work with shaders, this includes the materials EMT_NORMAL_MAP and EMT_PARALLAX_MAP. Here you have 2 options, you can use only fixed function materials for things you need to clip, or use your own pixel shader to alpha-reject pixels manually. EMT_TRANSPARENT_ALPHA_CHANNEL_REF is a good base material for this, as it merely rejects pixels based on an alpha criteria in a boolean fashion and thus does not require (expensive) alpha blending. Now if only the parallax was in hlsl/glsl and not asm, people would have added things like this and lightmapping etc long ago.
I was going to recommend this shader from the NVidia shader library for you to modify but I just remembered this is in OpenGL and that is an HLSL shader. I suppose I can provide you something in while if you don't mind holding out for sometime. Maybe I will just release a vanilla parallax mapping + lightmapping shader in the code snippets forum and it can include a clipplane function. Anyway good luck everyone and nice screenshots.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
I'm planning on taking the test program away from fixed-function to shader programming later, that's why I jumped to the refraction demo code as a starting point for shader programming.
The walls will be rendered by a shader of a different material type, right now it is set to EMT_PARALLAX_MAP_SOLID, but that will change once the diffuse+dot3+lightmap (or color+normal+lightmap) shader becomes available. EMT_PARALLAX_MAP_SOLID is going to the dumpster soon.
I really appreciate the help as I'm no shader expert, I'm paid to do something else, tho. I just do this for fun, sort of like a form of escapism. So yeah, don't pressure yourself into doing it unless it is fun. Take it easy, bro. I'll just do what I can here to keep me occupied.
By the way, I have a feeling the color+normal+lightmap is probably close to Valve's Radiosity Lightmaps. I don't know, but it sounds like close to it. It may be implemented as color+normal+lightmap1+lightmap2+lightmap3, just guessing here.
Again, bro. Good times ahead. There's something cool and awesome that's about to come soon. Once I figure out the RenderMonkey interface to Irrlicht, think about the goodness in there going over to Irrlicht. Pure awesomeness!
The walls will be rendered by a shader of a different material type, right now it is set to EMT_PARALLAX_MAP_SOLID, but that will change once the diffuse+dot3+lightmap (or color+normal+lightmap) shader becomes available. EMT_PARALLAX_MAP_SOLID is going to the dumpster soon.
I really appreciate the help as I'm no shader expert, I'm paid to do something else, tho. I just do this for fun, sort of like a form of escapism. So yeah, don't pressure yourself into doing it unless it is fun. Take it easy, bro. I'll just do what I can here to keep me occupied.
By the way, I have a feeling the color+normal+lightmap is probably close to Valve's Radiosity Lightmaps. I don't know, but it sounds like close to it. It may be implemented as color+normal+lightmap1+lightmap2+lightmap3, just guessing here.
Again, bro. Good times ahead. There's something cool and awesome that's about to come soon. Once I figure out the RenderMonkey interface to Irrlicht, think about the goodness in there going over to Irrlicht. Pure awesomeness!
Last edited by dlangdev on Thu Aug 28, 2008 8:01 pm, edited 1 time in total.
About the clipplanes.
Hmmm, I'll have to figure out how that can be used to slice the model. It's just that the glass window was placed inside the building, so the terrace needs to be seen from the glass.
Also, the test program was setup to use shaders and fixed-function in one mesh. That's actually a cool thing by itself, though.
Anyway, I'll set up another test program for demonstrating how clipplanes work later.
Thanks.
Hmmm, I'll have to figure out how that can be used to slice the model. It's just that the glass window was placed inside the building, so the terrace needs to be seen from the glass.
Also, the test program was setup to use shaders and fixed-function in one mesh. That's actually a cool thing by itself, though.
Anyway, I'll set up another test program for demonstrating how clipplanes work later.
Thanks.
Here's another update: BOTS!
(click on thumbnails)
Up the stairs we go!
My team
Ouch .. (these are not santa hats they are wearing )
I'm dead in a nanosecond. Also, don't look at the scoretable .. it was .. I .. was taking pictures!
These bots don't do much yet, but they do fire, run around using pathfinder, and fire some more. They also call for backup. Next thing on the list, which I have almost implemented, is capturing certain points on the map. In the map file you define its locations and also points around it, which can be used for attacking. (edit: it is working now)
So, ideally it would be that you set up a couple of capture points and the team who manages to have more points captured at the end of the game, wins. Or capture the flag mode could also be possible. Oh how I wish I was there already ..
Once that's done, I can start working on putting the AI in vehicles to attack bases and enjoy my retirement.
(click on thumbnails)
Up the stairs we go!
My team
Ouch .. (these are not santa hats they are wearing )
I'm dead in a nanosecond. Also, don't look at the scoretable .. it was .. I .. was taking pictures!
These bots don't do much yet, but they do fire, run around using pathfinder, and fire some more. They also call for backup. Next thing on the list, which I have almost implemented, is capturing certain points on the map. In the map file you define its locations and also points around it, which can be used for attacking. (edit: it is working now)
So, ideally it would be that you set up a couple of capture points and the team who manages to have more points captured at the end of the game, wins. Or capture the flag mode could also be possible. Oh how I wish I was there already ..
Once that's done, I can start working on putting the AI in vehicles to attack bases and enjoy my retirement.
-
- Posts: 362
- Joined: Sun Dec 16, 2007 9:25 pm
he made rectangles and put images on them.
Post this userbar I made on other websites to show your support for Irrlicht!
http://img147.imageshack.us/img147/1261 ... wernq4.png
http://img147.imageshack.us/img147/1261 ... wernq4.png