Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark Physics & Dark A.I. & Dark Dynamix / [Dark Dynamix] Height Fields

Author
Message
knxrb
FPSC Tool Maker
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: United Kingdom
Posted: 30th Nov 2012 01:39 Edited at: 4th Dec 2012 20:30
[EDIT] This problem has now been solved by Matty H:
Quote: "Great news, I have a fix. When you instance the height field, set the 'hole material' to -1. Otherwise it seems the hole material is not properly initialised and leads to some undefined behaviour, most of the terrain being set as a hole and not created.

//-- This is where we create our actor instanced from the height field
//-- we have created.
//-- Since the data was collected from a scaled up area we need to scale our
//-- height field to match.
DYN INSTANCE HEIGHT FIELD terrainID, heightFieldID, 1.0, terrainScale, terrainScale, 0, -1"




Hi, It'd be great if anyone can help me with this problem please; I'm trying to use height fields for my terrain but they don't appear to work properly (using a purchased full version of Dark Dynamix v1.1).

Using the example code that comes with Dark Dynamix I get the following (I have adjusted the code to add 10 to the height so the debug render shows just above than the terrain):


This happens with the example, and also with any height fields that I attempt to make myself. As you can see it only shows two little pieces of the height field with the debug rendering, I'm under the impression it should be rendering the entire height field, is that correct?
I have an Nvidia GeForce GTX 550 Ti graphics card, and have the visual debugging software installed. Is the problem/bug with Dark Dynamix or is it something I'm doing?

The code that gives me the above (it's basically the demo code):

Attachments

Login to view attachments
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 30th Nov 2012 16:29
The good news is that I too experience the issue, this makes it much simpler to track down the problem.

The GDK version is fine, I have not yet found the cause but I will keep looking until I find it.

Thanks for bringing this to my attention, you should be able to use triangle meshes until this is resolved, unless you are sticking with DBPro built-in terrain?

knxrb
FPSC Tool Maker
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: United Kingdom
Posted: 30th Nov 2012 17:03 Edited at: 30th Nov 2012 17:05
Thanks for replying Matty, I'm using Evolved's terrain from his Advanced Lighting system and I've gotten it working with the triangle meshes and terrain limbs successfully, although I don't suggest anyone use the debug rendering with it unless you have a really good computer that can handle drawing it all I did try my copy of the Blitzwerks Terrain but I can't get Evolved's shaders to work with it at all.

I'm looking at the height fields as apparently they should be faster than the triangle meshes, and I'm hoping I can get fluids working with it better than my attempts with the triangle meshes.
When I try fluids and the terrain triangle mesh together, the particles/fluid just go straight through, I have a feeling it's something I'm doing that's different from the fluid example you wrote.

Hope you can get it fixed soon, I love Dark Dynamix so far
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 3rd Dec 2012 15:01
I am looking at this today, I found a clue to what is causing it but I am yet to pin it down.

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 4th Dec 2012 18:30
Great news, I have a fix. When you instance the height field, set the 'hole material' to -1. Otherwise it seems the hole material is not properly initialised and leads to some undefined behaviour, most of the terrain being set as a hole and not created.



If this works could you edit your first post with this fix, since you titled the thread 'Height Fields' it will be easy to find for anyone searching the same issue.

knxrb
FPSC Tool Maker
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: United Kingdom
Posted: 4th Dec 2012 20:31 Edited at: 4th Dec 2012 20:32
Thanks very much Matty, it works perfectly and I've got the fluids and particles interacting properly with it as well
As requested, I've included the fix at the top of my first post for other users.
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 5th Dec 2012 17:00
Thanks knxrb, glad it's working

Login to post a reply

Server time is: 2024-04-20 03:15:59
Your offset time is: 2024-04-20 03:15:59