Search found 52 matches

by jaeg
Mon Jun 10, 2013 9:02 pm
Forum: Beginners Help
Topic: Texture Splatting
Replies: 24
Views: 2757

Re: Texture Splatting

Here's the most recent listing. Please note I haven't had a chance yet to investigate what mongoose7 is talking about yet. OnSetConstants void AdvanceTerrain::OnSetConstants(video::IMaterialRendererServices* services, s32 userData) {         int layer0 = 0;         int layer1 = 1;         int layer2...
by jaeg
Mon Jun 10, 2013 4:26 am
Forum: Beginners Help
Topic: Texture Splatting
Replies: 24
Views: 2757

Re: Texture Splatting

As far as I can tell the lighting doesn't change when I move the camera. I'll test it more tomorrow though to see if it is happening. This is what is being produced so far: http://img694.imageshack.us/img694/2926/screenshothb.jpg The mesh here is completely smooth without shaders. This is the source...
by jaeg
Sun Jun 09, 2013 3:22 pm
Forum: Beginners Help
Topic: Texture Splatting
Replies: 24
Views: 2757

Re: Texture Splatting

I found and followed this tutorial: http://www.ozone3d.net/tutorials/bump_mapping.php I'm getting a lot nicer results now but it doesn't play very well with the LOD of the terrain. Whenever the terrain switches to a lower LOD I end up with black spots on the simplified geometry. http://img407.images...
by jaeg
Sun Jun 09, 2013 3:59 am
Forum: Beginners Help
Topic: Texture Splatting
Replies: 24
Views: 2757

Re: Texture Splatting

Actually it's a phrase from the book Game Coding Complete and again from a Game Physics book. ;) Not intending to make crap code but when you are working on a simulation that just has to appear correct (IE games) it doesn't matter if the method behind the effect is scientifically correct. Especially...
by jaeg
Sat Jun 08, 2013 8:31 pm
Forum: Beginners Help
Topic: Texture Splatting
Replies: 24
Views: 2757

Re: Texture Splatting

I tried using the distance function but I was getting really weird behaviors. I wanted to use it originally to not even look at fragments after a certain distance from the camera position which I passed to the shader from the callback. But it would not color in weird ways such as only coloring areas...
by jaeg
Sat Jun 08, 2013 3:23 pm
Forum: Beginners Help
Topic: Texture Splatting
Replies: 24
Views: 2757

Re: Texture Splatting

http://www.filedropper.com/textureatlas Here's the textures (it's approximately 9mb) Here's the most recent shaders: Vector Shader void main() { gl_TexCoord[0] = gl_MultiTexCoord0; gl_TexCoord[1] = gl_MultiTexCoord1; gl_Position = ftransform(); gl_FogFragCoord = gl_Position.z; } Fragment Shader: un...
by jaeg
Sat Jun 08, 2013 1:16 pm
Forum: Beginners Help
Topic: Texture Splatting
Replies: 24
Views: 2757

Re: Texture Splatting

Yah once I'm back at my home computer I can. Something you can look at though is the way your texture atlas is set up. My texture atlas all are 4x4. Even if you have empty areas you stil have to keep it 4x4 especially for the effectAtlas (colormaps and lightmap). If you don't want 4x4 you'll need to...
by jaeg
Fri Jun 07, 2013 3:06 pm
Forum: Beginners Help
Topic: GUI alternatives...
Replies: 13
Views: 1611

Re: GUI alternatives...

If you are using Windows there is always Visual C++ or the raw Windows API. You can embed an Irrlicht rendering window into these forms.
http://irrlicht.sourceforge.net/docu/example014.html
by jaeg
Thu Jun 06, 2013 3:50 pm
Forum: Beginners Help
Topic: Texture Splatting
Replies: 24
Views: 2757

Re: Texture Splatting

Two color maps and a light map in use! I found a better tool from aligning the images in the atlas. I'm still getting some seams where it's getting portions of the texture beside it however. I have mipmaps turned off (was a lot worse before I did that). Anyway here is some screen shots of what I hav...
by jaeg
Thu Jun 06, 2013 2:21 am
Forum: Beginners Help
Topic: Texture Splatting
Replies: 24
Views: 2757

Re: Texture Splatting

Well I've made progress. The image below is a successful merging of two splatmaps. I'm still fighting with some offset issues and still working on a better way to layer the maps on top of each other. You can see that more than three textures are being used (4 of them) http://img69.imageshack.us/img6...
by jaeg
Wed Jun 05, 2013 7:44 pm
Forum: Beginners Help
Topic: Texture Splatting
Replies: 24
Views: 2757

Re: Texture Splatting

Awesome, thanks for all your help! Hopefully I'll have something interesting to show! I've written up a document on how I want to proceed using what I've learned. For right now I'm going to use a lightmap to make it look lighted but it'll have up to 4 layered splat maps each with 3 textures (One for...
by jaeg
Wed Jun 05, 2013 7:21 pm
Forum: Beginners Help
Topic: Texture Splatting
Replies: 24
Views: 2757

Re: Texture Splatting

So really the texture size doesn't matter I just need to know how many cells it has?

Also just a random question. Irrlicht automatically provides shaders with normals and tangents doesn't it?
by jaeg
Wed Jun 05, 2013 4:33 pm
Forum: Beginners Help
Topic: Texture Splatting
Replies: 24
Views: 2757

Re: Texture Splatting

I didn't know you could pass other textures to a shader like that. I thought you had to use the material's textures. If I was to use a texture atlas in my shader I would find the appropriate piece of my textures by doing something like this: Assuming a 1024 x 1024 atlas in a 2 x 2 grid. (0,0) is my ...
by jaeg
Wed Jun 05, 2013 4:03 pm
Forum: Beginners Help
Topic: Texture Splatting
Replies: 24
Views: 2757

Re: Texture Splatting

That would work well for lighting. But I'll run into the issue of being limited to only 4 textures. So I wouldn't be able to splat a normal map too and apply it. Is there a good way to do that? Also in the original code in the topic I posted in my Original Post he mentions using a meshbuffer trick b...
by jaeg
Wed Jun 05, 2013 2:40 pm
Forum: Beginners Help
Topic: Texture Splatting
Replies: 24
Views: 2757

Re: Texture Splatting

Just a quick question. I'm somewhat new to shaders for Irrlicht. When setting this up the material type for the terrain is set to the splatting shader. How would I apply another shader on top of this for say, per pixel lighting or applying a lightmap? One way I thought of was to have the splatting s...