Search found 1119 matches

by scrawl
Fri Aug 12, 2016 1:59 pm
Forum: Ogre 2.0+
Topic: [2.1] MyGUI renders darker vs 1.9
Replies: 15
Views: 1218

Re: [2.1] MyGUI renders darker vs 1.9

Ok, so after a play around with SDL2, it seems that I cannot enable mouse trap/grab, whatever you want to call it, basically I need the mouse to stay locked to the window (Birds-eye style camera control, cursor at edge == camera movement). While latest SFML source has that functionality built in, 1...
by scrawl
Wed Aug 10, 2016 1:52 am
Forum: Help
Topic: [SOLVED] Understanding the materials
Replies: 6
Views: 750

Re: Understanding the materials

Change the scaling on the texture unit.

http://www.ogre3d.org/docs/manual/manual_17.html#scale
by scrawl
Wed Aug 10, 2016 1:48 am
Forum: Help
Topic: [solved][2.1] nice quality render Entity with alpha channel
Replies: 7
Views: 656

Re: [2.1] nice quality rendering Entity with alpha channel

Question 1. How to render same entity 2 times? i.e. Should I create 2 entity instead? (i.e. encapsulate Ogre) - When I change attribute of an entity, I have to set attribute of another entity too. or... can I render 1 entity to 2 RenderQueue with slightly different in blending/shader's setProperty(...
by scrawl
Mon Apr 18, 2016 3:56 am
Forum: Using OGRE in practice
Topic: Optimizing Per-Pixel Point Lights
Replies: 6
Views: 1430

Re: Optimizing Per-Pixel Point Lights

Looks good. Note you could save yourself the hassle of copy/pasting the lighting code for each light. Just use the _array variant of the lighting parameters and a for loop.
by scrawl
Thu Apr 14, 2016 3:29 pm
Forum: General Discussion
Topic: Shader editor
Replies: 1
Views: 782

Re: Shader editor

QtCreator supports syntax highlighting and auto completion for GLSL. Is that what you want or is there anything else you want the shader editor to do?
by scrawl
Thu Apr 14, 2016 1:57 pm
Forum: Help
Topic: Projection/View matrix 'flipping' help!
Replies: 6
Views: 475

Re: Projection/View matrix 'flipping' help!

Can you flip the sampling from the cubemap instead of flipping the rendering itself? Or, you could apply the flip to the camera's view matrix (enableReflection), this way the scene manager should automatically invert the vertex winding for you. https://bitbucket.org/sinbad/ogre/src/96b68716870e1bf05...
by scrawl
Mon Apr 04, 2016 10:21 pm
Forum: Ogre 2.0+
Topic: Regarding particles
Replies: 21
Views: 2490

Re: Regarding particles

