351

(23 replies, posted in General)

Hmm, very interesting, I think I get it now. Shortly before I decided to learn game design (The same day I joined the Maratis site) I was learning about Moulding and Casting. This sort of reminds me of a 3D mould.

I see now why they would be stored as in a collection to be reused. In fact, those greebles look like moulds.

Thanks for the info.

352

(19 replies, posted in Showcase)

Im curious as to what this does. Do I need to know C++ stuff?

353

(23 replies, posted in General)

Hmm, so a greeble is a combination of normal maps and displacement maps?

354

(2 replies, posted in Gossip)

Thanks for the link to the Paper. I wonder if there is a paper released on the Euclideon Engine. I'll have to check into that.

355

(7 replies, posted in General)

Okay, here is another discussion on making clothes for characters in a faster and easier way, sort of like marvelous designer.

All you need are:
A Vector Editing Program
Blender

1)The basic setup is to draw the shape of the clothing in your vector program.

2)Export it as SVG.

3)Import it into Blender.

4)Convert it from a curve to a MESH.

5)Duplicate the shape and drag it out.

6)Connect the seams of the outlines using the "F" key.

7)Cut holes out where you need them (delete faces).

8)Subdivide the mesh a few times (so that it can have good physics).

9)Make it a CLOTH.

10)Make sure to enable SELF-COLLISION.

To make it work with a character, make sure the character is set as a COLLISION object. When you press PLAY on the timeline, the cloth will animate. You then scrub the timeline and choose a nice spot, then APPLY the cloth modifier (the cloth will freeze at that pose)

You can also use VERTEX GROUPS to constrain certain vertices.

The time it took for me to make simple shirt was only about 1-2 minutes.

Okay, here is a dress done in about 3 minutes(more vertices)
PunBB bbcode test

And with a tiled  texture
PunBB bbcode test

For anyone wondering what Marvelous Designer is:
http://www.youtube.com/watch?v=eY--c4YTlo4

356

(23 replies, posted in General)

Haha, you must have been typing as I was editing this. haha. I did it.

357

(23 replies, posted in General)

My first attempt is a winner!

Steps:
Create a two planes of the same size.

Move one above the other

Subdivide the bottom one a bunch

Add a displace modifier to it and use your bark image as the displacement texture(has to be loaded and should be black and white). Now your subdivided plane should have more geometry similar to the image. Apply the modifier.

Select the high poly mesh and then shift-select the low poly mesh.Create bake the normal maps from this high-poly geometry to an image.  Also, make sure to use SELECTED TO ACTIVE under the render tab so that the selected high poly mesh gets baked to the low poly's UV coordinates.

Apply them to the low-poly plane (Make sure NORMAL MAP is selected under Image sampling in the texture slot).

Using several normal maps (one for smaller details and another for larger details) ads depth to the texture.
PunBB bbcode test

This model is only ONE POLYGON

Meshes must be UV unrapped, and I used PROJECT FROM VIEW to keep the mapping identical.

358

(23 replies, posted in General)

I am trying to think of a way to create a realistic model from a photo. As for buildings, Sketchup's MATCH PHOTO feature is good.

Usually, you have to have an image from several angles of a photo. However, as I posted in the gossip section, there is a company that was able to do it using some fancy software they made.

But I am wondering if there are some modeling tricks or workflows to help me get it up and working faster.

I know there is a program called 123dCatch by autodesk for the ipad that can capture an image in 360 degrees and stitch it into a 3d model, but the quality is bad (have to have things just right).

If 3d modeling were more like drawing, then it would be easy (reason why sketchpup works)

When I arrive at the answer(going to try to arrive today) I will post it here.

Edit: Okay, So far I have the idea to use a displacement map and a normal map

Say for instance I want to make a tree. I create displacement for the bark using a displacement map for bark of a tree. Then I render a normal map from the high poly mesh. Then I create a basic tree And apply the normal map. Then I switch out textures. If I make the normal map a tiled texture it should be okay for basic things.

I am going to try this one out.

359

(3 replies, posted in Scripting)

I am tired of C++ rearing it's ugly head! haha. I wish someone would make a very easy to understand tutorial on C++ (Seen plenty, but not one that is good enough for my simple mind.).

I have no idea what you just typed actually, but I guess if I decide to try C++ again, I will be able to refer to this post.

