Horde3D

Next-Generation Graphics Engine
It is currently 29.11.2024, 12:34

All times are UTC + 1 hour




Post new topic Reply to topic  [ 15 posts ] 
Author Message
PostPosted: 25.08.2009, 17:18 
Offline

Joined: 24.08.2009, 15:26
Posts: 5
Hi,

Can someone give me an example of how to render a procedural cube? i.e. I would like to construct geometry as vertex and index buffer data and pass it on to Horde3D engine.

thanks,
Prashanth


Top
 Profile  
Reply with quote  
PostPosted: 26.08.2009, 21:56 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
I understand that we need a few more samples to show more advanced functionality (btw, ideas for new sample scenes are very welcome :) )

This thread shows how to update vertex data: http://www.horde3d.org/forums/viewtopic.php?f=1&t=923

However, a function for generating new geometry with the API is not yet implemented. The solution at the moment is to create a geometry resource/file in memory. This will certainly be improved in an upcoming version.


Top
 Profile  
Reply with quote  
PostPosted: 27.08.2009, 04:23 
Offline

Joined: 24.08.2009, 15:26
Posts: 5
I am trying to display procedurally rendered models in the engine. Examples for

1) Adding a colored cube procedurally.
2) Adding a textured cube procedurally.
3) Modifying color/texture procedurally.
4) Hiding/showing the cubes.
5) Creating different kinds of lights (spotlight, point, directional)
6) Moving the cube along a straight line across many frames (procedural animation).
7) Serializing the scene graph as XML for debugging

would be useful. In general, I feel that OGRE style step-by-step tutorials are good idea. Step-by-Step examples which act are test-cases are even better (as mentioned in the thread you linked to) as they are more likely to survive API changes.

I read the format specification for the .geo file and was able to generate a file for a single triangle. Then I created a Scene XML file to create a model using this geometry. (Note that I have NOT included a Mesh element in the XML). On modifying the Knight example to load this scene, I see nothing on the screen.

I have the impression that a little more digging may yield results but my time is limited and I need to finish an application in a hurry. It looks like Horde3D's API are in a state of flux. Also, there is a dearth of examples. Because of these issues, even if I solve my current problem, I am likely to face more which may take time to resolve. I am going to fall back to OGRE for now.


Top
 Profile  
Reply with quote  
PostPosted: 27.08.2009, 21:03 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
Thanks for your feedback. Procedural geometry is still the weakest point of Horde and will be addressed with the next release. However, most of the things you mention can already be done:

1+2) Still requires you to create a geometry file in memory (will be addressed with Beta5)
3) Modifying textures and colors exposed as shader uniforms is no problem
4) h3dSetNodeActivation
5) Light behavior is implemented in shader contexts
6) h3dSetNodeTransform
7) API allows to traverse scene graph hierarchy; dumping nodes to an xml file is an easy task

Good luck with your project! ;)


Top
 Profile  
Reply with quote  
PostPosted: 28.08.2009, 04:00 
Offline

Joined: 24.08.2009, 15:26
Posts: 5
Great! I will check out Beta5 when it is out.

Actually when I was talking about examples, I was not saying that the mechanism is unavailable. Even though each of those operations are easy to do, a newbie like me will find it extremely useful to have self contained but small examples illustrating each of them.

I recently checked out WxPython and their demos/examples are phenomenal. I would not be surprised if I were told that the toolkit is being adopted more rapidly because of the same.


Top
 Profile  
Reply with quote  
PostPosted: 28.08.2009, 08:09 
Offline

Joined: 05.03.2007, 19:38
Posts: 167
Location: Romania
Without high-jacking the topic, is there an eta for beta5? Will this be the final beta, before full release of 1.0.0?

_________________
Paul


Top
 Profile  
Reply with quote  
PostPosted: 29.08.2009, 08:51 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
SpOOky wrote:
Without high-jacking the topic, is there an eta for beta5? Will this be the final beta, before full release of 1.0.0?

I can't commit on that but new features are always available immediately via svn. Don't worry about the version numbers. Whether it is beta6 or 1.1 does not really make a difference.


Top
 Profile  
Reply with quote  
PostPosted: 29.08.2009, 11:22 
Offline

