Page 5 of 104

Posted: Wed Aug 27, 2008 10:52 am
by Virion
yeah you can replace the models when the coding part is done.

Posted: Wed Aug 27, 2008 9:47 pm
by dlangdev
I switched to using Blindside's refraction demo code. Scaled the model to 60 and somehow got the impression of a smoother light effect with the scaled model.

Image

Posted: Wed Aug 27, 2008 10:11 pm
by Virion
looks even better now, except the gates/fence...

Posted: Wed Aug 27, 2008 10:59 pm
by dlangdev
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.

Image

OK, now it's fixed. Thanks Blindside!

Image

Posted: Wed Aug 27, 2008 11:29 pm
by Virion
second screenshot: why is it the ground refraction gone?

Posted: Wed Aug 27, 2008 11:34 pm
by dlangdev
Virion wrote:second screenshot: why is it the ground refraction gone?
RTT needs to get a screenshot of the place without the glass and wall. Unfortunately the walls were welded to the floors, so the floors had to go as well. Next time, I should be able to correctly model the building to fix that.

Image

Posted: Thu Aug 28, 2008 8:02 am
by JP
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'

Posted: Thu Aug 28, 2008 9:57 am
by BlindSide
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.

Posted: Thu Aug 28, 2008 7:48 pm
by dlangdev
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!

Posted: Thu Aug 28, 2008 7:59 pm
by dlangdev
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.

Posted: Fri Aug 29, 2008 4:15 pm
by Eigen
Here's another update: BOTS!

(click on thumbnails)
Image
Up the stairs we go!

Image
My team

Image
Ouch .. (these are not santa hats they are wearing :D)

Image
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 .. 8)

Once that's done, I can start working on putting the AI in vehicles to attack bases and enjoy my retirement.

Posted: Fri Aug 29, 2008 10:23 pm
by dlangdev
Those are nice shots, Eigen. Very Nice.

Here is one screenshot taken from the test program currently being set up.

Image

Image

Image

Posted: Sat Aug 30, 2008 2:59 pm
by Halifax
Wow dlangdev, your art is pretty inspiring. It almost makes me want to create some models.

Posted: Sat Aug 30, 2008 6:02 pm
by dlangdev
Halifax, dude, have u seen the models? You can easily tell how cheaply they were rigged.

Of course, you can rig better than this one.

Posted: Sat Aug 30, 2008 6:05 pm
by twilight17
he made rectangles and put images on them.