border for mesh Topic is solved

Problems building or running the engine, queries about how to use features etc.
Post Reply
mgs_oleg
Gnoblar
Posts: 20
Joined: Fri Mar 30, 2018 8:24 pm
x 1

border for mesh

Post by mgs_oleg »

Hi All,

Can someone advice if there is possibility to set borders color for my mesh programatically?
If not, then what is the choices and how to do it ?
(mesh it loaded from file: cube.mesh)
Thanks
UPDATE:
To be more precies I need to have border on each of the cube sides (but not an triangles inside, just rectangles)

Using this material script does not work

Code: Select all

material BordersForCube
{
	// Vertex program waving grass
    technique
    {
        pass
		{
            texture_unit
            {
		colour_op_ex source1 src_manual src_current 1.0 0.0 0.0
                tex_address_mode clamp
                tex_border_colour 1 1 1 1
            }
        }
    }
} 
I certainly doing something wrong , but not sure what....
hyyou
Gremlin
Posts: 173
Joined: Wed Feb 03, 2016 2:24 am
x 17
Contact:

Re: border for mesh

Post by hyyou »

I don't think neither Ogre (or any graphic engine) can do it nor should support it (at its core level), because it is very custom.

I will guess other alternatives :-
- create you own border texture, map UV yourself, and use it as an additional pass / additional entity
- create cylinder-like shape and draw it as lines at the border
- pass additional per-vertex attribute and use it to calculate borderness in shader.
mgs_oleg
Gnoblar
Posts: 20
Joined: Fri Mar 30, 2018 8:24 pm
x 1

Re: border for mesh

Post by mgs_oleg »

thanks hyyou,
may I ask you some assistance - I am really new to all of thsese and not really sure how to proceed with first option on texture mapping
hyyou
Gremlin
Posts: 173
Joined: Wed Feb 03, 2016 2:24 am
x 17
Contact:

Re: border for mesh

Post by hyyou »

Did you try Blender(free - recommended), Maya, or 3DSMax?
In those program, I have to create a model and do UV map. The process is quite different for each program.
After that, I export my model to Ogre's .scene/.xml.
Then, I convert it to .mesh using "OgreXMLConverter".
Finally, it can be imported to Ogre via C++ code.

An non-recommended alternative is to create ManualObject in Ogre.
paroj
OGRE Team Member
OGRE Team Member
Posts: 1995
Joined: Sun Mar 30, 2014 2:51 pm
x 1075
Contact:

Re: border for mesh

Post by paroj »

alternatively take a look at the edge part of the CelShading sample
mgs_oleg
Gnoblar
Posts: 20
Joined: Fri Mar 30, 2018 8:24 pm
x 1

Re: border for mesh

Post by mgs_oleg »

Thank you all.
You help me a lot.
I've sorted this in Blender(first time usage was hard one, but I did it :) )
Post Reply