Interior Mapping

A place to show off your latest screenshots and for people to comment on them. Only start a new thread here if you have some nice images to show off!

Postby odyeiop » Sun Apr 01, 2007 11:59 pm

ah.. now that is really neat =) Great work!
I'm Immortal as you are Divine.
User avatar
odyeiop
Halfling
 
Posts: 97
Kudos: 0
Joined: 22 Dec 2006
Location: stoney creek

Postby nikki » Mon Apr 02, 2007 12:15 am

Wow! That looks completely as if it was really modelled! Its all done in shaders with only one cube, right?
User avatar
nikki
Old One
 
Posts: 2730
Kudos: 13
Joined: 17 Sep 2005
Location: Princeton, New Jersey, USA

Postby Praetor » Mon Apr 02, 2007 1:14 am

Very much cooler. Urban simulations can really use this to get more detail. The inclusion of rooms really helps. You can change the number of rooms, right? So, for instance a whole building could be treated as one room?
User avatar
Praetor
OGRE Retired Team Member
OGRE Retired Team Member
 
Posts: 3335
Kudos: 3
Joined: 21 Jun 2005
Location: Rochester, New York, US

Postby nikki » Mon Apr 02, 2007 7:51 am

Praetor wrote:Very much cooler. Urban simulations can really use this to get more detail. The inclusion of rooms really helps. You can change the number of rooms, right? So, for instance a whole building could be treated as one room?

The frequencies of the walls along different axes can be changed. So maybe the frequency must be set to the dimensions of the box, 0 or 1 or something like that to get just one room.
User avatar
nikki
Old One
 
Posts: 2730
Kudos: 13
Joined: 17 Sep 2005
Location: Princeton, New Jersey, USA

One additional feature ?

Postby Shadow007 » Mon Apr 02, 2007 11:19 am

Wow, I really like it.
I've got one question and one suggestion though :

Question : I can't find the definition of the "step" function that you use in the shader (didn't download the cg toolkit though). Could you please explain what it does ?

Suggestion :
Would it be possible to use some kind of texture-atlas for the ceiling/floor/Walls textures so that some 'randomized' variety is added.
I'd guess you could use some kind of hash from height/walls to have a random but persistent pattern.
This could allow for example to have lit/unlit rooms on a facade, or to break the uniform look.
I'd guess using 4 distinct sub-textures (using the last 2 bits of a hash) would add quite a lot of variety...
Shadow007
Gremlin
 
Posts: 185
Kudos: 0
Joined: 07 May 2005

Postby Oogst » Mon Apr 02, 2007 11:38 am

nikki wrote:Wow! That looks completely as if it was really modelled! Its all done in shaders with only one cube, right?

Yups!
Shadow007 wrote:... Question : I can't find the definition of the "step" function that you use in the shader (didn't download the cg toolkit though). Could you please explain what it does ?

From the Cg user's manual:
Code: Select all
step(a, x)
   0 if x < a;
   1 if x >= a.

Shadow007 wrote:Suggestion :
Would it be possible to use some kind of texture-atlas for the ceiling/floor/Walls textures so that some 'randomized' variety is added.
I'd guess you could use some kind of hash from height/walls to have a random but persistent pattern.
This could allow for example to have lit/unlit rooms on a facade, or to break the uniform look.
I'd guess using 4 distinct sub-textures (using the last 2 bits of a hash) would add quite a lot of variety...

