#hey could someone help me with my

1 messages · Page 1 of 1 (latest)

opal wigeon
#

this is my code

#

and im trying to generate a map

#

but when its done the result is

#

(pls don't look at the colors of everything was still working on it lmao)

#

part op the problem is probably the trying to use submeshes

jagged kindle
#

First thing I do when debugging meshes is turn on wireframe/shaded wireframe in the scene view

opal wigeon
#

alrightyy

#

some bits are overlapping

candid tapir
#

what is your expected results?

opal wigeon
#

uhm an island without holes

#

i can go back a bit and show what is was

#

before i tried making everything with the right material

#

do you want to see it?

jagged kindle
#

if it possibly helps us to help you, sure

opal wigeon
#

i dont know if you can see it good

#

but like this everything works

#

cus its one color

#

do you need this version of the script 2?

candid tapir
#

oh wow you're doing it in cpp

opal wigeon
#

c#

candid tapir
#

the link deceives me lmao

jagged kindle
#

oh yeah it has .cpp extension

opal wigeon
#

ooh i did not know wich link to use

candid tapir
#

Im not familiar with mesh generation, sorry

opal wigeon
jagged kindle
#

I am, but I barely can organize my own mesh gens so trying to debug someone else's massive mesh gen is even harder 😅

#

did you write the script entirely? Or did you follow some guide/tutorial?

opal wigeon
#

i did entirely

opal wigeon
#

cus i think i am messing something up with the order im doing things

jagged kindle
#

by the way, SetTriangles can take a List, so you don't have to convert to Array

opal wigeon
jagged kindle
#

huh?

#

I said SetTriangles method

opal wigeon
#

ooh

jagged kindle
#

and also SetVertices etc

opal wigeon
#

sorry

#

WAIT DO I NEED TO DO THAT FOR EVERYTHING IF IM USING SUBMESHES

jagged kindle
#

@opal wigeon so you are adding triangles like this:

Etriangles.Add(Etriangles.Count);

maybe you should do

Etriangles.Add(vertices.Count - 1);
jagged kindle
#

Vertices are shared between submeshes

opal wigeon
#

for uvs does channel matter

jagged kindle
jagged kindle
opal wigeon
#

but how does one mesh know wichone belongs to what other

#

eventho uv's are all just 1

#

think its more about verts

jagged kindle
#

verts are also just 1

#

verts and uvs use the same indices

#

so a triangle that has vert index 4, also points to uv of index 4

#

so forget UVs for now and try the fix I suggested.

opal wigeon
#

i did im now running

#

now i just have the top

jagged kindle
#

paste new code

#

in the same site gdl.space

opal wigeon
jagged kindle
#

first change the 1 to 0 here:
mesh.SetUVs(1,uvs);

#

because 0 is the first channel which you are using.

opal wigeon
#

alright! got that😁

#

and uh

#

ill have to dissapoint you

#

YOU DID IT

#

i forgot that you cant see something without a material

jagged kindle
#

🥳

opal wigeon
#

so thats why we could only see the top

opal wigeon
#

thankyou for helping mee

jagged kindle
#

mesh generation can be so painful trust me I've lost my mind so many times with it

jagged kindle