Crystal Space
Welcome,
Guest
. Please
login
or
register
.
May 21, 2013, 03:11:38 pm
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
9224
Posts in
2230
Topics by
5383
Members
Latest Member:
genevakcarter
Crystal Space
Crystal Space Development
Support
Problem about rendering portal in screen
« previous
next »
Pages:
[
1
]
Author
Topic: Problem about rendering portal in screen (Read 3646 times)
Jr. Member
Posts: 81
Problem about rendering portal in screen
«
on:
February 10, 2009, 09:30:11 am »
hi, I am new in CS.
I have built a simple map with two rooms and one portal. The question is :
1) If I want to render the meshes which can be seen through the portal to screen only, and do not render other meshes, how can i do?
2) we know that before the context renders to screen, it is stored in buffer, but how can i get the buffer which store the next frame data?
Please help me!!!
Logged
jorrit
Administrator
Hero Member
Posts: 1703
Re: Problem about rendering portal in screen
«
Reply #1 on:
February 10, 2009, 09:36:36 am »
Quote from: link=topic=1846.msg8178#msg8178 date=1234254611
hi, I am new in CS.
I have built a simple map with two rooms and one portal. The question is :
1) If I want to render the meshes which can be seen through the portal to screen only, and do not render other meshes, how can i do?
What do you mean exactly? I don't understand what you're trying to do here.
Quote
2) we know that before the context renders to screen, it is stored in buffer, but how can i get the buffer which store the next frame data?
Please help me!!!
What version of CS are you using?
Greetings,
Logged
Jr. Member
Posts: 81
Re: Problem about rendering portal in screen
«
Reply #2 on:
February 10, 2009, 10:07:38 am »
the CS version is 1.0rc1_004.
I want to render the charcoal grey part to screen, and do not render other part.
Logged
jorrit
Administrator
Hero Member
Posts: 1703
Re: Problem about rendering portal in screen
«
Reply #3 on:
February 10, 2009, 10:11:00 am »
1.0 is ancient. Please do not use that version. The latest stable release is 1.2. It is *strongly* recommended you upgrade.
Also in all stable releases of CS, contents of portals are not rendered on a buffer. So what you want to do is not possible that way. In 1.9 (unstable release) a buffer can be used. In version 1.2 you can render on a texture though so perhaps you can do it like that.
Your image is simply chinese text. I don't understand what you want to say with that?
Greetings,
Logged
Jr. Member
Posts: 81
Re: Problem about rendering portal in screen
«
Reply #4 on:
February 10, 2009, 10:23:30 am »
Logged
Jr. Member
Posts: 81
Re: Problem about rendering portal in screen
«
Reply #5 on:
February 10, 2009, 10:25:25 am »
I want to render the charcoal grey part to screen, and do not render the other part which can be seen also.
Logged
jorrit
Administrator
Hero Member
Posts: 1703
Re: Problem about rendering portal in screen
«
Reply #6 on:
February 10, 2009, 10:26:57 am »
Quote from: link=topic=1846.msg8182#msg8182 date=1234257810
Ok, what you want to do is automatic with portals. Nothing special to do.
Greetings,
Logged
jorrit
Administrator
Hero Member
Posts: 1703
Re: Problem about rendering portal in screen
«
Reply #7 on:
February 10, 2009, 10:28:18 am »
Quote from: link=topic=1846.msg8183#msg8183 date=1234257925
I want to render the charcoal grey part to screen, and do not render the other part which can be seen also.
aha ok. In that case just create a new portal at exactly the same location in a new sector. Make that
new sector empty and put your camera there so it looks through the new portal.
Greetings,
Logged
Jr. Member
Posts: 81
Re: Problem about rendering portal in screen
«
Reply #8 on:
February 10, 2009, 10:46:55 am »
In CS, it will compute what the view point can see through the portal, and finally get an 2d picture, then rastering it to screen.
In my mind, before rastering the picture to screen every frame, the picture will store in buffer or somewhere, am I right?
if so, how can i get the buffer which store the picture?
I need the data which is stored in buffer is because I want to restering the picture in other place not the original place of portal, like rastering the picture to another wall of Room2 maybe.
Logged
jorrit
Administrator
Hero Member
Posts: 1703
Re: Problem about rendering portal in screen
«
Reply #9 on:
February 10, 2009, 10:56:10 am »
Quote from: link=topic=1846.msg8186#msg8186 date=1234259215
In CS, it will compute what the view point can see through the portal, and finally get an 2d picture, then rastering it to screen.
In my mind, before rastering the picture to screen every frame, the picture will store in buffer or somewhere, am I right?
if so, how can i get the buffer which store the picture?
I need the data which is stored in buffer is because I want to restering the picture in other place not the original place of portal, like rastering the picture to another wall of Room2 maybe.
No, that's not how it works. The contents of the portal is rendered directly on screen. There is no 2d picture being used in between. So there is no buffer. It all goes directly on screen.
You *can* render on another texture but you have to do it yourselves. CS doesn't use buffers for portals (at least in your version). You can use g3d->SetRenderTarget() to specify that you want to render something on a texture.
Greetings,
Logged
Jr. Member
Posts: 81
Re: Problem about rendering portal in screen
«
Reply #10 on:
February 13, 2009, 03:12:40 pm »
Sorry, I have not described what I want to do clearly before.
befor long, I red a book its name was "Tricks of the 3D Game Programming Gurus: Advanced 3D Graphics and Rasterization ". The writer was Andre LaMothe. According to his theory, a 3D pipeline include 10 step:
1. Local coordinates
2. Local to world transform
3. Object removel
4. Back face removal
5. World to camera transform
6. Object space clipping
7. Perspective transform (turn to 2d coordinate)
8. Image space clipping
9. Screen projection
10. Rasterize
In my opinion the 3D engine will do most of these steps every frame, and before it is rastered to screen, we will get a 2d picture which is ready to be rastered to screen, am I right? If so, it will store somewhere before it is rastered. I need to know where it is stored? How can I get these data.
Logged
jorrit
Administrator
Hero Member
Posts: 1703
Re: Problem about rendering portal in screen
«
Reply #11 on:
February 13, 2009, 03:18:33 pm »
No. As I told you before CS does NOT (by default) render first on a 2d picture. It uses OpenGL commands to render directly on the video card. There is no 2D picture first.
Greetings,
Logged
Jr. Member
Posts: 81
Re: Problem about rendering portal in screen
«
Reply #12 on:
February 13, 2009, 03:22:22 pm »
o , now I know what my problem is .
Thank you very much!!
Logged
Pages:
[
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Crystal Space Development
-----------------------------
=> General Crystal Space Discussion
=> Support
-----------------------------
Crystal Space Project Development
-----------------------------
=> Feature Requests
=> Plugins
=> Bug Reports
-----------------------------
Crystal Space Development
-----------------------------
=> Game Content Creation
-----------------------------
Miscellaneous
-----------------------------
=> Article/Tutorial Requests
=> Article/Tutorial Discussion
-----------------------------
Crystal Space Project Development
-----------------------------
=> Development Discussion
-----------------------------
Crystal Space Projects
-----------------------------
=> Project Discussion
=> WIP Projects
=> Finished Projects
-----------------------------
Associate Projects
-----------------------------
=> CEL Discussion
=> Crystal Core Discussion
=> CrystalBlend Discussion
-----------------------------
Crystal Space Project Development
-----------------------------
=> Google Summer of Code
-----------------------------
Associate Projects
-----------------------------
=> Apricot (Open Game)
=> Ares Project
Loading...