Help with converting Blitz3D to MiniB3d...

BlitzMax Forums/MiniB3D Module/Help with converting Blitz3D to MiniB3d...

JA2(Posted 2010) [#1]
Hi,
I'm trying to convert some Blitz3D code to MiniB3d. It's for toon shading without using shaders etc I've had a go at doing this myself but something's not working correctly. I'm using a slightly modified MiniB3D to use 2d drawing. Any help greatly appreciated :)

BB



BMX




jkrankie(Posted 2010) [#2]
http://www.blitzbasic.com/Community/posts.php?topic=79166#889143

Cheers
Charlie


JA2(Posted 2010) [#3]
Hi, that is actually my old post. Nobody posted an updated BlitzMax version of it tho so I'm finally getting around to trying it myself.


JA2(Posted 2010) [#4]
I've made a little progress:



Using texture flags 16+32 makes a strange looking texture. The texture looks correct with the flags are removed but messes up when the mesh it's applied to is rotated (because of the clamping?)

Also, copying the backbuffer to the CelTexture doesn't work correctly in the CelShader() function. Pressing 'space' in the above code renders the sphere in the top left of the screen to the CelTexture.

Any ideas?

[edit]Okay, I got this to work in the CelShader() function by simply calling RenderWorld twice :)[/edit]


JA2(Posted 2010) [#5]
Sorry to keep bumping my own thread but I think that the problem is with using texture flag 32 (Clamp V). Is this a bug with MiniB3D?




simonh(Posted 2010) [#6]
I tried your example, and it crashed - I had to move the CreateTexture calls to below Graphics3D to get it working. Once I got it working, I couldn't tell what the problem was supposed to be - can you explain?


JA2(Posted 2010) [#7]
Hi Simon.

When using texture flag 32, my texture looks like this:



It looks correct in Blitz3D on the right. Using Psionic's ninja model for testing here but it looks the same with any models I try. It only does this with flag 32. I've even moved the CreateTexture calls to below Graphics3D even tho it was working for me before...