It would be possible, but in the full version I do not have any instructions left to do the math. I will give it a try in a simpler version, though, but I think the added effect will not be large. Another solution for the light/dark thing would be to just create a lightness-function that depends on the position of a room.
blog.oogst3d.net: my dev blog and portfolio
Ronimo Games: my game dev company
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/PS3/PS4)
Swords & Soldiers: side-scrolling RTS (PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance
Oogst
OGRE Expert User
OGRE Expert User
 
Posts: 1034
Kudos: 33
Joined: 29 Mar 2004
Location: the Netherlands

Postby beaugard » Mon Apr 02, 2007 12:45 pm

My shader has become quite complex, so I am not sure who will win...


But the heavy work is all in the pixel shader, so if you're using early z-out your method will have constant complexity with respect to the number of houses... well almost. That's pretty good, right?

In fact, this is like faking a geometry shader on dx9!
beaugard
OGRE Contributor
OGRE Contributor
 
Posts: 265
Kudos: 2
Joined: 25 Mar 2007

Postby Oogst » Mon Apr 02, 2007 1:04 pm

beaugard wrote:...
But the heavy work is all in the pixel shader, so if you're using early z-out your method will have constant complexity with respect to the number of houses... well almost. That's pretty good, right?

In fact, this is like faking a geometry shader on dx9!

I had not thought of it like that yet, but what is "early z-out"? Do you mean that I should make sure things are rendered close-objects first (which Ogre does by default)? Or is there something specific that I will have to turn on?
blog.oogst3d.net: my dev blog and portfolio
Ronimo Games: my game dev company
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/PS3/PS4)
Swords & Soldiers: side-scrolling RTS (PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance
Oogst
OGRE Expert User
OGRE Expert User
 
Posts: 1034
Kudos: 33
Joined: 29 Mar 2004
Location: the Netherlands

Postby Kencho » Mon Apr 02, 2007 1:08 pm

Early z-out is exactly that. Once you write a pixel in the depth buffer, further pixels (higher z) won't be drawn. This way you avoid writing to the same pixel twice.
Ogre does that at an object-level. What I think he means is to do it in a wall-level, rendering the closest walls first.
Image
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
 
Posts: 4011
Kudos: 1
Joined: 19 Sep 2003
Location: Burgos, Spain

Postby haffax » Mon Apr 02, 2007 1:32 pm

Ogre doesn't do this at object level. Or rather it only does it for objects with z-test/writing turned off and then in reversed order..

Though a course grained sorting could probably be achieved cheaply in the OctreeSM when making the order of the node traversal camera dependent. I've thought about it, but so far didn't try it.

And I guess with the all new SceneManagers in Shoggoth we will see this at work too.
team-pantheon programmer
creators of Rastullahs Lockenpracht
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
 
Posts: 4823
Kudos: 4
Joined: 18 Jun 2004
Location: Berlin, Germany

Postby Kencho » Mon Apr 02, 2007 1:42 pm

I know Ogre does for the transparent objects, but I'd have bet it also does for the opaque ones! :| Good to know...
Image
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
 
Posts: 4011
Kudos: 1
Joined: 19 Sep 2003
Location: Burgos, Spain

Postby beaugard » Mon Apr 02, 2007 1:49 pm

I meant like in this post (there are quite a few more, not sure if this is the best one).

http://www.ogre3d.org/phpBB2/viewtopic.php?t=25672&highlight=early+zout

found another one:

http://www.ogre3d.org/phpBB2/viewtopic.php?t=20546&postdays=0&postorder=asc&start=113

Since first pass of all materials are rendered before second pass, the z-buffer will be ready by the time your expensive shader is called, and only visible fragments will be processed. Just remember to use exactly the same calculations in the vertex programs of both passes, or there will be z fighting.
beaugard
OGRE Contributor
OGRE Contributor
 
Posts: 265
Kudos: 2
Joined: 25 Mar 2007

Postby Oogst » Mon Apr 02, 2007 2:01 pm

Hmm, interesting, that is definitely worth to give a try! As I understand it, I can use early z-out on just these objects and let all other objects be rendered normally. That sounds pretty efficient! I already knew the technology, but I did not know Ogre rendered per pass instead of per object.
blog.oogst3d.net: my dev blog and portfolio
Ronimo Games: my game dev company
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/PS3/PS4)
Swords & Soldiers: side-scrolling RTS (PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance
Oogst
OGRE Expert User
OGRE Expert User
 
Posts: 1034
Kudos: 33
Joined: 29 Mar 2004
Location: the Netherlands

Postby beaugard » Mon Apr 02, 2007 2:07 pm

Yes, this is how I use it too. On objects with inexpensive fragment shaders (or expensive vertex shaders, I suppose...) I have only one pass, whilst on objects with complicated fragment shaders I have two, the first with colour_write off.
beaugard
OGRE Contributor
OGRE Contributor
 
Posts: 265
Kudos: 2
Joined: 25 Mar 2007

Postby beaugard » Mon Apr 02, 2007 2:13 pm

I already knew the technology, but I did not know Ogre rendered per pass instead of per object.


Yeah, it took me a while until I happened to stumble upon this in the forums - not so easy to figure out from API docs and first principles :). Actually it should be in the manual (as an example or something) just because it is such a nice trick.
beaugard
OGRE Contributor
OGRE Contributor
 
Posts: 265
Kudos: 2
Joined: 25 Mar 2007

Postby free_FROZ » Mon Apr 02, 2007 9:52 pm

If you figure out how to add random office supplies and furniture in there, you'd really have something.
free_FROZ
Halfling
 
