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.

Author
Message
Fane
14
Years of Service
User Offline
Joined: 9th May 2012
Location:
Posted: 18th Nov 2014 07:37
Hello everybody,
I tryed to export a cube thatr has hairs on it. See Picture



But if I export it as .x and load it in DBP its only shows me a normal cube like the "make object cube" Syntax Someone an Idea why it it so? If you need more infomation about the object please ask for it I will post it than in so ten or twelve hours ^^

System: Win 8.1 64 / Core i5 (3,9GHz), GeForce 760 GTX 192 - Bit Dx 11 (Driver 335.23) / 8GB Ram
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 18th Nov 2014 09:00
The problem is probably that the hair is infinitely thin, so DBP won't be able to draw it.

I'm not sure how to solve it, but one thing you could do in the mean time is make sure the hair was actually exported. Can you tell me what the following code prints to the screen?



I like offending people. People who get offended should be offended. -- Linus Torvalds
Fane
14
Years of Service
User Offline
Joined: 9th May 2012
Location:
Posted: 18th Nov 2014 12:53
I place the "make memblock 1, 16" Syntax above fvf = ...
to avoid the runtime error.

fvf, vertex size & count are all zero.

System: Win 8.1 64 / Core i5 (3,9GHz), GeForce 760 GTX 192 - Bit Dx 11 (Driver 335.23) / 8GB Ram
James H
19
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 18th Nov 2014 14:17
Have you made the individual hairs using a material or are they all made from triangles? To me it looks like a fur shader. Maybe you should upload the .blend file.
The code TheComet provides does not convert the mesh to a memblock so all results will be zero. Making a memblock with make memblock 1,16 just makes an empty memblock, the command would be make memblock from mesh but I can`t see that the fvf has any bearing here. If the hairs were part of the mesh then chances are you wouldn`t see them because the polycount was to high(and no error thrown back to you), usually you might expect a 3d memory error thrown back at you but sometimes the media will simply not be visually present or you might get the windows message dbpro has stopped working or the program might exit silently. These failures can occur once you approach the limit of your system.
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 18th Nov 2014 17:46
Sorry, forgot something. My DBP is rusty.



The point of the code is to see what the Blender's X exporter is doing. FVF is not necessarily required but I'm not taking any chances with blender export scripts.

If you could upload the .blend file and possibly even the .X file, it would be very helpful. Of course, if you find your data to be sensitive then that's fine, we can take it step by step.

I like offending people. People who get offended should be offended. -- Linus Torvalds
Ortu
DBPro Master
18
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 18th Nov 2014 20:00
According the the screenshot, that only has 12 tri, which would indicate the the hair is a modifier/shader and not actual geometry and as such, only the basic 12 tri cube is actually getting exported.

You could possibly convert the modifier into polygon geometry to export, though the polycount and filesize would be unusably high.

You will be better off using a fur shader in DBpro to reproduce the hairs.

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 18th Nov 2014 20:38
Oh duh, I forgot you could just read that on the header bar.


See EVOLVED's shaders for an example of a fur shader. Scroll down to "Vertex Fur":
http://www.evolved-software.com/shaders/lighting

I like offending people. People who get offended should be offended. -- Linus Torvalds
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 19th Nov 2014 09:04 Edited at: 19th Nov 2014 09:07
I do not know what the end goal is, therefore I am not sure why you would not use a shader instead of having defined each strand of hair as geometry. Most likely you have a good reason.

Firstly, as mentioned your hair particles are not part of any mesh geometry or mesh generating modifier. Therefore you would need to click the convert button in the particle effect's modifier panel in the modifier stack panel in order to have your hair exported for use in DarkBASIC using the .X format.

Secondly, the hair structure you have shown uses paths which when converted to a mesh produces an array of vertices which will not produce any polygons, which will not be displayed correctly in any simple DarkBASIC/DirectX application tending to not feature any shaders or custom rendering features. Therefore you should change the hair type to mesh based hair requiring an object source for the strands using the Duply Object field in the particle property panel, all while considering that at this point all of your strands of hair will import as seperate limbs within or beyond DarkBASIC's limb count limit.

Fane
14
Years of Service
User Offline
Joined: 9th May 2012
Location:
Posted: 22nd Nov 2014 10:03 Edited at: 22nd Nov 2014 10:05
Hello everyone,
sorry that I answer you so late but I had lot of work to do. First I want to thank you all for the helpful answers =) My friend and I look a little bit around and found some things that let us import the hair into DBP.

First of all we had to convert the particles into mesh. Then we add a Screw modifier with 1° Angle and 2 Steps. To reduce the verts we add a Decimate Planar Modifier and finaly export the whole thing as .x.

Now we get only one problem that we want to solve in the next few days. The hairs are thicker now but only on one axis SO DBP have some problem to render it correcly from some view angle. Bewlow you can see zwo pictures.

It dont look as good as in Blender because for our test we only use 500 hairs instead of 5000. But you can load even 10000 into DBP with no problems.






System: Win 8.1 64 / Core i5 (3,9GHz), GeForce 760 GTX 192 - Bit Dx 11 (Driver 335.23) / 8GB Ram
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 22nd Nov 2014 15:20


I like offending people. People who get offended should be offended. -- Linus Torvalds
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 22nd Nov 2014 15:29
TheComet is posting selfies again.

FPSC Reloaded TGC Backer

Looks like you've made good progress with this. I don't know which option is better - the fur shader route or the many object route. You might find DBPro works better if you use limbs for the hair meshes rather than separate objects for each hair.



Powered by Free Banners
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 22nd Nov 2014 15:44 Edited at: 22nd Nov 2014 15:44
@Fane - You really shouldn't be exporting the hair as strands like that. The results look ugly and the vertex count is way too high. Why don't you consider using the shader I linked earlier?


Or at least use a less taxing technique such as extruded surfaces which you then texture with transparent hairs:



I like offending people. People who get offended should be offended. -- Linus Torvalds

Login to post a reply

Server time is: 2026-07-17 12:28:41
Your offset time is: 2026-07-17 12:28:41