It is currently Sat Aug 22, 2020 1:34 pm


All times are UTC




Post new topic Reply to topic  [ 11 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Sculpting tool
PostPosted: Sun Nov 04, 2012 11:09 am 

Joined: Sun Nov 04, 2012 10:58 am
Posts: 5
Hi,

I have been looking into creating a sort of sculpting tool using xna or sharpDx and I'm wondering if that's something possible with polyvox.

I'm aware of the possible intergration with xna ( some guy manage to do it ) but I do not know the limitation of this tool.

My main concern would be the speed. when you add or substract mass does it update fast ? It's a bit vague but I can't really found a better way to explain it.

Nice tool by the way. I hope I can make it work with sharpDX.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Sculpting tool
PostPosted: Sun Nov 04, 2012 1:56 pm 

Joined: Fri Sep 14, 2012 10:54 pm
Posts: 15
I've got pretty crappy hardware caps over here, but still i extract meshes in 0.03 seconds! Chunks of 64x64x64. Thats hilariously fast.
The generation of initial Voxeldata is way slower. 10 times to be precise.


So i guess:
If you get the port working, the speed wont be much of a problem. Simply rebuild every now and then, if changes occure, tweak around a bit and enjoy your realtime sculpting tool :)


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Sculpting tool
PostPosted: Mon Nov 05, 2012 9:16 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
As KuroSei says, the speed will not be a problem as PolyVox is very fast. The biggest challenge to getting started will be the C# port. There are some SWIG bindings with PolyVox but they are only tested with Python, and they are also quite limited. I know that the volumes are wrapped (so you can read and write voxels from Python) but I don't remember whether the surface extractors are wrapped. You will probably need some experience with C++ and SWIG to get the C# version working.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Sculpting tool
PostPosted: Mon Nov 05, 2012 10:25 am 
Developer
User avatar

Joined: Sun May 11, 2008 4:29 pm
Posts: 198
Location: UK
The surface extractors are somewhat wrapped. The Python binding test is able to populate a volume and extract the mesh from it. Once the Python bindings are neatened up (after the upcoming release), I would probably make C# the next binding target as it's the next-most requested language. I have very little experience with C# but I should be able to test it with Mono.

_________________
Matt Williams
Linux/CMake guy


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Sculpting tool
PostPosted: Mon Nov 05, 2012 11:49 am 

Joined: Sun Nov 04, 2012 10:58 am
Posts: 5
I have no experience in c ++. I have a fairly good amount of experience in both python and c# so my only options are either try the bindings or wait for the port. I guess it's not going to happened anytime soon.

What are the limitations you were taking about?

Thanks for clarification.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Sculpting tool
PostPosted: Mon Nov 05, 2012 12:03 pm 

Joined: Mon Oct 15, 2012 4:33 pm
Posts: 52
hi jeremie, it seems that in the neoaxis forum someone has already done C# bindings . look at: http://www.neoaxis.com/forum/viewtopic.php?f=5&t=5236 , i used neoaxis engine (i have the commercial edition, but only until version 1.1) but i've never tested this bindings . i suppose that is an old version of polyvox. But sure you can use it as reference. Maybe if i have time i can do a try...

Cheers

Walter


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Sculpting tool
PostPosted: Mon Nov 05, 2012 12:23 pm 
Developer
User avatar

Joined: Sun May 11, 2008 4:29 pm
Posts: 198
Location: UK
The main limitation is that currently only the Marching Cubes surface extractor is bound. However, it will be relatively trivial to add the Cubic one too. There may be other features which are not bound either so if there's something specific you need which is not included in the bindings, let us know and I'll see if I can put something together.

If you want to have a play with it, check out the latest version of PolyVox from Git. Then go into the library/bindings folder and in a terminal, run
Code:
swig -csharp -namespace PolyVoxCore -c++ -I../PolyVoxCore/include/PolyVoxCore -I../PolyVoxCore/include/ PolyVoxCore.i
It will probably complain about a syntax error so then edit Vector.i and comment out (with a '//') the three lines that start with "PROPERTY(" (since they're Python specific). Run the swig command again and it should generate a whole bunch of .cs files.

At this stage I'm not clear on how to continue since I'm unfamiliar with the C# build system. As far as I understand you will need to build these .cs into a library (or maybe just copy and include them directly into your project). It seems that it will DLLImport the PolyVoxCore library so you'll need to make sure you've built and included that along with your application (see the usual PolyVox build instructions for this).

Perhaps some other here on the forum can be more help but I found a few StackOverflow posts which might be relevant: http://stackoverflow.com/questions/25268 and http://stackoverflow.com/questions/8616193

_________________
Matt Williams
Linux/CMake guy


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Sculpting tool
PostPosted: Tue Nov 06, 2012 6:49 am 

Joined: Sun Nov 04, 2012 10:58 am
Posts: 5
Thanks I have to take a look at it. I'll try both different method and I guess the NeoAxis first but I guess but just by skimming the stack overflow post using the swig doesn't seem really hard. Require just some plumbing I guess. I might start working on it this week end. So I'll post my progress.

@mwilliams thanks for the tip. When you say terminal you mean command right ? I'm abroad with my laptop so I can't really try out. But Polyvox seems like what I needed.

About specific features I do'nt know the library quite yet but I'll let you know.

@kalwalt thanks for the link. Yeah that would be great if you can try it out.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Sculpting tool
PostPosted: Thu Dec 06, 2012 9:03 pm 

Joined: Sun Nov 04, 2012 10:58 am
Posts: 5
I've finally got to work on the sculpting tool and unfortunately I haven't been able to build the swig binding. it doesn't seems to recognize any of the file. I might be missing something but swig is properly set and work perfectly. Is there any other stuff I need to install to compile the binding?

Anyway I use the old binding I found and it work great. Just wondering if there was any advantage to use the new build ( the old one is from june 2011).

What kind of features aren't available ?

I guess the picking is just available for ogre. I was thinking of about a way to pick the voxel. Or maybe just pick the generated polygon.


I'll post some of my progress soon. I'm still trying to figure out how this tool works.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Sculpting tool
PostPosted: Fri Dec 07, 2012 5:20 am 

Joined: Sun Nov 04, 2012 10:58 am
Posts: 5
just realize there was an error in the bat file. Just a repertory wasn't set properly. I just compile the latest version.


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ]  Go to page 1, 2  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