A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by Zero » Thu Feb 02, 2012 6:23 pm
Hi
at the moment you pass a unsigned short pointer to the HeightMapCollision which represents the heightdata.
I would love to see another function which accepts a float * and doesn't copy the data. This has some adavantages, first my data is already in the ram and don't need to be there twice(yes I know it's not so much space, but why waste when it's not necessary) and the second advantage is that I can edit my Heightdata and it's instantly reflected by the collision mesh.
I have already rewritten your HeightMapCollision to a template class, so you can easily specify the data type.
Zero
-
Zero
-
- Posts: 10
- Joined: Thu Jan 01, 2009 12:49 am
by Julio Jerez » Fri Feb 03, 2012 7:12 am
that's a good idea, we do it for core 300.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Zero » Fri Feb 03, 2012 8:20 am
Perfect

-
Zero
-
- Posts: 10
- Joined: Thu Jan 01, 2009 12:49 am
by pHySiQuE » Sun Feb 05, 2012 1:54 pm
You should consider changing your renderer to use shorts instead of floats. That's plenty enough resolution to model big mountains without stepping artifacts, and OpenGL supports short luminosity textures.
The only reason I would use floats is if you are making an editor, shorts can create stepping artifacts as you edit, because the changes you make to the height points tend to be very gradual.
-
pHySiQuE
-
- Posts: 608
- Joined: Fri Sep 02, 2011 9:54 pm
by Zero » Mon Feb 06, 2012 8:49 am
But it's for an Editor

-
Zero
-
- Posts: 10
- Joined: Thu Jan 01, 2009 12:49 am
by pHySiQuE » Tue Feb 07, 2012 3:36 pm
Then you do need to use floats.

-
pHySiQuE
-
- Posts: 608
- Joined: Fri Sep 02, 2011 9:54 pm
by Julio Jerez » Sun Mar 11, 2012 12:31 am
Zero wrote:Hi
at the moment you pass a unsigned short pointer to the HeightMapCollision which represents the heightdata.
I would love to see another function which accepts a float * and doesn't copy the data.
Zero
Ok I just check in the new heighfield collision using floats.
now the map doe no usin a vertical scale since teh value are floats and I will be adding non uniform scale fo all collision shape anyway.
The one thing I did not do is that it does not re use the heigfiled buffer, but this is not an arbitrary decision, I am reservinbg the right to at some point implement an OpenCL driver for the engine.
and if that happens then it is best than the buffer is controlled by the application.
for editor the data you should not have any problems if you use GetCollsionInfo.
I hope this is an acceptable compromized.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Zero » Tue Mar 13, 2012 6:49 pm
Okay thank you

-
Zero
-
- Posts: 10
- Joined: Thu Jan 01, 2009 12:49 am
Return to General Discussion
Who is online
Users browsing this forum: No registered users and 1 guest