I have a feeling that the reason I don't know what is going on in C++ when I see someone else's code is that the way people write their code might be confusing.

Having variables named:

c=

a_cinq=

etc. haha.

I am surprised I was able to run a game in full screen by creating a .bat file. haha.

Thanks 255.

360

(2 replies, posted in Gossip)

Wonder if anyone saw this demo:

https://www.youtube.com/watch?v=Oie1ZXWceqM

This thing is probably going to cost a fortune.

361

(3 replies, posted in Scripting)

I know how to use the dofile() function to access lua functions from another file, but how would I go about using external libraries not my own? Are there any limitations? Seeing as this is a game engine, might some of the functions not work?

For instance, there is a library called GLua, and I quote:

''GLua] (5.1) - a library with classes and functions useful for scripting OpenGL applications, particularly prototyping GLSL shaders. Pure Lua."

How would I use it?

Edit, well, after looking through the site I found that quote, it says actually noted that Maratis does not fit to Libraries and Bindings (whatever that means):

http://lua-users.org/wiki/LuaGraphics

What about GUI libraries?

362

(29 replies, posted in General)

So, my cousin was playing GTA5 and I'm looking at it like, "huh?" This is the ranted and raved about big box selling hit?
Mind you, I don't know much about the gaming industry right now, but if that is what sells, I know I can do that.
Zester, your terrain is much better than theirs. And they use flat planes for just about everything (I see where you get the image plane trick from).

I am seeing this on a 60" fancy tv too. So I boot up Maratis and play a few of my demos on it. Uh, even they look better. As for the animations, those are easy too.

I do understand however that the SCALE of the game is much bigger, so that may be why they use so many tricks.

Your terrain looks awesome compared to what I just saw. haha. And you keep the poly count down? Perhaps I should work on some horse BVH files? hehe

363

(5 replies, posted in Tutorials/Examples)

VeganDev wrote:

Game theory and game mechanics are what help you to establish a good "OORR WE DO": < I don't think OORR WE DO, is helping anyone not see this as spam.

I know TD ( only from the forums, not in real life), and  have no specific reason not to trust him at all, but I too won't be clicking.He/she would have no control over any spam that might come from this site, and given I 've never heard of this site, Im also resisting going to it. I have antispam here, but I'd rather avoid than attempt. NO offense TD, those are my real thoughts and have no bearing whatsoever, on what I think of you as a  helper for these forums.

It's great that you want to help others, but, I would vastly prefer you give us the original document URL, instead of giving us the information through your eyes, because you might not have understood all the relevant information. NO matter how smart someone is, does not prevent them from misunderstandings. I see this everyday, with my neighbor, so while thanks are in order for your attempt TD, I think we should have  the original document so we can view it ourselves in its original format/content.

https://www.youtube.com/watch?v=hZDxLi6Xc40
https://www.youtube.com/watch?v=GXdfU2DoF8o

2 hours worth of video.

364

(4 replies, posted in Gossip)

Vegas wrote:

Wow! pretty nice look and low frames number, that's great stuff, thank you wink

Thanks Vegas.

These two are Poser default walks. I am using them to practice myself so I can crank out a bunch of animations that newcomers can use right away. However, it is good to use bvhHacker to adjust some things. 

The way the joints oriented play a huge part in how Blender's 'Copy Rotation' works. It is sort of Rig-Specific.

365

(29 replies, posted in General)

Interesting, thanks Vegas. You are right zester, this would be frustrating. Gotta whoop Blender into shape. haha.

366

(4 replies, posted in Gossip)

I am going to start making a few bvh animations with Poser and posting them here. The ones with an asterisks are part of the Poser default library. The ones without it are what I created.   

Walking:
Walk Cool*
https://sites.google.com/site/aasfsfasa … k_Cool.bvh
Walk Sneak*
https://sites.google.com/site/aasfsfasa … _sneak.bvh

Idle:

Sitting:

Jumping:

Lying:

367

(10 replies, posted in Scripting)

I am working on making this an OOP library so that you can import it using dofile() so that your code won't be cluttered.

368

(0 replies, posted in Tutorials/Examples)

Did you know that you can use more than one script at the same time using the dofile() function?
http://wiki.maratis3d.org/index.php?title=Dofile

