DETAILED scene rendering to jpg/gif

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
ZombieWoof
Kobold
Posts: 28
Joined: Mon Apr 25, 2005 5:47 pm

DETAILED scene rendering to jpg/gif

Post by ZombieWoof »

I've been offered a chance to do an application that will display photo-realistic scenes, and I need to check my concepts before I commit to the project ;)

In general, I'll be required to do rooms with windows and furniture, with the textures on the walls, floor, furniture and other scene elements able to be selected at runtime, and the results rendered to a file on disk.

The scenes are static.. nothing is moving around, and once textures are assigned, I just need to render the scene once, then move on to another scene/texture combination and render that one, and so on......

here are my questions:

1. since the scenes are static, with little or no reflective elements, can I ligtmap the scene ONCE no matter how I change the textures applied to the models ??

2. are there any issues with changing the textures assigned to a mesh at runtime ??

and 3. I presume that render-to-texture will be used.. can someone stick up a code snippet for putting that rendered texture to a file on disk ??

Any other suggestions appreciated !!
P
OGRE Expert User
OGRE Expert User
Posts: 421
Joined: Fri Jan 07, 2005 9:49 pm
Location: UK
x 2
Contact:

Post by P »

1 :

In fact for the lightmap i see 2 possibilities :

A : you consider the lightmap is a simple one, this way you can use the same lightmap for all the differents combinaison of textures appied to the scene. So yes only 1 lightmap for several texture combinaisons, which is applied using multitexturing.

B . you consider the lightmap is an advanced one, which is what you ll probably need if you want a photorealistic rendering.
The lightmap which is rendered into your 3D soft will here take care while rendering it (into blender for exemple), of almost all the surfaces parameters ( like color, diffusion, microbumps, reflection, specularity etc.... ) . In fact almost all surface parameters will have an impact on the generated lightmap. So to sum up, if you have planned to play with complex surface parameters into the 3D soft and really want to achieve a photorealistic rendering, you ll have to generate 1 lightmap per scene, and per texture combination.

If you are using lightmaps i assume even the lights are static. Why not rendering the lightmap and the surface color into only 1 surface ? In fact rendering all into one (or severals) texture(s). If you want a photrealist rendering, your lightmap will have to be i think the same resolution of the base texture applied to the scene.

But if you have planned to make textures repeat instead of using a global one for the whole scene (in order to reuse textures) you can use 1 uv for the color textures, and 1 for the lightmap which will be a global one. And you will blend them at realtime using multitexturing.

2. i don t know.

3. i m not sure to see the need of render to texture here. For reflections ? For rendering the scene to the texture which will be exported ?

( i may be wrong on several things and my englih not enough good to explain well. Anyway what you are trying to do covers a HUGE area of discussions )
User avatar
DWORD
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 1365
Joined: Tue Sep 07, 2004 12:43 pm
Location: Aalborg, Denmark
Contact:

Post by DWORD »

In addition to what P wrote:

2: That's no problem.

3: I'm sure this has been done, but I don't know how. I think maybe there's a topic here on the forum describing how to do it.
ZombieWoof
Kobold
Posts: 28
Joined: Mon Apr 25, 2005 5:47 pm

Post by ZombieWoof »

huge ?? I hope not

ok.. simple example: a room with a bed, a chair, and a table... I want to be able to have one texture on the bed cover , another on the chair fabric (from a jpg or tiff, no fancy materials involved at all, no bump maps or specularity, or if complex materials are used, they are the same no matter which texture is applied)

default textures for the wall, table, floor, etc would already be in place (and possible to be modified before rendering just like any other texture in the scene)

having assigned these textures.. I want to render it out to high res JPG and deliver the rendering to a web browser .. and this has to happen in a matter of seconds... at most a minute from the time a scene/texture combo is requested, until the rendered image is shown in the browser.

I had thought that lightmapping was just an additive effect on the texturing, controlling the per-pixel brightness without regard to the actual texture .. am I even close here ??
P
OGRE Expert User
OGRE Expert User
Posts: 421
Joined: Fri Jan 07, 2005 9:49 pm
Location: UK
x 2
Contact:

Post by P »

