It is currently Sat Aug 22, 2020 12:37 pm


All times are UTC




Post new topic Reply to topic  [ 73 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 8  Next
Author Message
 Post subject: Re: MLE Tech Demo :)
PostPosted: Thu Mar 17, 2011 10:26 pm 

Joined: Tue Mar 08, 2011 3:57 am
Posts: 46
Nice work! Do you plan on providing any tutorials or source code? I would love to see your implementation.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: MLE Tech Demo :)
PostPosted: Fri Mar 18, 2011 7:40 am 

Joined: Fri Feb 18, 2011 8:41 pm
Posts: 173
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 ;)) etc.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: MLE Tech Demo :)
PostPosted: Fri Mar 18, 2011 11:43 am 

Joined: Fri Feb 18, 2011 8:41 pm
Posts: 173
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?


Top
Offline Profile  
Reply with quote  
 Post subject: Re: MLE Tech Demo :)
PostPosted: Fri Mar 18, 2011 4:06 pm 

Joined: Sat Sep 18, 2010 9:45 pm
Posts: 189
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...


Top
Offline Profile  
Reply with quote  
 Post subject: Re: MLE Tech Demo :)
PostPosted: Fri Mar 18, 2011 7:26 pm 

Joined: Fri Feb 18, 2011 8:41 pm
Posts: 173
it won't fix the problem which combined with triplanar texture :/


Top
Offline Profile  
Reply with quote  
 Post subject: Re: MLE Tech Demo :)
PostPosted: Fri Mar 18, 2011 9:10 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
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 :)


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Triplanar texturing
PostPosted: Sat Mar 19, 2011 6:28 am 

Joined: Fri Feb 18, 2011 8:41 pm
Posts: 173
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?


Top
Offline Profile  
Reply with quote  
 Post subject: Re: MLE Tech Demo :)
PostPosted: Sat Mar 19, 2011 11:04 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
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).


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Triplanar texturing
PostPosted: Sat Mar 19, 2011 11:07 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
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.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: MLE Tech Demo :)
PostPosted: Sat Mar 19, 2011 11:18 am 

Joined: Fri Feb 18, 2011 8:41 pm
Posts: 173
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?


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 73 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 8  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net