Did you know also that you can fake Object Oriented Programming in Lua?
http://forum.maratis3d.com/viewtopic.php?id=839

In this post, I will be documenting how I will use these two things to create a class library that you can import into any game:

The first thing I do is figure out what will be the names of my classes. I also comment on what the classes are used for.

CLASSES
function newAnimation()
function newCutScene()
function newCharacter()
function newProp()
function newMenu()
function newLevel()
function newSound()
function newLight()
function newMotion()
function newCloth()
function newSense()
function newCamera()

The next thing I do is make some psuedo-code to show how it can be used.

IMPLEMENTATION
cut_scene = newCutScene()
cut_scene:Commence()
cut_scene:Conclude()

level1 = newLevel()
level1:Launch()
level1:Finish()

prop1 = newProp()
prop1:Build(couch)
prop1:Destroy()

menu1 = newMenu()
menu1:Start()
menu1:End()

light1 = newLight()
light1:On()
light1:Off()

sound1 = newSound()
sound1:Play()
sound1:Stop()

animation1 = newAnimation()
animation1:Begin()
animation1:End()

character1 = newCharacter()
character1:Live()
character1:Die()

camera1 = newCamera()
camera1:Roll()
camera1:Cut()

Notice how I used SYNONYMS and ANTONYMS to distinguish the class functions from one another. This is my Class Template:

TEMPLATE
--[[Class Template
    function Person(name,age)
            local object = {}
            
            object.name = name
            object.age = age
            
            function object:sayName()
                print (object.name)
            end    
                
            return object
        end

--Create Joe
local joe = Person("Joe",24)

--Create Bill
local bill = Person("Bill",25)

--Print Joe's name
print (joe.name)

--Make Bill say his name
bill:sayName()]]

I am going to use this template to turn these classes into actual classes. But first, I am going to dig through the Maratis API to see what Maratis functions I can use to make these classes work like their title implies:
API

--CUTSCENE API
--changeCurrentCamera(object)
--getCurrentCamera()
--getCameraClearColor(object)
--getCameraFov(object)
--getCameraNear(object)
--getCameraFar(object)
--getCameraFogDistance(object)
--isCameraOrtho(object)
--isCameraFogEnabled(object)
--setCameraClearColor(object, {r, g, b})
--setCameraFov(object, fov)
--setCameraNear(object, near)
--setCameraFar(object, far)
--setCameraFogDistance(object, fogDistance)
--enableCameraOrtho(object, ortho)
--enableCameraFog(object, fog)
--enableCameraLayer(object, scene)
--disableCameraLayer(object)
--enableRenderToTexture(object, "textureName", renderWith, renderHeight)
--disableRenderToTexture(object)
--***getProjectedPoint(object, point)
--***getUnProjectedPoint(object, point)
--getScene("sceneName")
--getScenesNumber()

--ANIMATION API
--changeAnimation(object, animationId)
--setAnimationSpeed(object,speed)

--PROP API
--vec3(x, y, z)
--getObject(« objectName »)
--getParent(object)
--getChilds(object)
--getClone(object)
--setParent(object, parent)
--getName(object)
--activate(object)
--deactivate(object)
--isVisible(object)
--isActive(object)
--rotate(object, {x, y, z}, angle, "local")
--translate(object, {x, y, z}, "local")
--getPosition(object)
--getRotation(object)
--getScale(object)
--setPosition(object, {x, y, z})
--setRotation(object, {x, y, z})
--setScale(object, {x, y, z})

--MENU API
--setText(object , "text")
--getText(object)
--getTextColor(object)
--setTextColor(object, {r, g, b, a})
--getScene("sceneName")
--changeScene(scene)
--getCurrentSceneId()
--getScenesNumber()

--LEVEL API
--loadLevel("levels/myLevel.level")

--CHARACTER API (SubClass of Animation class?)
--vec3(x, y, z)
--getObject(« objectName »)
--changeAnimation(object, animationId)
--activate(object)
--deactivate(object)
--isVisible(object)
--isActive(object)

