Horde3D

Next-Generation Graphics Engine
It is currently 24.11.2024, 18:00

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: 26.10.2009, 13:59 
Offline

Joined: 21.12.2008, 23:46
Posts: 23
Actually I do not regard this a a real showcase, but as me and many others are missing some
documentation on how to make Horde3D work with procedurally generated geometry, I decided
to post this to make a start:
This was originally an university task for which we should implement an A* pathfinding demonstrator.
As finding paths through static meshes is boring I decided to write an interactive terrain-generator,
that would allow me to modify my mesh in (almost) real time, to have a dynamic labyrinth.

It's far away from being perfect, but at least it could give some hints on how to work with dynamic
geometry.
Updating the geometry is even worse, but as geometry resources in Horde were read-only until
Horde3D 1.0.0Beta3, it was the only way to do it...
(
- generate internal geometry
- upload to Horde3D
...
- update internal geometry
- unload old geometry from Horde3D
- upload updated geometry to Horde
)

I tried to convert this into a tutorial. It's a lot of code and I hope that it's not too confusing...
Procedurally Generated Geometry Tutorial:
http://www.horde3d.org/wiki/index.php5?title=Procedurally_generated_geometry_tutorial

I really wished that Horde3D had a function like
Code:
/**
 * float size_ the cube's size
 * int r_ red value
 * int g_ green value
 * int b_ blue value
 * int alpha_ transparency
 **/
H3DCreateColoredCube(5.0f, 255, 0, 0, 0);

to create a simple red cube without having to load geometry, texture and shader from files.

[edit] Removed obsolete link


Last edited by wakko on 09.10.2010, 12:15, edited 2 times in total.

Top
 Profile  
Reply with quote  
PostPosted: 27.10.2009, 20:54 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
Thanks a lot for your wiki article! However, I hope that it will soon be a bit easier to create dynamic resources ;)


Top
 Profile  
Reply with quote  
PostPosted: 09.08.2010, 20:27 
Offline

Joined: 22.06.2010, 19:21
Posts: 26
marciano wrote:
Thanks a lot for your wiki article! However, I hope that it will soon be a bit easier to create dynamic resources ;)

Has it gotten any easier yet? Or is writing a textstring on the fly to create a .geo-model still the way to go?

I'm all ears for any suggestions. Are there maybe some new functions in trunk that enable me to create a brand new mesh more easily? Or was that already added in Beta4?


Top
 Profile  
Reply with quote  
PostPosted: 10.08.2010, 15:37 
Offline

Joined: 08.11.2006, 03:10
Posts: 384
Location: Australia
Yeah for procedural content, building a GEO in your app is probably still the best way to go (if you can't do it beforehand, using a tool like the collada-converter...).
Horde is a bit nicer now in that you can update your GEO after you've created it via the new resource API functions.

If you read the file-format description for the GEO format, then making one yourself, or making geometry through a Horde API (which doesn't exist yet) would probably be just as complicated.
i.e. if Horde added an API to help you do this, it would still probably be a complicated process ;)

The code in the wiki is still good, but here's another example of a procedural GEO file if you want it.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 8 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® Forum Software © phpBB Group