Just make sure you set the datablock by name and not by pointer (the explanation is on repeated on several forum posts regarding particles and billboards). Does a datablock know its own name? If it does, maybe we could avoid this issue in the following manner: void Renderable::setDatablock(Databloc...
by scrawl
Wed Mar 23, 2016 5:10 pm
Forum: Help
Topic: Ogre2.0, iOS. Field has incomplete type
Replies: 2
Views: 198

Re: Ogre2.0, iOS. Field has incomplete type

Sounds like OgreParticle.h is missing an include of OgreMath.h and OgreColourValue.h.
by scrawl
Tue Mar 22, 2016 2:30 am
Forum: Using OGRE in practice
Topic: Shadow on semitransparent receiver
Replies: 3
Views: 1071

Re: Shadow on semitransparent receiver

Unfortunately the shadow is not only where it should be (the correct side of the mountain), but also partially on the other side of the mountain. When I run it with texture additive, the whole entities are darker without lit. This is to be expected with fixed-function texture shadows. The shadow ma...
by scrawl
Wed Mar 16, 2016 1:23 pm
Forum: Help
Topic: How to get world coordinate of vertex in vertex shader
Replies: 2
Views: 321

Re: How to get world coordinate of vertex in vertex shader

Use the worldMatrix auto parameter and multiply the gl_Vertex with it.
by scrawl
Fri Mar 04, 2016 9:53 pm
Forum: Help
Topic: [SOLVED] HLSL shader Phong shading specular object all white
Replies: 14
Views: 1124

Re: HLSL shader Phong shading specular turning object all wh

VertexShaderInput.position is the object space position. I suppose this line output.pixelPos = output.position.xyz; should be output.pixelPos = input.position.xyz; and this float3 viewVector = normalize(cameraPos - mul(input.pixelPos, world).xyz); should be float3 viewVector = normalize(cameraPos - ...
by scrawl
Fri Mar 04, 2016 3:40 pm
Forum: Help
Topic: [SOLVED] HLSL shader Phong shading specular object all white
Replies: 14
Views: 1124

Re: HLSL shader Phong shading specular turning object all wh

Your viewVector is wrong. From the cameraPos in object space you are subtracting pixelPos (in world-view-projection space, then multiplied by world, i.e. in world-view-projection-world space. WTF?). Instead you want to take the object space camera position and subtract the object space pixel positio...
by scrawl
Mon Feb 29, 2016 12:18 pm
Forum: Developer talk
Topic: which version I should choose?
Replies: 16
Views: 2580

Re: which version I should choose?

you can see the status of GL3Plus in 1.10 here. Some of these look very close, only the lighting is ever so slightly different, resulting in the test to fail. I wonder, does the RTTS perform light clamping? You'll need to do something like lighting = clamp(lighting, 0.0, 1.0); for compatibility wit...
by scrawl
Thu Feb 25, 2016 5:45 pm
Forum: Help
Topic: How to mask shadow ?
Replies: 1
Views: 221

Re: How to mask shadow ?

Try to change the mask on the shadow camera's viewport.

Code: Select all

TexturePtr shadowTexture = mSceneMgr->getShadowTexture(0);
Viewport* vp = shadowTexture->getBuffer()->getRenderTarget()->getViewport(0);
vp->setVisibilityMask(mask);
by scrawl
Thu Feb 25, 2016 11:17 am
Forum: Showcase
Topic: Stunt Rally - version 2.6
Replies: 125
Views: 98280

Re: Stunt Rally - version 2.6

Hi, I think you have mixed headers (Ogre 1.8 + 1.9) in your /usr/local. OgreOverlay.h should be in OGRE/Overlay/OgreOverlay.h not OGRE/OgreOverlay.h. The OGRE/OgreOverlay.h must be a leftover from Ogre 1.8 or an earlier version. I would remove the /usr/local/include/OGRE, reinstall Ogre 1.9 and try ...
by scrawl
Fri Feb 19, 2016 11:28 pm
Forum: General Discussion
Topic: New website
Replies: 60
Views: 3930

Re: New website

I like the new website, very clean. The only thing that bothered me is how the header bar / Ogre logo resizes itself when you scroll up/down.
by scrawl
Wed Dec 09, 2015 3:51 pm
Forum: Help
Topic: Pre-baking shadows
Replies: 0
Views: 556

Re: Pre-baking shadows

Look up 'light mapping'. The Ogre terrain component supports light mapping, but it only works for shadows cast by the terrain itself not shadows cast by objects on the terrain.
by scrawl
Thu Dec 03, 2015 6:57 pm
Forum: Ogre 2.0+
Topic: Shadow cast by transparent objects.
Replies: 6
Views: 1020

Re: Shadow cast by transparent objects.

I've done it before by writing the depth buffer manually in the pixel shader and writing depth = farDist depth to those fragments that should not cast shadow. It's better to discard; so that no fragment at all is written. If you write the farDist, you might overwrite shadows of other objects betwee...
by scrawl
Sat Nov 28, 2015 5:18 pm
Forum: Developer talk
Topic: Ogre 1.10 fork on github
Replies: 47
Views: 9374

Re: Ogre 1.10 fork on github

I haven't used Ogre in a while, but I'm watching the development out of interest. I agree the maintenance of 1.10 and the general handling of pull requests has fallen into disrepair a bit. If the current Ogre team does not have the time or expertise to merge such requests, perhaps its time to take o...
by scrawl
Sun Nov 22, 2015 3:59 pm
Forum: Help
Topic: [SOLVED] ogre 1.9 - 2.0 source version GLSL error
Replies: 6
Views: 694

Re: ogre 1.9 source version GLSL error

Code: Select all

            texture texture GreenSkin.jpg 2d
should be

Code: Select all

            texture GreenSkin.jpg 2d
by scrawl
Tue Nov 10, 2015 2:39 am
Forum: Help
Topic: [SOLVED] Ogre::SharedPtr Copy Constructor & operator=
Replies: 7
Views: 2006

Re: [SOLVED] Ogre::SharedPtr Copy Constructor & operator=

Easier way:

https://bitbucket.org/sinbad/ogre/src/5 ... ites.h-346

Code: Select all

    typedef SharedPtr<XMLResource> XMLResourcePtr;
by scrawl
Mon Nov 09, 2015 1:44 am
Forum: Using OGRE in practice
Topic: loop calculations
Replies: 2
Views: 661

Re: loop calculations

I believe inactive lights have their colors set to (0,0,0,0) so they have no effect on the output color. At least I've always done it that way without checks for inactive lights, that works fine.
by scrawl
Thu Oct 22, 2015 1:33 am
Forum: Using OGRE in practice
Topic: Ogre vs. OSG vs. G3D
Replies: 3
Views: 2590

Re: Ogre vs. OSG vs. G3D

Thanks Zonder, I noticed quite a lot of traffic coming from here, which leads me to write a follow up post if people are really that interested :) Please have a look at my latest post here: Ogre3D vs. OpenSceneGraph
by scrawl
Mon Oct 19, 2015 9:23 pm
Forum: Using OGRE in practice
Topic: Development Video - Visual Studio - C++
Replies: 2
Views: 1186

Re: Development Video - Visual Studio - C++

Very cool idea, unfortunately the audio is lagging badly in the coding segments.
by scrawl
Fri Sep 25, 2015 8:37 pm
Forum: Help
Topic: [Solved] CG Shader Time
Replies: 2
Views: 403

Re: CG Shader Time

You could do:

Code: Select all

Ogre::ControllerManager::getSingleton().setElapsedTime(0.f);
But note, that will reset the time for all shaders.