Hi everyone,
I imported an HDA with a curve and everytime the curve outline (dont know what else to call it) is visible in the editor aswell as in the game mode.
I tripple checke that I dont accidentally generated geometry around it, and i also disabled the "Curve Editor enabled" option inside Unity.
Does anybody know why that is and how to get rid of the green "outlines"?
Greetings Moon
Found 17 posts.
Search results Show results as topic list.
Houdini Engine for Unity » Editable Curve Outline visible in Game Mode
- MoonwalkJunkie
- 17 posts
- Offline
Technical Discussion » Vector Rotation around a Line between two vectors
- MoonwalkJunkie
- 17 posts
- Offline
I had to normalize the dot product vectors, but now it is working perfectly! Thank you so much <3
Technical Discussion » Vector Rotation around a Line between two vectors
- MoonwalkJunkie
- 17 posts
- Offline
I understand that rotating between two perfectly opposing vectors is a problem, yes. But why is the second error image, where they are not oppsing each other not a good slerp? For me it looks more like a regular lerp than a slerp where afterwards the vectors are normalized.
From my understanding a slerp along 6 points between 2 vectors that have a 100° difference should return 0° when the bias is 0, 100° when the bias is 1 and then 20°*i for each intermediate point. Am I just missunderstanding this function? Because that is not what is happening in my second error image from my previous post.
Also, how would I go about using a rotation vector for a quaternion? I didn't know that was possible.
Sorry for all the confusion. I really appreciate the time you take to answer <3
Best regards Moon
From my understanding a slerp along 6 points between 2 vectors that have a 100° difference should return 0° when the bias is 0, 100° when the bias is 1 and then 20°*i for each intermediate point. Am I just missunderstanding this function? Because that is not what is happening in my second error image from my previous post.
Also, how would I go about using a rotation vector for a quaternion? I didn't know that was possible.
Sorry for all the confusion. I really appreciate the time you take to answer <3
Best regards Moon
Technical Discussion » Vector Rotation around a Line between two vectors
- MoonwalkJunkie
- 17 posts
- Offline
Thanks for your reply animatrix_,
I have tried something similar a little bit earlier and sadly the Problem persist. I uploaded two pictures that show my problems with this approach. I need it to loop around the line even if the vectors are 1 and -1. While that works with matrices, those only loop around the line anticlockwise.
I additionally tried this code: *just feed a single Point in a Pointwrangle*
vector axis1 = normalize(set(1,0,0));
vector axis2 = normalize(set(-1,0,-0.5));
v@axis = axis1;
v@axis2 = axis2;
vector q1 = cross(set(0,1,0), axis1);
vector q2 = cross(set(0,1,0), axis2);
vector4 quat1 = quaternion(radians(90), q1);
vector4 quat2 = quaternion(radians(90), q2);
vector norm = set(0,1,0);//normalize(axis1 + axis2);
vector4 quat3 = slerp(quat1, quat2, chf("t"));
norm = qrotate(quat3, norm);
int pt1 = addpoint(0, set(0,0,0));
int pt2 = addpoint(0, norm);
int line = addprim(0, "polyline", pt1, pt2);
v@N = norm;
And this is super close to what i want, except that it is doing this weird upwards loop near the middle of the interpolation. Does anyone happen to know how to fix it or have an alternative version?
Best regards Moon
I have tried something similar a little bit earlier and sadly the Problem persist. I uploaded two pictures that show my problems with this approach. I need it to loop around the line even if the vectors are 1 and -1. While that works with matrices, those only loop around the line anticlockwise.
I additionally tried this code: *just feed a single Point in a Pointwrangle*
vector axis1 = normalize(set(1,0,0));
vector axis2 = normalize(set(-1,0,-0.5));
v@axis = axis1;
v@axis2 = axis2;
vector q1 = cross(set(0,1,0), axis1);
vector q2 = cross(set(0,1,0), axis2);
vector4 quat1 = quaternion(radians(90), q1);
vector4 quat2 = quaternion(radians(90), q2);
vector norm = set(0,1,0);//normalize(axis1 + axis2);
vector4 quat3 = slerp(quat1, quat2, chf("t"));
norm = qrotate(quat3, norm);
int pt1 = addpoint(0, set(0,0,0));
int pt2 = addpoint(0, norm);
int line = addprim(0, "polyline", pt1, pt2);
v@N = norm;
And this is super close to what i want, except that it is doing this weird upwards loop near the middle of the interpolation. Does anyone happen to know how to fix it or have an alternative version?
Best regards Moon
Technical Discussion » Vector Rotation around a Line between two vectors
- MoonwalkJunkie
- 17 posts
- Offline
Thanks for your help
I sadly cannot use a Node for that. I need to compute that multiple times inside a vex node because I create and delete points on the get go and calculate the rotation inbetween.
However, in theory your advice is doing exacly what i need. I only need this to work in vex.
I sadly cannot use a Node for that. I need to compute that multiple times inside a vex node because I create and delete points on the get go and calculate the rotation inbetween.
However, in theory your advice is doing exacly what i need. I only need this to work in vex.
Technical Discussion » Vector Rotation around a Line between two vectors
- MoonwalkJunkie
- 17 posts
- Offline
Hi everyone,
I want to interpolate between 2 given random Vectors along a not straight line. I have tried lerp, slerp, quaternions and rotation Matrices and I cant get it to work.
I have a random curve and a starting Vector at point 0 and an ending Vector at point n. All I want is a vector that blends beetween the two vectors on the shortest path possible and set that vector as pointAttrib. Preferably with easing in/out, but thats not neccessary.
The pictures show something similar to what i want. the green vector are the start and end, and the blue is the interpolation. I need this to work for any kind of start an end vector.
Can some mercyful soul please help me to get this working in vex? I have beed trying for days now
I added my testfile in case somebody wants to take a look at my tries.
Regards Moon
I want to interpolate between 2 given random Vectors along a not straight line. I have tried lerp, slerp, quaternions and rotation Matrices and I cant get it to work.
I have a random curve and a starting Vector at point 0 and an ending Vector at point n. All I want is a vector that blends beetween the two vectors on the shortest path possible and set that vector as pointAttrib. Preferably with easing in/out, but thats not neccessary.
The pictures show something similar to what i want. the green vector are the start and end, and the blue is the interpolation. I need this to work for any kind of start an end vector.
Can some mercyful soul please help me to get this working in vex? I have beed trying for days now
I added my testfile in case somebody wants to take a look at my tries.
Regards Moon
Technical Discussion » Change the speed of a carve node for Rollercoaster animation
- MoonwalkJunkie
- 17 posts
- Offline
Okay, first of all, really big thanks to you @Enivob! This is a really clever way, setting keyframes via python. Would never have come up with this on my own.
However I did some minor debugging and tweaked the code a bit, since your result produced a linear keyframe ramp which had the same speed between all points. In case somebody else should ever need this, I ended up with this:
import hou
node = hou.node('/obj/Achterbahn-Geo/Rollercoaster/Place_Cars/ROLLERCARVE')
parm = node.parm('domainu1')
geo = hou.pwd().geometry()
key = hou.Keyframe()
parm.deleteAllKeyframes()
finaltime = geo.attribValue('final_time')
fps = hou.fps()
lastframe = final_time*fps
pcount = 0 #calulate amount of points
for point in geo.points():
pcount = pcount + 1
numpt = pcount
count = 0
for point in geo.points(): #loop through all points and set keyframes in the specified carve node
count = count + 1
value = point.attribValue('time')
keytime = value
key.setFrame(keytime/finaltime*lastframe)
key.setValue((count/numpt))#+(keytime/finaltime)
parm.setKeyframe(key)
However I did some minor debugging and tweaked the code a bit, since your result produced a linear keyframe ramp which had the same speed between all points. In case somebody else should ever need this, I ended up with this:
import hou
node = hou.node('/obj/Achterbahn-Geo/Rollercoaster/Place_Cars/ROLLERCARVE')
parm = node.parm('domainu1')
geo = hou.pwd().geometry()
key = hou.Keyframe()
parm.deleteAllKeyframes()
finaltime = geo.attribValue('final_time')
fps = hou.fps()
lastframe = final_time*fps
pcount = 0 #calulate amount of points
for point in geo.points():
pcount = pcount + 1
numpt = pcount
count = 0
for point in geo.points(): #loop through all points and set keyframes in the specified carve node
count = count + 1
value = point.attribValue('time')
keytime = value
key.setFrame(keytime/finaltime*lastframe)
key.setValue((count/numpt))#+(keytime/finaltime)
parm.setKeyframe(key)
Technical Discussion » Change the speed of a carve node for Rollercoaster animation
- MoonwalkJunkie
- 17 posts
- Offline
Hi everyone!
I am trying to animate a rollercoaster along a curve. Each point of the curve has an attribute when the train will arrive at the specific point. But the obvious formula of "timeAtPointX / totalTime" does not work when put in a carve node U and the speed does not change at all when the train drops down.
Can anyone help me solve the problem with the carve node?
I am also fine with not using a carve node, as long as my 5 car train rolls along the track with the calculated speed.
Thanks in advance!
I am trying to animate a rollercoaster along a curve. Each point of the curve has an attribute when the train will arrive at the specific point. But the obvious formula of "timeAtPointX / totalTime" does not work when put in a carve node U and the speed does not change at all when the train drops down.
Can anyone help me solve the problem with the carve node?
I am also fine with not using a carve node, as long as my 5 car train rolls along the track with the calculated speed.
Thanks in advance!
Technical Discussion » Python Script got deleted
- MoonwalkJunkie
- 17 posts
- Offline
Hi,
I have a large project where I implemented a button which is linked to a script inside my hdas Subnet Type Properties. While I was editing I pressed STRG+s to save the project, but a window popped up instead. There was some text, which i dont perfectly remember and i only had the option to "safe & quit", "discard & quit", "help", "see error" and another one which i forgot. Since the only option was to quit the application afterwards and I had not saved in a while, i used the save and quit button.
Now, when i load my file again, it always says: using incomplete asset definitions(full definitions not found) * and my node name*
Also, most importantly, the Python script, which was inside my Type Properties is now gone. Vanished from existence.
Most interesting part is, even im my Backup files all my python sripts are now gone and it throws the same error with the definitions...
It seems like I changed some global kind of variable which made some imports or references useless.
Can anyone help me to restore my python script and remove the error? I am really out of ideas and have been googling for hours now.
Thanks in advance,
Joshi
I have a large project where I implemented a button which is linked to a script inside my hdas Subnet Type Properties. While I was editing I pressed STRG+s to save the project, but a window popped up instead. There was some text, which i dont perfectly remember and i only had the option to "safe & quit", "discard & quit", "help", "see error" and another one which i forgot. Since the only option was to quit the application afterwards and I had not saved in a while, i used the save and quit button.
Now, when i load my file again, it always says: using incomplete asset definitions(full definitions not found) * and my node name*
Also, most importantly, the Python script, which was inside my Type Properties is now gone. Vanished from existence.
Most interesting part is, even im my Backup files all my python sripts are now gone and it throws the same error with the definitions...
It seems like I changed some global kind of variable which made some imports or references useless.
Can anyone help me to restore my python script and remove the error? I am really out of ideas and have been googling for hours now.
Thanks in advance,
Joshi
Technical Discussion » Curves with per point Rotation angles for a Roller Coaster
- MoonwalkJunkie
- 17 posts
- Offline
Wow, thanks for your two files, those are really helpful.
@Aizatulin Yours seems to work beautifuly but I still need to test this inside unity with an exposed parameter. This maybe does get a bit fiddly tho if i use it for a larger scale coaster xD
@eikonoklastes Your subnet is really prectical, but i think this will only work inside houdini an not in a unity session. However, can go a bit deeper inside the "edit roll rotation" topic you mentioned? I have not yet found a way to rotate a point of a curve.
Thanks to both of you two <3
@Aizatulin Yours seems to work beautifuly but I still need to test this inside unity with an exposed parameter. This maybe does get a bit fiddly tho if i use it for a larger scale coaster xD
@eikonoklastes Your subnet is really prectical, but i think this will only work inside houdini an not in a unity session. However, can go a bit deeper inside the "edit roll rotation" topic you mentioned? I have not yet found a way to rotate a point of a curve.
Thanks to both of you two <3
Technical Discussion » Curves with per point Rotation angles for a Roller Coaster
- MoonwalkJunkie
- 17 posts
- Offline
Thanks for the tutorials @gt3d2019. While I did not particularly used those, i did build something similar to them. However, I do not want to calculate some "fixed" rotations based on the points positions, i want to rotate them by hand so that i can go crazy with the banking whenever i feel like it. To show an example: https://youtu.be/saAQNRSYU9k?t=369 [youtu.be] Pretty much like this I would love to to the same in houdini. Or find a way to access that curve, which he builds in unity, in Houdini, especially with the normal rotation.
Still thanks for the Videos, those are great tutorials.
Still thanks for the Videos, those are great tutorials.
Technical Discussion » Curves with per point Rotation angles for a Roller Coaster
- MoonwalkJunkie
- 17 posts
- Offline
Technical Discussion » Curves with per point Rotation angles for a Roller Coaster
- MoonwalkJunkie
- 17 posts
- Offline
Hi everyone,
The Problem:
I am trying to generate a Roller Coaster which I want to use in Unity later on. The entire Coaster is "swept" along a single Curve. I need it to have a customizable rotation per point to tilt the track of the roller coaster, but Houdini doesnt seem to support that with its curve nodes.
How can I get a way to tilt the Track inside Houdini and Unity?
My tries to solve the Problem:
1: I created a curve in Houdini which is editable and duplicated it above to then point the normals of the first curve to the seconds curve points. While this works fine inside houdini i cannot edit the second curve inside unity.
2: I grabbed a curve addon from the unity asset store with customizable normal angles per point (the one from Sebastian Lague), but i cannot get the curve to be recognized as input for houdini. Neiter a HDA Input nor a object merge worked. I looked into the "input the curve as HDA" posts from some users, but that doesnt seem to work anymore.
3: I tried to make curve inside houdini and give the same points to a second curve via "copy parameters" of the first curves points, but the second curve doesnt recognise the points given via script.
I do really appreciate any help at all that could get me towards getting editable tilt on my roller coaster.
Best regards Moonwalk
The Problem:
I am trying to generate a Roller Coaster which I want to use in Unity later on. The entire Coaster is "swept" along a single Curve. I need it to have a customizable rotation per point to tilt the track of the roller coaster, but Houdini doesnt seem to support that with its curve nodes.
How can I get a way to tilt the Track inside Houdini and Unity?
My tries to solve the Problem:
1: I created a curve in Houdini which is editable and duplicated it above to then point the normals of the first curve to the seconds curve points. While this works fine inside houdini i cannot edit the second curve inside unity.
2: I grabbed a curve addon from the unity asset store with customizable normal angles per point (the one from Sebastian Lague), but i cannot get the curve to be recognized as input for houdini. Neiter a HDA Input nor a object merge worked. I looked into the "input the curve as HDA" posts from some users, but that doesnt seem to work anymore.
3: I tried to make curve inside houdini and give the same points to a second curve via "copy parameters" of the first curves points, but the second curve doesnt recognise the points given via script.
I do really appreciate any help at all that could get me towards getting editable tilt on my roller coaster.
Best regards Moonwalk
Edited by MoonwalkJunkie - Oct. 20, 2021 16:36:57
Houdini Engine for Unreal » Object Merging multiple Assets in UE4 but only one per Point
- MoonwalkJunkie
- 17 posts
- Offline
Hello everyone
I am working on a building generator that utilizes UE4 Assets to build Houses. I am using Object Merges that have their Object Inputs exposed so I can just drag and drop Assets in UE4 into the Parameter. Then I copy those to the points that I have specified. This works perfectly so far. However, this builds really repetitive Houses, as it only takes one wall asset as an input, which I would love to randomize a bit.
When I add another Object to the Object Merge inside Unreal (so that this particular Object merge uses 2 Inputs) it will merge both of the Assets to all places.
Is there a way that it only scatters one of the Assets per Point instead of both? So that I am able to randomize which one of the two it scatters.
I know there is the way of using the unreal_instance with an attribute randomize afterwards, however that is really not user friendly and I would prefer to use the drag and and drop functionality of the object merge.
Thanks for your help ^^
I am working on a building generator that utilizes UE4 Assets to build Houses. I am using Object Merges that have their Object Inputs exposed so I can just drag and drop Assets in UE4 into the Parameter. Then I copy those to the points that I have specified. This works perfectly so far. However, this builds really repetitive Houses, as it only takes one wall asset as an input, which I would love to randomize a bit.
When I add another Object to the Object Merge inside Unreal (so that this particular Object merge uses 2 Inputs) it will merge both of the Assets to all places.
Is there a way that it only scatters one of the Assets per Point instead of both? So that I am able to randomize which one of the two it scatters.
I know there is the way of using the unreal_instance with an attribute randomize afterwards, however that is really not user friendly and I would prefer to use the drag and and drop functionality of the object merge.
Thanks for your help ^^
Edited by MoonwalkJunkie - June 29, 2020 16:56:12
Technical Discussion » Using a Ramp to deform geometry
- MoonwalkJunkie
- 17 posts
- Offline
Thanks to both of you. I got the basics to work for now. But that stuff that you linked is nothing i can chew in few minutes, I will take some time to work through it properly.
Cheers J
Cheers J
Technical Discussion » Using a Ramp to deform geometry
- MoonwalkJunkie
- 17 posts
- Offline
Hello everyone,
I have been trying to create some procedural Columns and tried to deform them via a ramp parameter. After countless hours of research I could not find a way to do this, since every tutorial or explanation I found uses the old Point sop or some other not available SOP.
My goal is to build a Network where the ramp points automatically add new points in a line and also deform those, however for now I would be happy with the deform alone. I appreciate any help or Links to Resources on how to do this.
Thanks in advance J
I have been trying to create some procedural Columns and tried to deform them via a ramp parameter. After countless hours of research I could not find a way to do this, since every tutorial or explanation I found uses the old Point sop or some other not available SOP.
My goal is to build a Network where the ramp points automatically add new points in a line and also deform those, however for now I would be happy with the deform alone. I appreciate any help or Links to Resources on how to do this.
Thanks in advance J
Technical Discussion » Procedural racing track generation methods
- MoonwalkJunkie
- 17 posts
- Offline
Hello dear Community,
I am a student and I just started writing my Bachelor about procedural racing track genereation for Assetto Corsa. A few ideas of how to generate a track have already made it into Houdini, but I think I could still really use some help with that.
It would be really nice and helpful if you could share your idea(s) how you would generate a racing track or which idea you think is the most meaningful way. Also if you know a good Tutorial about this topic I would love to see that, as I was not able to find much about it.
My ideas so far were:
-Create a Line/Curve and distort them on x/y with a few variables.
-Create a Grid and scatter a few points and then scatter more points within a certain points radius of the old points.
-(theoretical)Creating an environment and then throw a few points with physics on it and connect them.
I would then just Raycast them on an environment and go from there.
Also interesting qustions:
How do I handle track crossings in terms of the height offset? (Bridges)
Is there an easy way to create sandbanks and surrounding fences for the track?
How would you smooth out the track after creating the waypoints?
Here is my current file:
Big thanks in advance
Joshua
P.S.: If you think you can really help me out I will gladly share some more information
I am a student and I just started writing my Bachelor about procedural racing track genereation for Assetto Corsa. A few ideas of how to generate a track have already made it into Houdini, but I think I could still really use some help with that.
It would be really nice and helpful if you could share your idea(s) how you would generate a racing track or which idea you think is the most meaningful way. Also if you know a good Tutorial about this topic I would love to see that, as I was not able to find much about it.
My ideas so far were:
-Create a Line/Curve and distort them on x/y with a few variables.
-Create a Grid and scatter a few points and then scatter more points within a certain points radius of the old points.
-(theoretical)Creating an environment and then throw a few points with physics on it and connect them.
I would then just Raycast them on an environment and go from there.
Also interesting qustions:
How do I handle track crossings in terms of the height offset? (Bridges)
Is there an easy way to create sandbanks and surrounding fences for the track?
How would you smooth out the track after creating the waypoints?
Here is my current file:
Image Not Found
Big thanks in advance
Joshua
P.S.: If you think you can really help me out I will gladly share some more information
-
- Quick Links