Well when i said huge i was thinking about the photorealistic rendering of a scene. It s a huge topic in non realtime 3D and probably even more huge in realtime 3D. You can do what you are speaking about, keeping it in a simple way, but you'll not get a photorealistic rendering. Just saying it again cuz it seems it was your goal, but i understand now you were speaking about a good lighting effect instead of photorealism.

You are right, lightmaps are only a per-pixel brightness effect, but they can be colored too, cuz lights are not always white. I m not sure about what you mean by additive, here i think it s a multiply operation of the color texture with the lightmap one.

( again i may be wrong, i m not experienced... )
Vectrex
Ogre Magi
Posts: 1266
Joined: Tue Aug 12, 2003 1:53 am
Location: Melbourne, Australia
x 1
Contact:

Post by Vectrex »

well if it's just a static photo scene couldn't it be a 2d picture with alpha to show through to the texture (alpha could take shadows into account). Then behind the alpha part just have some primitive shapes that generally follow the perspective of the object and change that. Makes for easy picking and texture changing :) In fact you could do that in Flash :twisted:
ZombieWoof
Kobold
Posts: 28
Joined: Mon Apr 25, 2005 5:47 pm

Post by ZombieWoof »

ohh no -- definitly 3D and must be able to render same scene from different camera points

though I guess it could be done with shockwave 3d.. but not with near as good a quality
User avatar
sevensevens
Gnoblar
Posts: 21
Joined: Sat May 07, 2005 4:41 am

Post by sevensevens »

If you want photo realism, you probably end up writing your own functions and classes for refractions, photon mapping, ect. If you want to see what you're getting into, Pov-Ray(http://www.povray.org/) seems similar to what you might be doing.
P
OGRE Expert User
OGRE Expert User
Posts: 421
Joined: Fri Jan 07, 2005 9:49 pm
Location: UK
x 2
Contact:

Post by P »

There are a very good Raytracing engine which is called yafray

Maybe look at it, if you want to use this kind of stuff you ll not be able to do realtime rendering, it ll take more time, mostly depending on the final quality
ZombieWoof
Kobold
Posts: 28
Joined: Mon Apr 25, 2005 5:47 pm

Post by ZombieWoof »

its looking a lot like the customer wants raytracing quality, but exactly what they are asking for is that it not look cartoony.... but thats more an issue of models and textures rather than rendering system

the scenes are fixed, so the only things that change are the materials/textures

raytracing is overkill if thats all thats changing.... good models and a detailed high res lightmap should be able to handle the situation.

or am I outa my flippin' mind ??
RoundSparrow
Greenskin
Posts: 145
Joined: Wed Jan 19, 2005 4:36 am
Location: Arica, Chile

Post by RoundSparrow »

I think rendeirng / raytracing is the only way to get really good results.

Particularly on edges, Ogre has a hard time and depends on hardware AA from what I've seen... An offline "slow renderer" like Blender does a much better job.

Are you just doing this once and capturing the output? I would consider a good 64-bit system, maybe even multiple CPU's... depends how much you are working / developing on it :) Or some type of distributed system.

If you are serious about this project we are also looking into this. If we can match up ogre world coordinates with an offline renderer to produce the same scene. Contact me...
Looking to hire people working out of their home to do C++ Ogre programming. Blender artists also wanted. Looking for long-term relationships. PM on forums or contact via AIM or email Art@Arica3D.com
ZombieWoof
Kobold
Posts: 28
Joined: Mon Apr 25, 2005 5:47 pm

Post by ZombieWoof »

this is for an on demand one-shot service -- external app will pass in the scene id and a list of material/texture settings to use for the render, and get back a single image to be displayed to the user

even if it were raytraced, required delivery rate doesnt require more than a dual xeon system... if It can be done with ogre.. there is no reason that he system cant deliver an image every second easily :)

just to go over it one more time -- a scene, likely with upwards of 100k verts (high poly models) that will get loaded once, its materials set from external input, and rendered once at high resolution (1024x768 or better), then the materials changed, render again, and so on

frame rate is not an issue -- if it took 5-10 secs to render, it wouldnt bother me at all... but I seriously doubt that would happen if the vid card is up to handling that detailed a scene.... and the higer end cards do millions of verts per second
Post Reply