Welcome to Dream.In.Code
Getting Help is Easy!

Join 109,548 Programmers for FREE! Ask your question and get quick answers from experts. There are 1,226 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



Grass and rock effect

 
Reply to this topicStart new topic

Grass and rock effect

manhaeve5
post 25 Jul, 2008 - 03:14 PM
Post #1


D.I.C Regular

Group Icon
Joined: 28 Dec, 2006
Posts: 491



Dream Kudos: 225
My Contributions


Hi there,

I'm toiling around with some filters, and I'm also working on a non-tilebased 2D map editor. I made some code to generate some grass, what do you think of it?
IPB Image

Also, I'm planning on using perlin noise for a rocky surface, but I'm a bit confused, can anyone explain me the basic stuff of perlin noise without just showing me some equatations ( or however it is spelled), and leave me figure it out how to use 'em.

Thanks

Pontus

This post has been edited by manhaeve5: 25 Jul, 2008 - 03:14 PM
User is offlineProfile CardPM

Go to the top of the page


bobjob
post 25 Jul, 2008 - 06:19 PM
Post #2


D.I.C Head

**
Joined: 29 Mar, 2008
Posts: 51



Thanked 1 times
My Contributions


Nice grass.

sry wouldnt have a clue how to generate a rock texture, but i was wondering why you making a non-tilemap 2d editor? what will you use it for?
User is offlineProfile CardPM

Go to the top of the page

Tom9729
post 25 Jul, 2008 - 09:38 PM
Post #3


Debian guru

Group Icon
Joined: 30 Dec, 2007
Posts: 1,403



Thanked 7 times

Dream Kudos: 325
My Contributions


Cool
User is online!Profile CardPM

Go to the top of the page

BetaWar
post 25 Jul, 2008 - 10:52 PM
Post #4


#include <soul.h>

Group Icon
Joined: 7 Sep, 2006
Posts: 1,266



Thanked 38 times

Dream Kudos: 775
My Contributions


The grass looks pretty good, maybe a little blurry, but nothing to bad (and besides, it chould be my eyes).
User is online!Profile CardPM

Go to the top of the page

manhaeve5
post 26 Jul, 2008 - 12:30 AM
Post #5


D.I.C Regular

Group Icon
Joined: 28 Dec, 2006
Posts: 491



Dream Kudos: 225
My Contributions


QUOTE(bobjob @ 26 Jul, 2008 - 03:19 AM) *

Nice grass.

sry wouldnt have a clue how to generate a rock texture, but i was wondering why you making a non-tilemap 2d editor? what will you use it for?

I'll use it for a 2D rpg , but I dont want everything to be rectangular, and because my collision detection can handle non-rectangular shapes.

And I know how to make the rock effect, but I need perlin noise for that, but I dont understand how it exactly works.

EDIT:

Some people said it was too blurry, so I made a different version:
IPB Image

This post has been edited by manhaeve5: 26 Jul, 2008 - 01:02 AM
User is offlineProfile CardPM

Go to the top of the page

WolfCoder
post 27 Jul, 2008 - 04:24 PM
Post #6


Gyuu~

Group Icon
Joined: 5 May, 2005
Posts: 2,984



Thanked 1 times

Dream Kudos: 1300
My Contributions


Does it move and sway in the wind?
User is offlineProfile CardPM

Go to the top of the page

NickDMax
post 27 Jul, 2008 - 04:52 PM
Post #7


2B||!2B

Group Icon
Joined: 18 Feb, 2007
Posts: 2,756



Thanked 34 times

Dream Kudos: 525
My Contributions


I once did a great deal of work in texture generation. your post has me very nostalgic! I have thousands of files of generated "web page tiles"

I did a lot of work in stone and marble surface generation -- not really rocky surfaces. But when I was working in fractals I had a neat program that would build a "3D" version of the fractal by shifting down (or down and to the right) for each color. (so in a 256 color gray scale the darker the color the farther down I shifted the pixel).

If you use this technique with plasma maps you end up with a "rippled" surface. Kind of like a "lunar landscape" (or wrinkled paper).

Now there is a lot of work on using plasma maps to generate 3D landscapes and I think you could tune a map enough to generate a good rocky texture.

Just some thoughts (keep in mind I have not worked in graphics in about 5-7 years -- so I can't really help implement the idea unless you want it in QBasic smile.gif )

This post has been edited by NickDMax: 27 Jul, 2008 - 04:55 PM
User is offlineProfile CardPM

Go to the top of the page

manhaeve5
post 27 Jul, 2008 - 07:58 PM
Post #8


D.I.C Regular

Group Icon
Joined: 28 Dec, 2006
Posts: 491



Dream Kudos: 225
My Contributions


QUOTE(WolfCoder @ 28 Jul, 2008 - 01:24 AM) *

Does it move and sway in the wind?

No, that's a bit too hard for me to generate in the level editor, I suppose. I'm quite pleased that I'm able to generate a grass like effect at the moment, using alot of brand new code. I'm writing this one hour before I'll leave to Switzerland and I'll spend some time thinking about it but that might still take a while.

QUOTE(NickDMax @ 28 Jul, 2008 - 01:52 AM) *

I once did a great deal of work in texture generation. your post has me very nostalgic! I have thousands of files of generated "web page tiles"

I did a lot of work in stone and marble surface generation -- not really rocky surfaces. But when I was working in fractals I had a neat program that would build a "3D" version of the fractal by shifting down (or down and to the right) for each color. (so in a 256 color gray scale the darker the color the farther down I shifted the pixel).

If you use this technique with plasma maps you end up with a "rippled" surface. Kind of like a "lunar landscape" (or wrinkled paper).

Now there is a lot of work on using plasma maps to generate 3D landscapes and I think you could tune a map enough to generate a good rocky texture.

Just some thoughts (keep in mind I have not worked in graphics in about 5-7 years -- so I can't really help implement the idea unless you want it in QBasic smile.gif )


It always pleases me when someone takes the time to reply. I was thinking of making my rock out of a sand color, apply some perlin noise and use some sort of "relief" filter on it, maybe draw some blurred non-coherent noise on top of it for small rock effect.

Ty for replying

Pontus
User is offlineProfile CardPM

Go to the top of the page

WolfCoder
post 27 Jul, 2008 - 10:06 PM
Post #9


Gyuu~

Group Icon
Joined: 5 May, 2005
Posts: 2,984



Thanked 1 times

Dream Kudos: 1300
My Contributions


A cheap way is to generate random grass objects above the tile that bend around and move with the wind.
User is offlineProfile CardPM

Go to the top of the page

World
post 28 Jul, 2008 - 12:00 AM
Post #10


New D.I.C Head

*
Joined: 30 Mar, 2008
Posts: 12

Grass Is Nice But It's Still A Little Bit Blurry. But Work It When Your Game Is Finished. Not That Important As Of Now.
User is offlineProfile CardPM

Go to the top of the page

NickDMax
post 28 Jul, 2008 - 01:52 AM
Post #11


2B||!2B

Group Icon
Joined: 18 Feb, 2007
Posts: 2,756



Thanked 34 times

Dream Kudos: 525
My Contributions


You know I thought you were programming something that generated textures... sorry I misunderstood.

Procedural Texture modeling is really a very interesting area of research. It also not a terribly big field -- while there is an excellent body of existing work there are many open and outstanding questions in the field. If you are an aspiring CS student and interested in graphics (especially modeling) then this is a field to look into.

...I just wish I had the time... too busy making all this money! (...to pay off my student loans...sad.gif )
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 9/7/08 10:21PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month