generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Editing math.noise?

Previous Thread :: Next Thread 
Evolution_Theory is not online. Evolution_Theory
Joined: 03 Feb 2012
Total Posts: 1770
24 Aug 2016 11:17 AM
So I have this map generation script and I would like to know is it possible to make it have a flat spot made out of like 4x4 parts in the middle and make the terrain correspond to it and look like its meant to be there? I know it's somehow do-able, but I don't know how to do it, I would appreciate any help

local MapModel = Instance.new("Model",workspace)
MapModel.Name = "MapModel"

local Part = Instance.new("Part") --For cloning
Part.Anchored = true
Part.FormFactor = "Custom"
Part.Size = Vector3.new(50,200,50)
Part.TopSurface = "Smooth"

local seed = math.random(1, 10e6)
local frequency = 3
local power = 10
local resolution = 100

for x = 1, resolution do
wait()
for z = 1, resolution do
local y1 = math.noise(
(x*frequency)/resolution,
(z*frequency)/resolution,
seed
)

local y2 = math.noise(
(x*frequency*.125)/resolution,
(z*frequency*.125)/resolution,
seed
)

local y3 = math.noise(
(x*frequency*4)/resolution,
(z*frequency*4)/resolution,
seed
)

local y = (y1*y2*power*power)+y3

local Part = Part:Clone()
Part.Parent = MapModel
Part.CFrame = CFrame.new(x*50,y*15,z*50)
if math.abs(y2) < .1 then
Part.BrickColor = BrickColor.new("Bright green")
elseif math.abs(y2) > .25 then
Part.BrickColor = BrickColor.new("Earth green")
elseif math.abs(y2) > .1 and math.abs(y2) < .25 then
Part.BrickColor = BrickColor.new("Dark green")
end
end
end


Report Abuse
Evolution_Theory is not online. Evolution_Theory
Joined: 03 Feb 2012
Total Posts: 1770
24 Aug 2016 11:42 AM
bump


Report Abuse
RemasteredBox is not online. RemasteredBox
Joined: 19 Jun 2016
Total Posts: 2140
24 Aug 2016 11:43 AM
I don't know how to do this, but bump for you.
(post farming)


"me caveman rawr" - Me
Report Abuse
baa_aaa is not online. baa_aaa
Joined: 18 Nov 2015
Total Posts: 491
24 Aug 2016 12:20 PM
You'd probably want to apply it after the fact. I would set the middle parts to the height you want, and then smooth it out around that.
Report Abuse
Evolution_Theory is not online. Evolution_Theory
Joined: 03 Feb 2012
Total Posts: 1770
24 Aug 2016 12:23 PM
I know how to set the middle parts height, but how would I smooth it out?


Report Abuse
Zarkonan_Zenheart is not online. Zarkonan_Zenheart
Joined: 29 May 2012
Total Posts: 610
24 Aug 2016 12:24 PM
It's... really clunky but

you could number them all (the parts, from 1 - whatever)
and figure out the middle then compress them after the map has been generated
Report Abuse
Evolution_Theory is not online. Evolution_Theory
Joined: 03 Feb 2012
Total Posts: 1770
24 Aug 2016 12:27 PM
Yes I know how to do that, but how would I compress it?


Report Abuse
Evolution_Theory is not online. Evolution_Theory
Joined: 03 Feb 2012
Total Posts: 1770
24 Aug 2016 12:43 PM
bump


Report Abuse
Evolution_Theory is not online. Evolution_Theory
Joined: 03 Feb 2012
Total Posts: 1770
24 Aug 2016 01:16 PM
bump


Report Abuse
Francisl4d45 is not online. Francisl4d45
Joined: 14 Aug 2010
Total Posts: 347
24 Aug 2016 01:18 PM
Sau sonkaulius kelis issioperuoji, ir pradedi byby savo ciulpt
Report Abuse
Evolution_Theory is not online. Evolution_Theory
Joined: 03 Feb 2012
Total Posts: 1770
24 Aug 2016 01:47 PM
bump


Report Abuse
qqtt991 is online. qqtt991
Joined: 14 Dec 2007
Total Posts: 1387
24 Aug 2016 02:00 PM
#################################################################################################################################################################################################################################################
Report Abuse
qqtt991 is online. qqtt991
Joined: 14 Dec 2007
Total Posts: 1387
24 Aug 2016 02:01 PM
####################################################################################################################################################################################################################################################
Report Abuse
qqtt991 is online. qqtt991
Joined: 14 Dec 2007
Total Posts: 1387
24 Aug 2016 02:02 PM
LORDY LOO FFFFFF

I'm .. working on it.
No guarantees yet, but I've got a plateau generated, and I'm working on finding the correct level to set the surrounding blocks to before I can smooth down the rest.

i. imgu r. com/h76vxrb . png


Report Abuse
Evolution_Theory is not online. Evolution_Theory
Joined: 03 Feb 2012
Total Posts: 1770
24 Aug 2016 02:24 PM
Oh that's cool, what are those grey blocks in the middle?


Report Abuse
qqtt991 is online. qqtt991
Joined: 14 Dec 2007
Total Posts: 1387
24 Aug 2016 02:27 PM
The flat area you're looking to generate. They're not colored yet so it's easier for me to see them while I work.

Found the correct height. Now I have to write the part that smooths the terrain.


Report Abuse
qqtt991 is online. qqtt991
Joined: 14 Dec 2007
Total Posts: 1387
24 Aug 2016 02:28 PM
i . imgur. com / FHPBeSB . png


Report Abuse
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
24 Aug 2016 02:34 PM
you can just erode a round-ish space out of the terrain
Report Abuse
qqtt991 is online. qqtt991
Joined: 14 Dec 2007
Total Posts: 1387
24 Aug 2016 02:35 PM
That is not elegant.


Report Abuse
Evolution_Theory is not online. Evolution_Theory
Joined: 03 Feb 2012
Total Posts: 1770
24 Aug 2016 02:36 PM
@TheDailyBlarg I wish I knew how to do that

and for the flat area I don't want it to be like a platform I just want it to be the same grass/green blocks but flat


Report Abuse
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
24 Aug 2016 02:37 PM
easy

just generate the terrain and then grab a part of terrain using Region3 and ReadVoxels
then you can write voxels to the average height and add terrain around the sides so that it doesnt look ugly
Report Abuse
Evolution_Theory is not online. Evolution_Theory
Joined: 03 Feb 2012
Total Posts: 1770
24 Aug 2016 02:40 PM
But readvoxels are for smooth terrain


Report Abuse
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
24 Aug 2016 02:42 PM
just use region3 then and remove those parts and toss some back inside that are flat
or cframe them to their average Y
Report Abuse
qqtt991 is online. qqtt991
Joined: 14 Dec 2007
Total Posts: 1387
24 Aug 2016 02:54 PM
You specified you wanted a flat plateau made out of 4x4 parts in the middle so I did just that. I removed the plateau though so it's just flat land now. To make it circular would take more effort than I'm willing to invest so hopefully it will look alright once I get the smoothing working. I've never done this before lol.

i . imgur . com / ssYZLIp . png


Report Abuse
Evolution_Theory is not online. Evolution_Theory
Joined: 03 Feb 2012
Total Posts: 1770
24 Aug 2016 03:07 PM
That's exactly how I wanted it, what I said was an example. Send me a pic once you get smoothing working :)


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image