--LIGHT API
--getLightColor(object)
--getLightRadius(object)
--getLightIntensity(object)
--getLightShadowQuality(object)
--getLightShadowBias(object)
--getLightShadowBlur(object)
--getLightSpotExponent(object)
--setLightColor(object, {r, g, b})
--setLightRadius(object, radius)
--setLightIntensity(object, intensity)
--setLightShadowQuality(object, quality)
--setLightShadowBias(object, bias)
--setLightShadowBlur(object, blur)
--setLightSpotAngle(object, spotAngle)
--setLightSpotExponent(object, exponent)

--CAMERA API
--changeCurrentCamera(object)
--getCurrentCamera()
--getCameraClearColor(object)
--getCameraFov(object)
--getCameraNear(object)
--getCameraFar(object)
--getCameraFogDistance(object)
--isCameraOrtho(object)
--isCameraFogEnabled(object)
--setCameraClearColor(object, {r, g, b})
--setCameraFov(object, fov)
--setCameraNear(object, near)
--setCameraFar(object, far)
--setCameraFogDistance(object, fogDistance)
--enableCameraOrtho(object, ortho)
--enableCameraFog(object, fog)
--enableCameraLayer(object, scene)
--disableCameraLayer(object)
--enableRenderToTexture(object, "textureName", renderWith, renderHeight)
--disableRenderToTexture(object)
--getProjectedPoint(object, point)
--getUnProjectedPoint(object, point)

Now I am going to do one class at a time. I will do the most useful one first (refer to the template and API list) and fill it in with the neccessary API functions:

CREATE A CLASS
--Prop Class
    function newProp(x)
        local object = {}
        
        --Variables:
        prop = getClone(x)
        object.name = getName(prop)
        object.location = getPosition(prop)
        scale = 1
        object.scale = scale
        
        
        
        --Methods:
        function object:Build()
            activate(prop)
        end
        
        function object:Destroy()
            deactivate(prop)
        end
        
        function object:Scale(scale)
            setScale(prop, {scale, scale, scale})
        end
        
        return object
    end
chair = getObject("Chair")

chair1 = newProp(chair)
chair1.Build()
chair1.Destroy()
chair1.Scale(2)

Now I need to test this class out on an object...

--Prop Class
    function newProp(x)
        local object = {}
        
        --Variables:
        prop = getClone(x)
        object.name = getName(prop)
        object.location = getPosition(prop)
        scale = 1
        object.scale = scale
        
        
        
        --Methods:
        function object:Build()
            activate(prop)
        end
        
        function object:Destroy()
            deactivate(prop)
        end
        
        function object:Scale(scale)
            setScale(prop, {scale, scale, scale})
        end
        
        return object
    end
    
monkey = getObject("Monkey")
deactivate(monkey)

monkey1 = newProp(monkey)
monkey1:Build()
--monkey1:Destroy()
monkey1:Scale(2)
IT WORKS!

I named this file PropsClass.lua and put it in my scripts folder.
I created another empty file called Game.lua and put it in the same scripts folder.

If I want to use the class I wrote in the PropClass.lua file I just do it this way:

 dofile("PropClass.lua")

Then I can use it in the Game.lua file like this:

 
 dofile("PropClass.lua")

monkey = getObject("Monkey")
deactivate(monkey)

monkey1 = newProp(monkey)
monkey1:Build()
monkey1:Destroy()
monkey1:Scale(1)

369

(29 replies, posted in General)

Zester, how do you get those textures into maratis? I wish Maratis had an import for Image to plane (that retains alpha information.) it would be useful for menus and this type of thing (grass etc)

370

(3 replies, posted in Tutorials/Examples)

I just sent an email to anael to see if it is possible. Thanks.
This has been a neat adventure, learning programming and game development. I don't know how much longer I will do it, but I have learned a lot, and it may come in handy. I like to post tutorials so that other's who might want to learn can have an easier time.

I am not savvy enough like you and com3d and 255 and anael though, haha. I was hoping I could potentially get a job in it, but it seems people are so much further ahead than I am that I would not even have a chance. haha.

Thanks Zester. smile

371

(3 replies, posted in Tutorials/Examples)

WHAT IS A BOOLEAN?

A boolean is an offspring of a guy named George Boole. So any child of George Boole is a boolean. hahaha.

NO REALLY! WHAT IS A BOOLEAN?

A boolean is a DATA TYPE (a type of data) that has only two possible values, TRUE and FALSE.

WHAT IS A DATA TYPE?

Well, text is a type of data. A number is a type of data. Data is considered the building blocks of information, and we store information in the form of text/words and numbers/integers.

SO WHAT IS A BOOLEAN AGAIN?

A boolean is data that can only be one of two values, TRUE and FALSE, which are represented by the numbers 1 and 0 (1 is true, 0 is false)

WHAT ARE BOOLEANS USED FOR?

Booleans are used to ACTIVATE and DEACTIVATE stuff. It actually goes back to how computers work. A computer is just a bunch of electrical components at the end of the day, which are either ON or OFF depending on the flow of current.

Imagine you had a computer screen that was set up like this:

xxxxxxxxx
xxxxxxxxx
xxxxxxxxx

The resolution of your computer screen would be 9 by 3 Xs.

Each x represents a light bulb, and at any given time, some lightbulbs will be on, and others will be off. In fact, if these lightbulbs flicker fast enough, your screen will look like one solid color.

Using some very complex circuitry tricks you can control the way the Xs flicker.

These ONs and OFFs or 1s and 0s can be manipulated to create things like DISPLAYING PIXELS on your computer.

That is what a boolean is used for.

Say we have a variable:

light =

If we want to make it a BOOLEAN, we can either give it the value TRUE or the value FALSE. By default a light is off so:

light = false

What does this mean in our program? Well, that light = false! Nothing more.

But we can use this light variable to control things. We can use it with a CONDITIONAL STATEMENT to control when things happen:

lightBulb = getObject("LightBulb")

if light==false then
    setObjectIntensity(lightBulb,0)
end

So, as long as light = false, then the intensity of the lighBulb object will be 0.
But, as soon as we change the light boolean variable to TRUE, then we can can change the intensity to full brightness.

lightBulb = getObject("LightBulb")

if light==false and isKeyPressed("L")then
    setLightIntensity(lightBulb,1)
    light = true


elseif light==true and isKeyPressed("L")then
    setLightIntensity(lightBulb,0)
    light = false
    
end

So, this says that if light=false and you press the "L" key, set the intensity of the lightbulb object to 100%. Also, set light to true (now light=true and not false)

