Jump to content

  • Log In with Google      Sign In   
  • Create Account


BIM rendering tool for game development in opengl or ogre3d


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 Jorge Reto   Members   -  Reputation: 108

Like
0Likes
Like

Posted 14 December 2013 - 10:36 AM

I am planning on developing a game in opengl or ogre3d and I have the BIM model of a building I would like to "import" into the game!
I know there are some tools capable of rendering BIMs but I'm not sure if it is possible to use them to render the building and then develop the game over it

Is this possible? if yes can someone tell me a good tool to that this?



Sponsor:

#2 Tasaq   Members   -  Reputation: 1171

Like
1Likes
Like

Posted 16 December 2013 - 04:26 AM

Doesn't your BIM application support exporting to common 3D file format (3ds, fbx, collada, ase, obj)? Which BIM app you want to use? I rendered a building from Revit in my DirectX app no problem, I just exported it from Revit as obj and loaded with Assimp.
 
EDIT:
 
I noticed you mentioned Revit in tags. If you worked with Revit you should know Jeremy Tammik's blog, here's a post on Revit 2014 obj exporting:
 
Blog Post.


Edited by Tasaq, 16 December 2013 - 04:29 AM.


#3 ShadowFlar3   Members   -  Reputation: 1183

Like
1Likes
Like

Posted 16 December 2013 - 04:33 AM

When you talk about rendering: it is possible to bring the model to Blender via .obj for example and use it to adjust textures and UV maps and bake lighting into the model textures.



#4 Tasaq   Members   -  Reputation: 1171

Like
0Likes
Like

Posted 16 December 2013 - 09:06 AM

When you talk about rendering: it is possible to bring the model to Blender via .obj for example and use it to adjust textures and UV maps and bake lighting into the model textures.

 

This. In case of Revit you need to write your own exporter (as ExternalCommand in Revit Add-in). Chances are that UV will be messed up. I think that using 3D editing tool for post processing will be a must. Another problem that could appear is that geometry could be 'overtessellated', so you probably will want to optimize things a bit.



#5 Jorge Reto   Members   -  Reputation: 108

Like
0Likes
Like

Posted 16 December 2013 - 10:08 AM

Thank you for your replies.

 

Yes I have the REVIT model but I am not sure exporting to an obj file is a good idea in my case. Correct me if I am wrong but from what I know it will be nearly impossible to detect colisions with the with walls and doors. The basic idea of the game is to explore the building and find hidden object. For that I can't lose the information I have on revit about the doors location for example unsure.png



#6 Tasaq   Members   -  Reputation: 1171

Like
0Likes
Like

Posted 16 December 2013 - 10:35 AM

Thank you for your replies.

 

Yes I have the REVIT model but I am not sure exporting to an obj file is a good idea in my case. Correct me if I am wrong but from what I know it will be nearly impossible to detect colisions with the with walls and doors. The basic idea of the game is to explore the building and find hidden object. For that I can't lose the information I have on revit about the doors location for example unsure.png

 

From my point of view it's doable, but I have been working with Revit API for some time now. From API you can do a lot, you can even export separate elements to separate files. You don't have to export to obj, it's just example. The main problem here is writing your own exporter. I have no idea how much experience you have, but here's my first idea:

 

Revit works on Elements, door is example of such element. You can filter elements to get only doors. You can create level file (for instance in XML or Json) which will store world transform of a door and it's model name/id. While loading the building in you game, you can use such file to find and place doors with your door physics behaviour.

 

Note it's just quick idea so it can have a lot of flaws :)



#7 ShadowFlar3   Members   -  Reputation: 1183

Like
0Likes
Like

Posted 17 December 2013 - 05:59 AM

For that I can't lose the information I have on revit about the doors location for example

 

 

You will likely lose that information if you don't write a custom exporter. But it's not a big deal because depending on the complexity and detail level of your BIM model I suggest you should make a separate collision model for the building. If you have relatively simple shapes you could export doors separately and the rest of the objects as another object that you can set the collision detection for.

 

If you want to doors that can be opened and closed instead of walked through you'll need to do a lot more than simple conversion from BIM. You need to probably separate the door from the frame and set up door hinges using physics joints.

 

Speaking of which you've mentioned Ogre3D and OpenGL but where do you plan on handling the rest of the game? Player, collision, game logic? If you aren't set with a particular game engine, for a pretty straight forward and manageable workflow I might recommend Blender Game Engine. Here's how I would do it:

 

Model preparation (this part probably takes the most expertise to get good looking results and you can't really easy-mode it IMO)

--------------------------------

- import object(s) to Blender using whatever format you think works best

- correct textures and UV, adjust meshes etc, unwrap texture atlas using lightmap

- set up lighting using Sun and hemi lamps plus whatever you want to add indoors

- bake AO lighting

 

Game set up:

--------------------------------

- set the building model to static which uses it for colliding, set doors model to no collision. Alternatively make one instance of rotating door and clone it to all door locations in your model

- add a player sphere, set it to dynamic, implement WASD movement via the visual programming system in Blender plus mouselook script you can find online

- add a collectible object template with near sensor to the player so it can be picked up and place instances of the object around the map

- make couple lines of script that check how many collectibles remain in the game world and end the game when it reaches 0

 

Finishing:

-------------------------------

- playtest, fix visual errors, make locations interesting

- export as standalone .exe and share ^^


Edited by ShadowFlar3, 17 December 2013 - 05:59 AM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS