| Volumes Of Fun http://www.volumesoffun.com/phpBB3/ |
|
| MLE Tech Demo :) http://www.volumesoffun.com/phpBB3/viewtopic.php?f=2&t=154 |
Page 3 of 8 |
| Author: | DJDD [ Thu Mar 17, 2011 10:26 pm ] |
| Post subject: | Re: MLE Tech Demo :) |
Nice work! Do you plan on providing any tutorials or source code? I would love to see your implementation. |
|
| Author: | Shanee [ Fri Mar 18, 2011 7:40 am ] |
| Post subject: | Re: MLE Tech Demo :) |
I posted quite a bit of code around the forum actually, the smooth spheres editor is here somewhere, so is my atlas shader (which is a bit broken |
|
| Author: | Shanee [ Fri Mar 18, 2011 11:43 am ] |
| Post subject: | Re: MLE Tech Demo :) |
Ok, I know what's the problem with the weird texture confusion and ugliness in between materials. That is due to one vertex being material one (for example) and then the next would be material three. The UV are transformed appropriately but then the UV will try to get let's say from 0.15 U (for first material which goes 0-0.25) and up to let's say 0.73 (which is of the third material which goes from 0.5 to 0.75). Not sure how to deal with this, suggestions? |
|
| Author: | beyzend [ Fri Mar 18, 2011 4:06 pm ] |
| Post subject: | Re: MLE Tech Demo :) |
I'm still kind of out of it right now but are you talking about problems with texture atlas? That can be solved by strategically messing with your textures like described here: http://www.ogre3d.org/forums/viewtopic.php?f=4&t=61602 But this means reducing your texture size which means not as much space available space textures in your atlas. yeah. I was thinking of using multiple textures to get around this... |
|
| Author: | Shanee [ Fri Mar 18, 2011 7:26 pm ] |
| Post subject: | Re: MLE Tech Demo :) |
it won't fix the problem which combined with triplanar texture :/ |
|
| Author: | David Williams [ Fri Mar 18, 2011 9:10 pm ] |
| Post subject: | Re: MLE Tech Demo :) |
Shanee wrote: That is due to one vertex being material one (for example) and then the next would be material three. The UV are transformed appropriately but then the UV will try to get let's say from 0.15 U (for first material which goes 0-0.25) and up to let's say 0.73 (which is of the third material which goes from 0.5 to 0.75). Not sure how to deal with this, suggestions? Yes, this is an issue when working with the marching cubes surface extractor and it is unrelated to the texture atlas. You're correct about the cause, and you can read this article to see how I handle it in Thermite at the moment: Volumetric Representation of Virtual Environments In particular, section 3.5.2 deals with multiple materials though it's a bit hard to see the diagrams as they need to be in colour really. I didn't try your demos the download cut off halfway through, but the screenshots look cool |
|
| Author: | Shanee [ Sat Mar 19, 2011 6:28 am ] |
| Post subject: | Re: Triplanar texturing |
I am not sure I got this completely... You generate 4 meshes? 1 is all triangles that have no blending problems normal plus the blended one set to material 0 so they are black. Then 3 more for the problematic triangles only and you render them setting a corner that will cause problems to have some alpha, then render it again with the other two corners having alpha so they will blend? Is it integrated in PolyVox or in Thermite3D? How would I go handle it as a PolyVox user? do I need to iterate through the indices and find when I hit a triangle with different materials and duplicate the indices for it, as well as set that triangle's material to 0 in the original buffer? Or is it all done for me and I just need to know how to use it? |
|
| Author: | David Williams [ Sat Mar 19, 2011 11:04 am ] |
| Post subject: | Re: MLE Tech Demo :) |
Yes, you've basically got the idea. I should point out that this isn't necessarily the only way of handling the problem - it's just what I came up ith when working on this problem in Thermite3D. You can consider it an active research area, and I'll be interested if you have any better ideas It's not implemented in PolyVox, but you can look in Thermite for some example code. It's not brilliantly written but you should get the idea. Have a look at the function void SurfacePatchRenderable::buildRenderOperationFrom(SurfaceMesh<PositionMaterialNormal>& mesh, bool bSingleMaterial). |
|
| Author: | David Williams [ Sat Mar 19, 2011 11:07 am ] |
| Post subject: | Re: Triplanar texturing |
Shanee wrote: You generate 4 meshes? 1 is all triangles that have no blending problems normal plus the blended one set to material 0 so they are black. Oh, but you don't need four, because the three blended triangles can be done in a single batch. So it's one batch for the black triangle with no blending, and then one batch for all three triangles with additive blending. |
|
| Author: | Shanee [ Sat Mar 19, 2011 11:18 am ] |
| Post subject: | Re: MLE Tech Demo :) |
by batch do you mean buffers or Draw calls? I am still not completely sure how I'd do it but we'll see... (Like how do you go on setting which vertex is now alpha 100% and which one is not each time?) Also, does it mean you solved the texture atlas bleeding and mip maps problems etc in polyvox? how then? how do you simulate wrap without having seams? |
|
| Page 3 of 8 | All times are UTC |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|