On the other hand, if light=true (it's true now because we made it true by pressing "L") and you press the "L" key, then set the lighbtbulb's intenstity to 0. Also, set light equal to false (so that if we press "L" again it will work, because light has to be equal to false for it to work).

This is how we can use booleans to TOGGLE

I always like to put these types of things into a nice little function:

light_1 = getObject("Light1")
light_2 = getObject("Light2")

function ToggleLight(object)
    if light==false and isKeyPressed("L")then
        setLightIntensity(object,1)
        light = true


    elseif light==true and isKeyPressed("L")then
        setLightIntensity(object,0)
        light = false
    end
end

Notice how I used an ARGUMENT so that I can make whichever light I put into the parenthesis able to turn on and off. Used like this:

ToggleLight(light1)
ToggleLight(light2)

Etc.

OTHER POSSIBLE USES OF BOOLEANS:

We can use booleans to have things happen based on a character's current state/emotion

george = getObject("George")

happy=false
sad=false
normal=true

function BeEmotional()
    if normal==true then
        changeAnimation(george,0)
        sad=false
        happy=false
    elseif happy==true then
        changeAnimation(george,1)
        normal = false
        sad=false
    elseif sad== true then
        changeAnimation(george,2)
        happy=false
        normal=false
    end
end

If I were to use Object Oriented Programming and a few ARGMENTS I could make this a bit easier to use and re-use.

I have been trying to make some sense of object oriented programming in LUA (since lua doesn't really have object oriented programming).

WHAT IS OBJECT ORIENTED PROGRAMMING?

Object Oriented Programming(OOP) is taking variables and turning them into Objects. An Object is a variable that has TRAITS and ABILITIES. OOP is used to simulate real life objects. If we had a variable named:

apple =

An apple can have several traits. It has a TYPE and a COLOR and a TASTE. Apples don't have very many abilities except BeEaten().
OOP allows us to assign traits and abilities to your apple and can be used like this:

print (apple.type)
print (apple.color)
print (apple.taste)
apple:BeEaten()

Apples belong to the class of FRUIT, and that is why apples can have a taste and a color and a type. All objects can be CLASSFIED this way. All of the traits of an apple are inherited from the general traits of a fruit.

This is how you create a class and object in LUA:

--New Player Class
        function Player(name)
            local object = {}

            --Traits
            object.name = name
            object.hit= false

            txt_score = getObject("ScoreText")

            --Abilities
            function object:ShowHitStatus()
                setText (txt_score,object.name .. " got hit!")
            end    
                
            return object
        end

--Create Joe
local joe = Player("Joe")

--Create Bill
local bill = Player("Bill")

--Print Joe's name
print (joe.name)

--Show Bill's hit status
bill:ShowHitStatus()

The PLAYER CLASS is just a function named Player(). What this function does is creates a table named OBJECT and then it returns the table.

HOW DOES RETURN WORK?

Well, when you put an apple into a Blend() function, the blender returns a chopped up apple. But you don't have to always make a function return something. You can just have the blender Blend() and not give you back a chopped up apple. But most of the time when you put some fruit into a Blender, you want to be able to get the result (a nice smoothie perhaps?)

So what is actually occuring is that we are making the Player() function EQUAL TO "object" When you put an apple into the blender you get a chopped apple.

regular apple + Blend() function = chopped apple

(That isn't real code. hehe)

So, if Player() = object then when we type:

local joe = Player()

We are saying that joe = object

and if joe = object, then joe.name = object.name

And inside of the Player() funtion we made object.name = name

Then we took that "name" variable and made it an ARGUMENT of the Player() Function

WHAT IS AN ARGUMENT?

Going back the Blend() function, we can Blend() an apple like this:

Blend(apple)

Or we can blend an orange:

Blend(orange)

Or we can blend paper:

Blend(paper)

The things we swtich in and out of the Blend() function are called arguments.

When you put an argument in the parentheisis of the function, it gets plugged in everywhere the argument is found in the function

Example:

function Add(x,y)    
        result = x+y    
        return result
end

Add(1,2)

The 1 get's plugged in where the x is. The 2 get's plugged in where the y is.

Add(1,2)

should return 3

Add(978,562)

should return 1540

So, in our example of the Player() function, "name" is an argument, and whatever we plug in

Player(_here_) 

gets put:

function Player(_here_)
        print(_here_)
        setText(Text0,_here_)
end

and whatever/wherever else.

Here is the Class again:

--New Player Class
        function Player(name)
            local object = {}
            
            object.name = name
            object.hit= false
            txt_score = getObject("ScoreText")
            
            function object:ShowHitStatus()
                setText (txt_score,object.name .. " got hit!")
            end    
                
            return object
        end

--Create Joe
local joe = Player("Joe")

--Create Bill
local bill = Player("Bill")

--Print Joe's name
print (joe.name)

--Show Bill's hit status
bill:ShowHitStatus()

Functions work the same way. If bill = Player() and Player() = object (returns object) then object:ShowHitStatus = bill:ShowHitStatus.

Now that we have a PLAYER CLASS we can make any variable a PLAYER. And just by making them a PLAYER they will obtain the TRAITS and ABILITIES that every other PLAYER OBJECT has.

sarah= Player("Sarah Williams")
francais = Player("Francais Smith")
margret = Player("Margret Sachel")
sarah:ShowHitStatus()
francais:ShowHitStatus()
margret:ShowHitStatus()

373

(5 replies, posted in General)

I tried this myself, and I just want to clarify it a bit more. This is for windows:

1) Publish your game

2) In that published folder create a new text file that has the same name as your game's exe file.For example, if your game's exe is called Mario.exe create a text file called Mario.

Open the text file and type:

Mario.exe "" 1024 768 1 

This will make your game display at 1024 x 768. You can make it whatever you want.

Now save this text file as a .bat file.
(Change the file type from .txt to ''any file'', and type Mario.bat.)

That's it.
When you run the game, don't run it using the Mario.exe file, run it using the Mario.bat file

374

(15 replies, posted in General)

X54321 wrote:

I'm not very sure about this one. IS there a way to change the window title when you publish it? It's an essential thing to polish, and I'm pretty sure the developers couldn't have overlooked it. Do I need to add some LUA code? I can't find anything about it on the wiki. Do I need to modify something in the published folder? Anyone know?

I think someone posted on this before, let me see if I can find it.

375

(7 replies, posted in Showcase)

I am really curious at how that swarm thing is going to turn out. I'll be checking this one out.