Joined: 06.06.2009, 23:13
Posts: 7
marciano wrote:
Don't worry about the version numbers. Whether it is beta6 or 1.1 does not really make a difference.
Do you imply there would be no API (or ABI) stability after 1.0 release?


Top
 Profile  
Reply with quote  
PostPosted: 30.08.2009, 08:01 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
magv wrote:
Do you imply there would be no API (or ABI) stability after 1.0 release?

API and format stability will certainly be more important in the future. However, for me the 1.0 final milestone is rather tied to when Horde has proven to be fully production-ready which requires a few finished projects. Before that it is still beta.


Top
 Profile  
Reply with quote  
PostPosted: 04.09.2009, 00:31 
Offline

Joined: 16.05.2009, 12:43
Posts: 207
I'm getting there with the "finished project" stuff :)

There are a few missing features still. But nothing massive I dont think.

BTW: am I not seeing it, or isnt there an unproject method in the engine? I'm trying to unproject world space to screen space coords.

More examples will definitely help. At some point I'll dive into the wiki and add some stuff I've learnt using Horde the last couple of months. Its been really great using it with 3ds max and the RIGHT version of the collada exporter. The other collada exporters for max really bite :)


Top
 Profile  
Reply with quote  
PostPosted: 04.09.2009, 07:20 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
zoombapup wrote:
BTW: am I not seeing it, or isnt there an unproject method in the engine? I'm trying to unproject world space to screen space coords.

I don't understand exactly what you mean with unproject. For me transforming a world space coordinate into a screen space coordinate sounds more like a "projection" function. In this case isn't multiplying the projection matrix with the transformation of the camera matrix and your point, what you want?

[x y w]T = P * M * [x y z 1]T

[x/w y/w 1]

zoombapup wrote:
More examples will definitely help. At some point I'll dive into the wiki and add some stuff I've learnt using Horde the last couple of months. Its been really great using it with 3ds max and the RIGHT version of the collada exporter. The other collada exporters for max really bite :)

Which collada exporter are you using now? Would be gread if we will get more info into the wiki.


Top
 Profile  
Reply with quote  
PostPosted: 20.09.2009, 12:47 
Offline

Joined: 16.05.2009, 12:43
Posts: 207
I tried three different collada exporters with max:

The default one with 2009
The colladamax one
The collada NEXTGEN one

Only colladamax actually works reliably for me. Or rather, its the one I trust to work. Which is strange because I belive nextgen took over the source for colladamax, but I could be wrong.

Anyway, my recommendation is for anyone thinking of using max with horde to go with the colladamax version of the collada exporter.


Top
 Profile  
Reply with quote  
PostPosted: 20.09.2009, 12:50 
Offline

Joined: 16.05.2009, 12:43
Posts: 207
Volker wrote:
I don't understand exactly what you mean with unproject. For me transforming a world space coordinate into a screen space coordinate sounds more like a "projection" function. In this case isn't multiplying the projection matrix with the transformation of the camera matrix and your point, what you want?

[x y w]T = P * M * [x y z 1]T

[x/w y/w 1]



If I remember rightly, gluUnproject does this in regular GL code. I know it sounds the wrong way round, but I guess you "project" from 2D to 3D and "unproject" from 3D to 2D in thier parlance.

But its a useful feature to have in the engine, for instance for figuring out screen space positions for indicator icons, doing screen space projections for unit bounding boxes for band-select picking etc.

So, I think maybe its a feature that Horde should have?


Top
 Profile  
Reply with quote  
PostPosted: 20.09.2009, 13:11 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
zoombapup wrote:
If I remember rightly, gluUnproject does this in regular GL code. I know it sounds the wrong way round, but I guess you "project" from 2D to 3D and "unproject" from 3D to 2D in thier parlance.
You remember wrongly - OpenGL Projects from 3D to 2D, and UnProjects from 2D back to 3D ;)

_________________
Tristam MacDonald - [swiftcoding]


Top
 Profile  
Reply with quote  
PostPosted: 21.09.2009, 02:45 
Offline

Joined: 08.11.2006, 03:10
Posts: 384
Location: Australia
zoombapup wrote:
So, I think maybe its a feature that Horde should have?
This would definitely fit in the Horde Utils library, but seeing it's just an application-helper function it probably doesn't belong in the Horde core.


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

All times are UTC + 1 hour


Who is online

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