Posts: 51
Kudos: 0
Joined: 09 Feb 2006

Postby stoneCold » Mon Apr 02, 2007 9:58 pm

free_FROZ wrote:If you figure out how to add random office supplies and furniture in there, you'd really have something.
xD

Oogst: interesting technique :wink:
my tweets | www.fuse-software.com | home of vektrix (Flash GUI for Ogre3D) and caspin (ActionScript 3 Virtual Machine Wrapper)
User avatar
stoneCold
OGRE Expert User
OGRE Expert User
 
Posts: 867
Kudos: 0
Joined: 01 Oct 2004
Location: Carinthia, Austria

Postby nikki » Tue Apr 03, 2007 1:21 am

free_FROZ wrote:If you figure out how to add random office supplies and furniture in there, you'd really have something.

ROFL.
User avatar
nikki
Old One
 
Posts: 2730
Kudos: 13
Joined: 17 Sep 2005
Location: Princeton, New Jersey, USA

Postby Virion » Tue Apr 03, 2007 9:04 am

Good job. It is really nice. :D
User avatar
Virion
Halfling
 
Posts: 84
Kudos: 1
Joined: 24 Jul 2006
Location: Malaysia

Other possibility ...

Postby Shadow007 » Tue Apr 03, 2007 4:34 pm

Wouldn't it be possible to use a cubemap for the inside texture ? This could allow with one single pass to adress the floor/ceiling/walls problem would'nt it ?
Shadow007
Gremlin
 
Posts: 185
Kudos: 0
Joined: 07 May 2005

Postby :wumpus: » Tue Apr 03, 2007 7:04 pm

very nice idea :) If this technique is used with good textures, and a blend of reflectivity/transparency mimicing real buildings you could achieve very convincing results
You're certainly unto something. I saw something like this technique (virtual geometry) before to map a pool bottom to a plane in a water simulation, but for buildings this is new afaik.
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
 
Posts: 3067
Kudos: 1
Joined: 10 Feb 2004
Location: The Netherlands

Postby Prezadent » Tue Apr 03, 2007 7:17 pm

Its a mirror of a hidden environment cube. Or it could be.
Prezadent
Gnoblar
 
Posts: 18
Kudos: 0
Joined: 10 Feb 2007

Postby Falagard » Tue Apr 03, 2007 8:20 pm

I think Crackdown is doing something like this for building interiors. Most of the windows in Crackdown let you see slightly into the buildings and they are all mapped with similar style textures (office buildings you can see the floor and ceiling and they fade to darkness as it gets deeper into the building.

I doubt that Crackdown modeled even simple interior geometry for the buildings and was wondering what kind of trickery they used.

It's possible they didn't do this technique though, and I could be rambling. Regardless, it's a very nice illusion - great work.
User avatar
Falagard
OGRE Retired Moderator
OGRE Retired Moderator
 
Posts: 2060
Kudos: 3
Joined: 26 Feb 2004
Location: Toronto, Canada

Postby jomunoz » Tue Apr 03, 2007 8:26 pm

:shock: That is so cool...
User avatar
jomunoz
Goblin
 
Posts: 228
Kudos: 0
Joined: 13 Apr 2005
Location: Medellin - Colombia

Postby Oogst » Sat Apr 07, 2007 1:09 pm

I tried the early z-out thing and who, that really kicked some framerate butt! For a scene with a lot of cubes behind each other, the framerate went from 58 tot 110 fps. :shock: Funny thing is that the exact boost depends on which object is in front. If the object I created first in 3D Studio MAX is in front, then there is hardly any boost. If one of the last objects is in front, then the boost is a almost a factor 2. This only makes sense, of course, but it is nice to see this thing work as expected.

I still did not get my cube mapping right, by the way, so I opened a topic about it here:

http://www.ogre3d.org/phpBB2/viewtopic.php?p=214446
blog.oogst3d.net: my dev blog and portfolio
Ronimo Games: my game dev company
Awesomenauts: platforming MOBA (PC/Mac/Linux/XBox360/PS3/PS4)
Swords & Soldiers: side-scrolling RTS (PS3/Wii/PC/Mac/Linux/iPhone/iPad/Android)
Proun: abstract racing game (PC)
Cello Fortress: mixing game and live cello performance
Oogst
OGRE Expert User
OGRE Expert User
 
Posts: 1034
Kudos: 33
Joined: 29 Mar 2004
Location: the Netherlands

PreviousNext

Return to Showcase

Who is online

Users browsing this forum: Bing [Bot], Exabot [Bot] and 2 guests