A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by pHySiQuE » Sun Nov 23, 2014 2:10 pm
If anyone can make a simple Newton-based command set for me for creating voxel collisions using the Newton user mesh system, I am interested in paying for it. I don't have time to code this but it would make a nice little addition for our Christmas sales, and it's fairly straightforward. I figure $500 for the commands is fair, but let me know if you think the amount of work differs significantly.
This would only consist of two commands:
- Code: Select all
NewtonCreateVoxelCollision(int width, int height, int depth, float scale, void* data)
NewtonVoxelUpdateData(void* data)
The data argument is a pointer to a 3D array of bool values. The data pointer should stay user-managed to keep memory usage low. Since this is intended for Minecraft-like games, the generation speed is very important, which is why I am using Newton user mesh instead of the collision tree.
I will release the source code on this forum for free. Please PM me if interested, thanks.
-
pHySiQuE
-
- Posts: 608
- Joined: Fri Sep 02, 2011 9:54 pm
by Julio Jerez » Sun Nov 23, 2014 7:08 pm
There are thread in the forum about people how has already done these kind of thong using Newton
I did a search and I found this.
viewtopic.php?f=9&t=7865&p=54335&hilit=voxel#p54335 in the one at the end I posted a function that doe exactly what you want.
The time that take to pass the collision geometry to the engine should be in the order of nano to microseconds per call on a normal PC.
The time in the call back should be similar to the time the a terrain call back takes.
This could be misleading for example, if you pass a huge Box, you will have to scan many faces, and depend of the lever of sophistication or you boxes structure, this could generate lot of face of few faces.
More people do no implement a sophisticated voxel structure. The code fragment on the thread build a simple one, and it works pretty well.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
Return to General Discussion
Who is online
Users browsing this forum: No registered users and 9 guests