Crystal Space
Welcome, Guest. Please login or register.
October 20, 2014, 07:05:48 pm

Login with username, password and session length
Search:     Advanced search
9010 Posts in 2044 Topics by 8764 Members
Latest Member: Alinwite
* Home Help Search Login Register
  Show Posts
Pages: [1]
1  Crystal Space Development / Game Content Creation / Re: Dynamic Reflection on: October 29, 2008, 10:21:33 pm
So, is there anyone around who could give a quick rundown on the render manager, documentation doesn't seem to exist yet (what it does, how to hook into and use it besides the default code found in simpmap tutorial etc)

Also, what do I have to do to a cg shader to use it in crystalspace?
EDIT: Just found the Shader 101 tutorial on tutorials page

Thanks in advance.

P.S: This is drifting more into the support forum, if any mods feel it necessary to move feel free (I don't think I can)
2  Crystal Space Development / Game Content Creation / Re: Dynamic Reflection on: October 27, 2008, 04:55:18 am
Thanks for the reply,

I am currently set up on the latest svn version (as of this morning) and am able to render the basic view, similar to blender's textured mode. Setting different shaders in blender2crystal seems to have absolutely no effect however I take it there is a way to fix this.

Would I be right in thinking that if the engine can do the calculations for a reflection it can apply a texture as well, so that the UV mapped texture assigned to the mesh provides a base colour (similar to the effect of setting up ray mirror in blender)

Thanks in advance
3  Crystal Space Development / Game Content Creation / Dynamic Reflection on: October 25, 2008, 09:57:47 pm
Hi all,

For my current project I want to produce some genmeshes from blender with reflective shaders, so they look like they have been painted with glossy paint

Using blender2crystal I have applied the stat_dyn_reflect shader along with a mask and cubemap however ideally I would like to reflect the surrounding environment, changing the reflected surface as the mesh moves (which it does very rapidly for 50 frames). Is there an easy way to do this such as a shader I have missed or would I be better off sticking with stat_dyn_reflect? Alternately, could I animate the reflection texture and start it when the mesh begins to move?

Thanks in advance
4  Crystal Space Development / Support / Re: Absolute camera rotation problem on: June 28, 2008, 05:53:40 pm
Thanks for the help, turns out it was the other camera rotation code, removing it solves the problem.
5  Crystal Space Development / Support / Re: Absolute camera rotation problem on: June 27, 2008, 04:57:19 pm
Thanks, but oddly using this code:
Code:
csRef<iCamera> camera = view->GetCamera();
csOrthoTransform ot = camera->GetTransform();
ot.LookAt (csVector3(-2.3441e-007,-0.445272,0.895396), csVector3(-1.17205e-007,0.895396,0.445271));
camera->SetTransform(ot);
still doesn't do anything at all. I know that the program executes the code but it seems to ignore it. I would guess that I have missed a command that actually forces the change to be drawn to the screen. If it is any help the rest of the code is based on the Simple apps, and this routine is executed by pressing the control key, based on the OnKeyboard routine in Simple1. This is the whole of this camera move routine, there are no other commands to, for example, update the camera (I don't know if this is needed)

Thanks in advance.
6  Crystal Space Development / Support / Absolute camera rotation problem on: June 26, 2008, 04:14:14 pm
Hi,

For the application I am developing I want to be able to move the camera to a specific point and orientation at a certain time (think similar to a cut-scene). I can find the locations and vectors by using blender2crystal but I don't understand how to actually cause the rotation to take place.

At the moment I can load and move the camera around but my attempts to change orientation are ignored (more likely I have forgotten some code). Here is the code I am currently using:

Code:
        csRef<iCamera> camera = view->GetCamera();
csVector3 camera_pos (0,0.367063,6.75359);
csRef<iCameraPositionList> camposlist = engine->GetCameraPositions ();
csRef<iCameraPosition> campos = camposlist->FindByName("MainCam");
campos->SetForwardVector(csVector3(-2.3441e-007,-0.445272,0.895396));
campos->SetUpwardVector(csVector3(-1.17205e-007,0.895396,0.445271));
campos->SetPosition(camera_pos);
campos->Load(camera,engine);

What happens is when this is triggered the camera moves to the position set but maintains the orientation it was on before it was moved, instead of moving back to point in the direction entered in code.
I also tried using the lookat() function like this:
Code:
        csOrthoTransform ot = camera->GetTransform();
ot.LookAt (csVector3(-2.3441e-007,-0.445272,0.895396), csVector3(-1.17205e-007,0.895396,0.445271));
ot.GetFront ().Set(csVector3(-2.3441,-0.445272,0.895396));
ot.GetUp ().Set (csVector3(-1.17205,0.895396,0.445271));
camera->SetTransform(ot);
but this has exactly the same effect, no rotation.

If it helps I am using CS 1.2 on Visual Studio 2008, running Windows Vista (not SP1), the version of winlibs that goes with 1.2 and a ATI x1600 video card.

Thanks in advance.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 3.313 seconds with 17 queries.